You may consider the tables INNODB_CMPMEM
and
INNODB_CMPMEM_RESET
as the status information
on the compressed pages that reside in the buffer pool. Please
consult Chapter 3, InnoDB Data Compression for further
information on compressed tables and the use of the buffer pool.
The tables INNODB_CMP
and INNODB_CMP_RESET
should provide
more useful statistics on compression.
The InnoDB Plugin uses a so-called “buddy
allocator” system to manage memory allocated to pages of
various sizes, from 1KB to 16KB. Each row of the two tables
described here corresponds to a single page size, except for
rows with PAGE_SIZE<1024
, which are
implementation artifacts. The smallest blocks
(PAGE_SIZE=64
or PAGE_SIZE=128
, depending on the server
platform) are used for keeping track of compressed pages for
which no uncompressed page has been allocated in the buffer
pool. Other blocks of PAGE_SIZE<1024
should never be allocated (PAGES_USED=0
).
They exist because the memory allocator allocates smaller blocks by
splitting bigger ones into halves.
These two tables have identical contents, but reading from
INNODB_CMPMEM_RESET
resets the statistics on relocation
operations. For example, if every 60 minutes you archived the output of
INNODB_CMPMEM_RESET
, it would show the hourly
statistics. If you never read INNODB_CMPMEM_RESET
and monitored
the output of INNODB_CMPMEM
instead, it would show the
cumulated statistics since InnoDB was started.
Table 6.2. Columns of INNODB_CMPMEM
and INNODB_CMPMEM_RESET
Column name | Description |
---|---|
PAGE_SIZE |
Block size in bytes. Each record of this table describes blocks of this size. |
PAGES_USED |
Number of blocks of the size
PAGE_SIZE that are currently in
use. |
PAGES_FREE |
Number of blocks of the size
PAGE_SIZE that are currently available for
allocation. This column shows the external
fragmentation in the memory pool. Ideally, these numbers
should be at most 1. |
RELOCATION_OPS |
Number of times a block of the size
PAGE_SIZE has been relocated. The
buddy system can relocate the allocated “buddy
neighbor” of a freed block when it tries to form
a bigger freed block. Reading from the table
INNODB_CMPMEM_RESET resets this
count. |
RELOCATION_TIME |
Total time in microseconds spent in relocating
blocks of the size PAGE_SIZE . Reading
from the table INNODB_CMPMEM_RESET resets this count. |
This is the User’s Guide for InnoDB Plugin 1.0.6 for MySQL 5.1, generated on March 4, 2010 (rev 673:680M).