Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.2.9
-
None
-
Debian 8. 16 GB RAM. 8 CPU (Xeon E5-1620 v2).
Description
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).
Attachments
Issue Links
- relates to
-
MDEV-13739 Huge slowness at inserting rows, CPU-bound
-
- Confirmed
-
Activity
Field | Original Value | New Value |
---|---|---|
Assignee | Sergei Petrunia [ psergey ] |
Attachment | mysqld.svg [ 44753 ] |
Attachment | mysqld.svg [ 44753 ] |
Attachment | mysqld.svg [ 44754 ] |
Link | This issue is part of MDEV-14666 [ MDEV-14666 ] |
Link | This issue is part of PT-67 [ PT-67 ] |
Fix Version/s | 10.2 [ 14601 ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Description |
The same IO-bound scenario was run on 2 identical machines, one with RocksDB and the other with TokuDB. In a Zope application ([ERP5|https://www.erp5.org]), using [NEO|https://neo.nexedi.com/]/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: {code} 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 {code} 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). |
The same IO-bound scenario was run on 2 identical machines, one with RocksDB and the other with TokuDB. In a Zope application ([ERP5|http://www.erp5.org]), using [NEO|https://neo.nexedi.com/]/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: {code} 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 {code} 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). |
Fix Version/s | 10.2.15 [ 23006 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Link | This issue relates to MDEV-13739 [ MDEV-13739 ] |
Workflow | MariaDB v3 [ 83924 ] | MariaDB v4 [ 153223 ] |
Can you please make a full test case that we can reproduce?
This includes creating the needed tables, having a script that fills them with data and running the queries that causes the memory overrun.
Alternatively is to link MariaDB with tcmalloc and run the test on your machines. This would give us
a log of the memory usage that could help us locate the problem
https://mariadb.com/kb/en/library/debugging-a-running-server-on-linux/