Why MongoDB have variant fragmented space in a same ReplicaSet members ?

Why MongoDB have variant fragmented space in a same ReplicaSet members ?

When we’ve 3 node replica set (PSS) and do have bulk updates and delete operations, though they’ll be in sync through same OpLog mechanism – why do I see variant fragmented spaces on the all 3 nodes ( E.g., Hard-disk space on Primary – 94% full, Secondary1 – 83% full, Secondary2 – 90% full).

Our understanding is , though they do switches of their status from Primary-Secondary , since they sync from similar operational log – ideally they should have the same fragmentation effect ?

The answer might be ……

Different fragmented spaces are quite possible. Consider during initial sync, data in the node will not be fragmented as much as the node from which it is syncing. That’s why initial sync is recommended to reclaim space.

There may be several other factors like different storage engines in replica set members.

 

How to know MongoDB’s Memory fragmentation ?

MongoDB Fragmentation best practices.

http://dbversity.com/mongodb-to-check-fragmentation-using-a-javascript/

  • Ask Question