innodb_lru_dump_restore

Description

This patch provide the following new admin commands to control content of LRU through the information_schema. XTRADB_ADMIN_COMMAND.

  • XTRA_LRU_DUMP : Dump the content of buffer pool (list of space_id and page_no) to the specific file 'ib_lru_dump' at datadir.
  • XTRA_LRU_RESTORE : Read pages based on the 'ib_lru_dump' file.

Example

command lines

....(startup)....

mysql> show status like 'Innodb_buffer_pool_pages_data';
+-------------------------------+-------+
| Variable_name                 | Value |
+-------------------------------+-------+
| Innodb_buffer_pool_pages_data | 18    |
+-------------------------------+-------+
1 row in set (0.00 sec)

....(run workloads)....

mysql> show status like 'Innodb_buffer_pool_pages_data';
+-------------------------------+-------+
| Variable_name                 | Value |
+-------------------------------+-------+
| Innodb_buffer_pool_pages_data | 6231  |
+-------------------------------+-------+
1 row in set (0.01 sec)

mysql> select * from information_schema.XTRADB_ADMIN_COMMAND /*!XTRA_LRU_DUMP*/;
+------------------------------+
| result_message               |
+------------------------------+
| XTRA_LRU_DUMP was succeeded. |
+------------------------------+
1 row in set (0.02 sec)

....(restart mysqld)....

mysql> show status like 'Innodb_buffer_pool_pages_data';
+-------------------------------+-------+
| Variable_name                 | Value |
+-------------------------------+-------+
| Innodb_buffer_pool_pages_data | 22    |
+-------------------------------+-------+
1 row in set (0.00 sec)

mysql> select * from information_schema.XTRADB_ADMIN_COMMAND /*!XTRA_LRU_RESTORE*/;
+---------------------------------+
| result_message                  |
+---------------------------------+
| XTRA_LRU_RESTORE was succeeded. |
+---------------------------------+
1 row in set (0.62 sec)  (<--- * It is fast, because it doesn't use direct_io...)

mysql> show status like 'Innodb_buffer_pool_pages_data';
+-------------------------------+-------+
| Variable_name                 | Value |
+-------------------------------+-------+
| Innodb_buffer_pool_pages_data | 6231  |
+-------------------------------+-------+
1 row in set (0.00 sec)

.err file

....
091217 11:49:16 InnoDB: administration command 'XTRA_LRU_DUMP' was detected.
....
091217 11:51:44 InnoDB: administration command 'XTRA_LRU_RESTORE' was detected.
091217 11:51:45 InnoDB: reading pages based on the dumped LRU list was done. (requested: 6231, read: 6209)
Please note that this is NOT a place to ask questions or report bugs. This comment system is only intended for users to share tips and documentation additions concerning particular document.
Please report bugs to https://bugs.launchpad.net/percona-project/+filebug and ask general questions in maillist Percona-discussions

Discussion

Enter your comment (wiki syntax is allowed):
EXWQN
 
percona-xtradb/patch/innodb_lru_dump_restore.txt · Last modified: 2010/03/21 06:56 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:GNU Free Documentation License 1.2
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki