-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Compaction
-
None
-
Storage Engines - Foundations
-
None
-
8
At various times we've considered decreasing the leaf page size for collections to 16 KB (possibly changing the default, or possibly just changing the setting for specific collections).
In experimenting with this, I discovered that WT only enables compression adjustment for pages larger than 16 KB.
This means that with a leaf page size larger than 16 KB, WT will fill the page so that after compression the page size is roughly equal to the target size. But for pages of 16 KB (or smaller) WT doesn't do compression adjustment, and just fills the page with 16 KB of data, then compresses and writes it.
As a result we have the odd behavior that with a 20KB leaf_page_max, WT will generate pages of ~20KB. But if you decrease leaf_page_max by 20%, to 16KB, you wind up with much smaller pages.
The comment in the code implies that there isn't enough compression savings in small pages to make this worthwhile. But I'm not convinced, especially for MongoDB collections which typically compress 3-4x.
As a sanity check it would be useful to allow compression adjustment for smaller pages, and then run a couple test workloads with different page sizes and compare the compression ratios. Assuming we still get a decent amount of compression at the 16KB size (at least) we should allow compression adjustment.