What version of MongoDB and what engine? WT engines above 3.2 can use Compact to free up space. Previous versions, whether WT or MMAPv1, could only free up space by resynchronizing the replica set. The problem is that there is generally no need to release it in a production environment, because it will be occupied sooner or later, and the free space will be reused anyway. If you are not really short of that space, don't release it. As for whether it is a problem of downtime, it is not just this problem. Most of the time, replica sets should be considered to solve it. Multiple nodes are running in parallel to prepare for no downtime. It will not be a big problem to remove one for maintenance. When you get the main node, it may not be writable for a few seconds.
Theoretically, reclaiming disk space will not have any beneficial impact on performance. However, a bug occurred in the WiredTiger engine used in 3.0.6 and 3.0.7. When a large number of documents were deleted, BTree would have an incorrect balance, resulting in a serious performance degradation. For details, please refer to JIRA Ticket SERVER-21063.
What version of MongoDB and what engine?
WT engines above 3.2 can use Compact to free up space. Previous versions, whether WT or MMAPv1, could only free up space by resynchronizing the replica set.
The problem is that there is generally no need to release it in a production environment, because it will be occupied sooner or later, and the free space will be reused anyway. If you are not really short of that space, don't release it.
As for whether it is a problem of downtime, it is not just this problem. Most of the time, replica sets should be considered to solve it. Multiple nodes are running in parallel to prepare for no downtime. It will not be a big problem to remove one for maintenance. When you get the main node, it may not be writable for a few seconds.
Theoretically, reclaiming disk space will not have any beneficial impact on performance. However, a bug occurred in the WiredTiger engine used in 3.0.6 and 3.0.7. When a large number of documents were deleted, BTree would have an incorrect balance, resulting in a serious performance degradation. For details, please refer to JIRA Ticket SERVER-21063.