For compressed InnoDB tables pages are compressed when in the InnoDB buffer pool. To improve performance uncompressed copies of the pages might be in the buffer pool. Because compressed pages are smaller you can have more data in the buffer pool and a better buffer pool hit ratio when compared to uncompressed tables. There are a few counters in SHOW INNODB STATUS that explain this. The data below is from a host running the insert benchmark for compressed InnoDB tables with key_block_size=8 which attempts to do 2X compression.
- Buffer pool size - the number of pages that can be stored in the buffer pool assuming all pages are the default page size (16kb in my case)
- Database pages - the number of distinct pages in the buffer pool. In this case there are 5.6M 8kb pages in the buffer pool because most are compressed. If none were compressed than there would be at most 3932159
- LRU len - the number of compressed pages in the buffer pool
- unzip_LRU len - the number of uncompressed copies of compressed pages in the buffer pool.
----------------------
BUFFER POOL AND MEMORY
----------------------
...
Buffer pool size 3932159
...
Database pages 5609438
...
LRU len: 5609438, unzip_LRU len: 1127347
PlanetMySQL Voting: Vote UP / Vote DOWN