[MDEV-466] Galera: Excessive memory use on sizable transactions Created: 2012-08-20 Updated: 2012-08-20 Resolved: 2012-08-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.5.25-galera |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Seppo Jaakola |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||
| Description |
|
I execute the following set of statements 3 times in a row:
wait for innodb to settle (for checkpoint age to become 0), and check memory consumption after each round. Here are results for a server started in Galera context (as a new node): Server options:
So, we started and ended at the same point (dropped the table that we previously created and populated), however memory consumption has grown ~260 Mb Nothing like that happens if the server is run in a standalone mode (with otherwise the same parameters): Server options:
bzr version-info:
|
| Comments |
| Comment by Seppo Jaakola [ 2012-08-20 ] |
|
Galera maintains "certification index" to help in tracking dependencies between transactions. This dependency information makes it possible e.g. to enable parallel applying with row level granularity in slave side. |
| Comment by Seppo Jaakola [ 2012-08-20 ] |
|
Looks like false positive, long term test shows no trails of memory leak |
| Comment by Elena Stepanova [ 2012-08-20 ] |
|
>> Looks like false positive, long term test shows no trails of memory leak This is because the bug was not about a memory leak, otherwise it would have said so. It was about excessive memory use: a modest operation (I do consider 128K rows is a rather modest number in the real world), which normally does not take anything above what the server already occupies, in Galera context requires additional 250+ Mb, even if it's only temporarily; and that's on top of extra 250 Mb which it takes just to start an empty node. |
| Comment by Elena Stepanova [ 2012-08-20 ] |
|
A fancy corollary: probably we won't even be able to run standard MTR test on a server with wsrep. Example (the original test case is main.multi_update2, it is not applicable as it is with $1=19, because it uses 2M rows while the hard limit is 1M rows. So, we reduce it to $1=18 and $1=17, below are the numbers of the comparative test) with wsrep MTR command-line options: $1=17 (500K rows) 457 elenst 20 0 557m 235m 12m S 34 2.9 0:03.44 mysqld $1=18 (1M rows) 866 elenst 20 0 606m 247m 12m S 77 3.1 0:07.67 mysqld Same build, without wsrep MTR command-line options (all the same minus wsrep): $1 = 17 (500K rows) 1093 elenst 20 0 403m 195m 6140 S 4 2.4 0:00.37 mysqld $1 = 18 (1M rows) 981 elenst 20 0 403m 195m 6140 S 3 2.4 0:00.34 mysqld |