Replication secondary space utilization higher than primary node space utilization

Hi All,

secondary node disk space is higher than primary node
In my Replication setup (PSA) secondary node having the 600GB space utilization and primary node 564 GB space utilization, help me out.

There can be many reasons for this. For example, the hardware difference, software difference (OS version, db version, library version), or the internal implementation logic.

Database systems are supposedly good at managing disk spaces. Disk blocks can be split/merged/moved around. Many of those will depend on “timing” and can happen at different times on nodes.

I’m not sure 40GB is significant or not for your use case though. Did you notice any data consistency issue? You can also check detailed output of dbstats/collstats or run compact.

1 Like

Hi Kobe thanks for reply!
we maintain same Hardware and version and all are same, i checked db stats and collections stats i found only storageSize is diffrence is there in both node all is remaining same ( no of indexes and avgObjSiz and datasize)and each collections contain same no of doc in both node.

this includes free space. So it might be different. You can check other fields like dataSize or freeStorageSize. From your above comment, it sounds reasonable.

1 Like

@Kobe_W, what you mentioned is relevant if we do not have new objects being added to the collection. If there are new objects being added then the free space should get used on Secondary node however it is seen that both Primary and Secondary usage keeps increasing however the Secondary is around 200GB more as compared to the Primary usage. The total storage size is around 12TB. Please suggest what could be other reasons for this difference?
Some additional information if we switch the primary and secondary nodes within 4 weeks the secondary node (earlier primary with less usage) starts to consume more space as compared to primary.