[MDEV-16129] InnoDB page compression not working as documented Created: 2018-05-09 Updated: 2022-01-06 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.1.32, 10.2.14 |
| Fix Version/s: | 10.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Guillaume Lefranc | Assignee: | Marko Mäkelä |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 16.04 "Xenial" |
||
| Issue Links: |
|
||||||||||||
| Description |
|
https://mariadb.com/kb/en/library/compression/ says:
I setup page compression with the following directives:
create table statement:
I load data from the original table (original size: 32G). According to statistics, compression occurs:
That's 26G saved by compression, according to the stats. But the resulting .ibd tablespace on disk, and in SHOW TABLE STATUS is exactly the same as the original, uncompressed ibd tablespace (32G). NB. I have tried with lz4 and that hasn't worked either. Please comment. |
| Comments |
| Comment by Vladislav Vaintroub [ 2018-05-09 ] | |
|
I think the stats could be a bit off, and count the same regions twice for example. https://askubuntu.com/questions/269480/why-does-ls-l-output-a-different-size-from-ls-s , the answer discusses how to check the "physical" size rather than just logical | |
| Comment by Guillaume Lefranc [ 2018-05-09 ] | |
|
Yes I am aware of that, I checked df output and usage is the same. I'm quite sure df does report affected size, not perceived size (side note: I am using XFS. I forgot to mention it in the OP but the docs says it should work everywhere) On the stats subject. I am aware that Data_length and Index_length are approximations based on number of pages and may be irrelevant for calculations. | |
| Comment by Vladislav Vaintroub [ 2018-05-09 ] | |
|
Ok, if you checked the physical size and it stays the same, I dunno. Maybe jplindst can explain. | |
| Comment by Guillaume Lefranc [ 2018-05-09 ] | |
|
Yes punching holes works fine:
| |
| Comment by Marko Mäkelä [ 2021-10-25 ] | |
|
I am sorry for the extremely long delay. thiru in
Note: You should never disable innodb_doublewrite. It is needed for safe recovery, perhaps except when you are using innodb_page_size=4k or a special file system or block device that will never allow a write to be interrupted. Normally in Linux, I believe that writes can be terminated at any multiple of 4096 bytes. The I/O latency overhead of the doublewrite buffer was reduced in MariaDB Server 10.5. See also https://smalldatum.blogspot.com/2015/10/wanted-file-system-on-which-innodb.html and MDEV-22839. | |
| Comment by Guillaume Lefranc [ 2021-10-27 ] | |
|
Thanks for updating the issue, I have read NB. doublewrite was just disabled as a test, no worries here! |