How to deal with padding factor in documents since the option has been removed?

We’re running v4.2.2 where the option to set/unset the padding factor is removed. What is the default padding? How do we manage that?

For background info, we have a collection that is relatively big (100G), and we suspect the padding is causing it to balloon quickly.

Hello @Fawn ,

Welcome to MongoDB Community! :wave:

Are you referring to Padding as mentioned in this doc?
If yes, then this is specific to MMAPv1 (which was removed in MongoDB 4.2). Modern versions of MongoDB uses WiredTiger as the default storage engine . WiredTiger is different from MMAPv1 and does not use padding.

Apart from the many benefits of a modern storage engine, WiredTiger enables the use of compression. If you are concerned about disk size. By default, it is compressed using snappy. Additionally, you can use alternate compression algorithms such as

  • zlib
  • zstd (Available starting in MongoDB 4.2)

Can you elaborate on what you mean by “balloon quickly”? Is there any metric that you can share?

Lastly, MongoDB v4.2 will be out of support by April 2023 so it is recommended to upgrade to the latest that is MongoDB v6.0.1, please check this documentation for reference. MongoDB v4.4.22 is latest in 4.2 series and 4.2.2 was released in December 2019, so upgrade to v4.2.22 is at least recommended.

Let me know if you have more questions. Happy to Help! :slight_smile:


This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.