3

I'm unable to find out if there is a pagesize in a WiredTiger MongoDB storage engine. I mean some analog of the innodb_page_size for MySQL.

RolandoMySQLDBA
  • 185,223
  • 33
  • 326
  • 536

1 Answers1

2

The parameter I was looking for is referred to as the allocation_size It's WiredTiger parameter. From the documentation

A component of WiredTiger called the Block Manager divides the on-disk pages into smaller chunks called blocks, which then get written to the disk. The size of these blocks is defined by a parameter called allocation_size, which is the underlying unit of allocation for the file the data gets stored in. An application might choose to have data compressed before it gets stored to disk by enabling block compression.

By default, for MongoDB it's equal to 4KB

It could be changed with storage.wiredTiger.collectionConfig.configString, storage.wiredTiger.indexConfig.configString and while create collection.

https://source.wiredtiger.com/11.1.0/tune_page_size_and_comp.html