The same IO-bound scenario was run on 2 identical machines, one with RocksDB and the other with TokuDB. In a Zope application (ERP5), using NEO/MariaDB as storage, we filled the disks with a few data streams. The memory leak happened when reading a single whole data stream.
The result is that ERP5/NEO does 2 queries in loop. Here is an example from general log:
SELECT tid, compression, data.hash, value, value_tid FROM obj FORCE INDEX(`partition`) LEFT JOIN data ON (obj.data_id = data.id) WHERE `partition` = 6 AND oid = 94294686 AND tid < 271213171275484455 ORDER BY tid DESC LIMIT 1
|
SELECT tid FROM obj FORCE INDEX(`partition`) WHERE `partition`=6 AND oid=94294686 AND tid>271177614835290848 ORDER BY tid LIMIT 1
|
More about NEO's architecture is described at https://www.nexedi.com/blog/NXD-Document.Blog.Optimising.MariaDB.Big.Data
The data stream is 1.5TB uncompressed, taking about 650MB on-disk. RocksDB got OOM-killed when 1TB was read. TokuDB respected its memory constraints until the end.
Each machine has 2 disks of 2TB, each one with a MariaDB DB that holds half of the Zope DB. IOW, we have 2 RocksDB databases of about 2TB. 8GB of RAM for the 2 mysqld (rocksdb_block_cache_size = 2G).
- relates to
-
MDEV-13739
Huge slowness at inserting rows, CPU-bound
-
-
Confirmed
{"report":{"fcp":828,"ttfb":157,"pageVisibility":"visible","entityId":64409,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":1,"journeyId":"596b9c7c-5a94-43f6-8bff-4554b72f7fa4","navigationType":0,"readyForUser":886.6000001430511,"redirectCount":0,"resourceLoadedEnd":890.5,"resourceLoadedStart":175.40000009536743,"resourceTiming":[{"duration":14.599999904632568,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":175.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":175.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":190,"responseStart":0,"secureConnectionStart":0},{"duration":184.79999995231628,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":175.60000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":175.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":360.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":193.79999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":175.80000019073486,"connectEnd":175.80000019073486,"connectStart":175.80000019073486,"domainLookupEnd":175.80000019073486,"domainLookupStart":175.80000019073486,"fetchStart":175.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":175.80000019073486,"responseEnd":369.60000014305115,"responseStart":369.60000014305115,"secureConnectionStart":175.80000019073486},{"duration":242.39999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":175.80000019073486,"connectEnd":175.80000019073486,"connectStart":175.80000019073486,"domainLookupEnd":175.80000019073486,"domainLookupStart":175.80000019073486,"fetchStart":175.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":175.80000019073486,"responseEnd":418.2000000476837,"responseStart":418.2000000476837,"secureConnectionStart":175.80000019073486},{"duration":245.79999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":175.90000009536743,"connectEnd":175.90000009536743,"connectStart":175.90000009536743,"domainLookupEnd":175.90000009536743,"domainLookupStart":175.90000009536743,"fetchStart":175.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":175.90000009536743,"responseEnd":421.7000000476837,"responseStart":421.7000000476837,"secureConnectionStart":175.90000009536743},{"duration":246.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":176,"connectEnd":176,"connectStart":176,"domainLookupEnd":176,"domainLookupStart":176,"fetchStart":176,"redirectEnd":0,"redirectStart":0,"requestStart":176,"responseEnd":422.2000000476837,"responseStart":422.2000000476837,"secureConnectionStart":176},{"duration":246.89999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":176.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":176.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":423,"responseStart":0,"secureConnectionStart":0},{"duration":246.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":176.10000014305115,"connectEnd":176.10000014305115,"connectStart":176.10000014305115,"domainLookupEnd":176.10000014305115,"domainLookupStart":176.10000014305115,"fetchStart":176.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":176.10000014305115,"responseEnd":422.60000014305115,"responseStart":422.60000014305115,"secureConnectionStart":176.10000014305115},{"duration":246.79999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":176.20000004768372,"connectEnd":176.20000004768372,"connectStart":176.20000004768372,"domainLookupEnd":176.20000004768372,"domainLookupStart":176.20000004768372,"fetchStart":176.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":176.20000004768372,"responseEnd":423,"responseStart":423,"secureConnectionStart":176.20000004768372},{"duration":247.19999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":176.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":176.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":423.5,"responseStart":0,"secureConnectionStart":0},{"duration":247.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":176.40000009536743,"connectEnd":176.40000009536743,"connectStart":176.40000009536743,"domainLookupEnd":176.40000009536743,"domainLookupStart":176.40000009536743,"fetchStart":176.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":176.40000009536743,"responseEnd":423.7000000476837,"responseStart":423.7000000476837,"secureConnectionStart":176.40000009536743},{"duration":386.10000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":177,"connectEnd":177,"connectStart":177,"domainLookupEnd":177,"domainLookupStart":177,"fetchStart":177,"redirectEnd":0,"redirectStart":0,"requestStart":177,"responseEnd":563.1000001430511,"responseStart":563.1000001430511,"secureConnectionStart":177},{"duration":713.3999998569489,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":177.10000014305115,"connectEnd":177.10000014305115,"connectStart":177.10000014305115,"domainLookupEnd":177.10000014305115,"domainLookupStart":177.10000014305115,"fetchStart":177.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":177.10000014305115,"responseEnd":890.5,"responseStart":890.5,"secureConnectionStart":177.10000014305115},{"duration":308.80000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":581,"connectEnd":581,"connectStart":581,"domainLookupEnd":581,"domainLookupStart":581,"fetchStart":581,"redirectEnd":0,"redirectStart":0,"requestStart":581,"responseEnd":889.8000001907349,"responseStart":889.8000001907349,"secureConnectionStart":581}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":32,"responseStart":157,"responseEnd":159,"domLoading":174,"domInteractive":945,"domContentLoadedEventStart":945,"domContentLoadedEventEnd":986,"domComplete":1961,"loadEventStart":1961,"loadEventEnd":1962,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":926.4000000953674},{"name":"bigPipe.sidebar-id.end","time":927.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":927.3000001907349},{"name":"bigPipe.activity-panel-pipe-id.end","time":929.7000000476837},{"name":"activityTabFullyLoaded","time":997}],"measures":[],"correlationId":"96739eb4a3af6e","effectiveType":"4g","downlink":9.6,"rtt":0,"serverDuration":73,"dbReadsTimeInMs":12,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}