Couchbase compression free disk space requirement

According to old documentation:

“If the amount of available disk space is less than twice the current database size, the compaction process does not take place and a warning is issued in the log.”

Assuming this is still relevant for Couchbase 5.x (I couldn’t find it in the latest docs), I’d like to know whether this requirement is truly for the entire bucket size (or even the entire database) - or rather per vBucket that’s being compacted at a given point in time (since the compaction process happens per vBucket, with only 3 working in parallel by default).

If it’s per compacting vBucket, I’d be less worried about having my single bucket take more than 50% of disk size, which right now I’m wary of and so I keep a very large margin of disk unutilized.

Hello @ran.ziv,

Assuming this is still relevant for Couchbase 5.x

This is still correct for Couchbase Server 5.X.

The recommendation is on the size of the whole bucket as you noted.

The calculation itself to check if compaction has enough space to complete successfully is done per vBucket. In other words compaction will run as long as there is enough space for that one vBucket to be compacted.

since the compaction process happens per vBucket, with only 3 working in parallel by default).

The default setting has been changed to one - for more details see MB-18426

1 Like

Thank you for the clear answer