Bug #61341 | buf_LRU_insert_zip_clean can be O(N) on LRU length | ||
---|---|---|---|
Submitted: | 28 May 2011 15:37 | Modified: | 5 Jan 2012 20:15 |
Reporter: | Mark Callaghan | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: InnoDB Plugin storage engine | Severity: | S5 (Performance) |
Version: | 5.1.52 | OS: | Any |
Assigned to: | Marko Mäkelä | CPU Architecture: | Any |
Tags: | compressed, innodb |
[28 May 2011 15:37]
Mark Callaghan
[28 May 2011 15:40]
Mark Callaghan
I repeated some of the tests from https://www.facebook.com/notes/mysql-at-facebook/innodb-compression-for-read-only-workload... and noticed that for the compressed table tests I was warming the buffer pool by mistake prior to starting the test. After changing the test to use a cold buffer pool I noticed the problem.
[28 May 2011 16:04]
Mark Callaghan
It takes between 15 and 30 minutes to get out of this state which might be the amount of time it takes for the buffer pool to reach a steady state with length(unzip_LRU) about 10% of length(LRU)
[30 May 2011 12:29]
Marko Mäkelä
Good catch, Mark. The funny thing is that it turns out that the buf_pool->zip_clean list is not really needed for anything. It was going to be used for resizing the buffer pool, a feature that has still not been implemented. I tried removing zip_clean. The only dependence is in buf_get_latched_pages_number(), which would no longer include any clean (non-dirty) compressed-only blocks in the count. Luckily, this is only exposed in debug builds: #ifdef UNIV_DEBUG export_vars.innodb_buffer_pool_pages_latched = buf_get_latched_pages_number(); #endif /* UNIV_DEBUG */
[11 Nov 2011 6:08]
Mark Callaghan
Is this fixed in 5.1 or 5.5? We are using compression on a few servers and this causes lots of stalls that are hard to debug. Would be nice for others to get an official fix.
[15 Nov 2011 12:26]
Marko Mäkelä
Sorry Mark, it looks like that we forgot to update the bug status. This was fixed already in June, by putting zip_clean behind #ifdef UNIV_DEBUG or UNIV_BUF_DEBUG. It was merged in this changeset: revno: 3562 revision-id: kent.boortz@oracle.com-20110703154737-d27i4ypu2a0ran21 parent: kent.boortz@oracle.com-20110630153713-9mk02181m1d70g6o parent: georgi.kodinov@oracle.com-20110607124316-rfzy0xt3uopdbkvm committer: Kent Boortz <kent.boortz@oracle.com> branch nick: mysql-5.1 timestamp: Sun 2011-07-03 17:47:37 +0200 Judging from the revno, this narrowly missed the 5.1.59 release.
[5 Jan 2012 20:15]
John Russell
Added to the 5.1.60 changelog: The InnoDB buffer pool management code was optimized for handling pages from compressed tables. This fixes a slowdown that could occur particularly during the warmup period for the buffer pool.