Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mongodb figure out a way to reduce the allocated space for mongo when purging data #15

Open
baldur opened this issue Oct 26, 2015 · 1 comment

Comments

@baldur
Copy link
Contributor

baldur commented Oct 26, 2015

No description provided.

@robhawkes
Copy link
Contributor

Seems that Mongo deliberately keeps hold of disk space even when removing data, as described here: http://blog.mongolab.com/2014/01/managing-disk-space-in-mongodb/

What seems to happen is that the space is kept and reused by Mongo as new data is added, so it's not necessarily a bad thing in normal use. In our testing we've been adding tens of thousands of largish entries before emptying it again, so that caused the DB to grow and grow and grow.

The same article linked above recommends running the compact command or db.repairDatabase() to rewrite and defrag all data (this blocks the database while it runs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants