AWS Thinkbox Discussion Forums

db fragmentation

Is this an issue we should be worried about?

I see some collections where the data size is 1-200mb, but actual storage size is 5-10gigs. Since we have been fighting mongo issues for a while now, im wondering if fragmentation has been known to cause any problems?

If you run a database repair, that should compact the existing collections and return diskspace back to the operating system. See the Behaviour section here:
docs.mongodb.org/manual/referenc … rDatabase/

I did some googling, and people have reported improved performance after doing a repair to compact their databases, so if you guys can find a window of time for maintenance, it sounds like it might be worth your while.

Cheers,
Ryan

We will bite the bullet and run a compact on the collections. I’ve done so on the secondary replica set member already, and based on the stats, the data vs storage size (for some of the collections) went from 1:100 to 1:1.1. So hopefully that will help.

We did a full compact on all collections, and will monitor if the situation changes.

Privacy | Site terms | Cookie preferences