In earlier versions, if a high-load machine is restarted and a large amount of hot data in the memory is cleared, it will re-load the data from the disk to the Buffer_Pool buffer pool, in this way, the performance will become very poor during peak hours, and the number of connections will be very high.
In MySQL5.6, this problem is avoided by a new feature.
You only need to add the following in my. cnf:
Innodb_buffer_pool_dump_at_shutdown = 1
Explanation: dump hot data to a local disk when it is disabled.
Innodb_buffer_pool_dump_now = 1
Explanation: manually dumping hot data to a local disk.
Innodb_buffer_pool_load_at_startup = 1
Explanation: Load hot data to the memory at startup.
Innodb_buffer_pool_load_now = 1
Explanation: manually load hot data to the memory.
When MySQL is disabled, the hot data in the memory is stored in the ib_buffer_pool file on the disk, which is located in the data directory.
View the log and you will find:
650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131229/194F613S-0.jpg "/>
After the instance is started, hot data is automatically loaded to the Buffer_Pool buffer pool.
View the log and you will find:
650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131229/194FB958-1.jpg "/>
In this way, keep the hot data in the memory.
Note: The Hot data will be dump to the memory only when the MySQL service is shut down normally or when the mysql service is killed by pkill. If the machine goes down or pkill-9 mysql, it will not dump.
This article is from the "hechun's technical column" blog, please be sure to keep this source http://hcymysql.blog.51cto.com/5223301/940071