Rechercher dans le manuel MySQL
15.14.1.3 Using the Compression Information Schema Tables
Example 15.1 Using the Compression Information Schema Tables
The following is sample output from a database that contains
compressed tables (see Section 15.9, “InnoDB Table and Page Compression”,
INNODB_CMP
,
INNODB_CMP_PER_INDEX
, and
INNODB_CMPMEM
).
The following table shows the contents of
INFORMATION_SCHEMA.INNODB_CMP
under a light workload.
The only compressed page size that the buffer pool contains is
8K. Compressing or uncompressing pages has consumed less than
a second since the time the statistics were reset, because the
columns COMPRESS_TIME
and
UNCOMPRESS_TIME
are zero.
page size | compress ops | compress ops ok | compress time | uncompress ops | uncompress time |
---|---|---|---|---|---|
1024 | 0 | 0 | 0 | 0 | 0 |
2048 | 0 | 0 | 0 | 0 | 0 |
4096 | 0 | 0 | 0 | 0 | 0 |
8192 | 1048 | 921 | 0 | 61 | 0 |
16384 | 0 | 0 | 0 | 0 | 0 |
According to INNODB_CMPMEM
, there
are 6169 compressed 8KB pages in the
buffer pool. The only
other allocated block size is 64 bytes. The smallest
PAGE_SIZE
in
INNODB_CMPMEM
is used for block
descriptors of those compressed pages for which no
uncompressed page exists in the buffer pool. We see that there
are 5910 such pages. Indirectly, we see that 259 (6169-5910)
compressed pages also exist in the buffer pool in uncompressed
form.
The following table shows the contents of
INFORMATION_SCHEMA.INNODB_CMPMEM
under a light workload.
Some memory is unusable due to fragmentation of the memory
allocator for compressed pages:
SUM(PAGE_SIZE*PAGES_FREE)=6784
. This is
because small memory allocation requests are fulfilled by
splitting bigger blocks, starting from the 16K blocks that are
allocated from the main buffer pool, using the buddy
allocation system. The fragmentation is this low because some
allocated blocks have been relocated (copied) to form bigger
adjacent free blocks. This copying of
SUM(PAGE_SIZE*RELOCATION_OPS)
bytes has
consumed less than a second
(SUM(RELOCATION_TIME)=0)
.
Traduction non disponible
Le manuel MySQL n'est pas encore traduit en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Document créé le 26/06/2006, dernière modification le 26/10/2018
Source du document imprimé : https://www.gaudry.be/mysql-rf-innodb-information-schema-examples-compression-sect.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.