[MDEV-11916] Page compression - use smaller writes, avoid trimming/zeroing rest of the page if possible Created: 2017-01-26  Updated: 2021-10-25

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Fix Version/s: None

Type: Task Priority: Major
Reporter: Vladislav Vaintroub Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Blocks
is blocked by MDEV-18644 Support FULL_CRC32 for compressed pages. Closed
Relates
relates to MDEV-16526 Overhaul the InnoDB page flushing Closed
relates to MDEV-11068 Review which innodb_compression_algor... Closed

 Description   

In page compression, currently the page is compressed and written currently like this
1) page is compressed to size compressed_size

2.a) If trim is used, compressed_size(aligned to file block size) is written. After that, hole is punched after the end of page, of the size (page_size - compressed_size)

b) If trim is not used, single write is done of the full page size (it is padded from compressed_size to the full size with binary zeros)

a) or b) are done every time a page is written. But in many cases, used portion of the page (aka compressed_size) will grow ,as compared to previous page state. In those cases, there is no need to trim already trimmed region, or write binary zeroes over binary zeroes. A small write, of compressed_size would suffice. The small writes can contribute to longer SSD life (if trim is not used), and just reduce the overall written size and improve performance otherwise.



 Comments   
Comment by Marko Mäkelä [ 2019-03-22 ]

MDEV-18644 is explicitly storing the compressed page length within the page frame when innodb_checksum_algorithm=full_crc32 is being used. This should allow a more straightforward implementation.

Generated at Thu Feb 08 07:53:39 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.