Bug #62487 | innodb takes 3 minutes to clean up the adaptive hash index at shutdown | ||
---|---|---|---|
Submitted: | 21 Sep 2011 6:09 | Modified: | 5 Jan 2012 18:46 |
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: | adaptive, hash, INDEX, innodb, shutdown, slow |
[21 Sep 2011 6:09]
Mark Callaghan
[21 Sep 2011 6:44]
Marko Mäkelä
Mark, I believe that the main problem is the call to btr_search_drop_page_hash_index(block) that will compute a "fold value" of every record in every page that has ever been in the adaptive hash index. When we drop an entire hash index, we can certainly drop it without removing each record individually. This change should not be too risky for 5.1 and 5.5. Side note: I have been working on reducing btr_search_latch contention, and I noticed that we can have block->is_hashed=TRUE for pages even after all AHI references to it have been removed.
[4 Oct 2011 22:23]
Marko Mäkelä
I have ported my patch to 5.1 plugin now. It should also speed up the following: SET GLOBAL innodb_adaptive_hash_index=OFF;
[5 Jan 2012 18:46]
John Russell
Added to changelog: The process of deallocating the InnoDB Adaptive Hash Index was made faster, during shutdown or when turning off the AHI with the statement: SET GLOBAL innodb_adaptive_hash_index=OFF;
[13 Feb 2012 21:57]
John Russell
The changelog entry went in 5.1.60, 5.5.18, 5.6.4.