couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rogutės Sparnuotos <>
Subject Re: Database size seems off even after compaction runs.
Date Sat, 24 Dec 2011 01:08:46 GMT
Henrik Lundgren (2011-12-23 13:20):
> Ok, so how do I prevent the database from consuming all diskspace in
> the long run?
> I'm developing an application that is quite insert heavy ( about 6 Gb
> / day ), the database is essentially a message inbox.
> I plan to delete obsolete messages in a houskeeping job, but if
> CouchDB will retain the latest revision of all documents I might have
> to reconsider using CouchDB, which is a pity :-(

Yes, deleted documents will stay even after your housekeeping job. But do
understand that the body of an empty deleted document is only this:
  {"_id": <id>, "_rev":<revision>, "_deleted": true}
So the right question would be how much space does an empty deleted
document need?

After a quick test, I would say you need:
~100KB / 1000 properly deleted documents with 1 revision
~200KB / 1000 with 10 revisions
  ~1MB / 1000 with 100 revisions

But I have seen some inconsistencies (bugs?) with higher numbers; don't
have time to look deeper right now.

--  Rogutės Sparnuotos

View raw message