Hi all,
I updated a system from MongoDB 4 to MongoDB 5 and observe much larger index sizes in MongoDB 5 than in MongoDB 4. I now run two systems in parallel (one with MongoDB 4 and one with MongoDB 5) and these are my observations for a collection with lots of data:
Mongo 4 | Mongo 5 | |
---|---|---|
count | 1.638.164.323 | 1.096.569.012 |
avgObjSize | 495 | 495 |
indexSizes._id_ | 18.808.434.688 | 39.714.480.128 |
avg indexSizes._id_ | 11 | 36 |
Other indexes also increase, maybe because of the increased space for the _id_
field. What can be the cause of the index growth? The only change in configuration I did was to seperate the database to an own directry (directoryperdb=true
).
Records are inserted to the collection with a rate of about 1000 docs/second and get removed by a TTL-index.
Thanks for any hint
Franz
PS: The update was not a real update. I could just install the new system with MongoDB 5 and start with a fresh database.