View compaction keep failing because of not enough disk space

I am trying to compact my views in order to get some more disk space.
However, 1 of 3 nodes keeps failing view compaction because of disk space available.

Cannot compact view my_bucket/_design/my_view/main: the estimated necessary disk space is about 84220756300 bytes but the currently available disk space is 66556180480 bytes.

Compaction is successfully done for the other 2 nodes. How could I solve this issue? Could I never be able to compact that node?
How much disk space should I leave available in order to avoid such issue in the future? Any calculation for necessary disk space for compaction?

FYI,
Couchbase Server: CE 3.0.1
Number of nodes: 3
For each node,
CPU: 4
Memory: 30GB
Disk space: 300GB

Thank you for your time to respond.

Hi,

I’m sorry that you ran into this issue but sizing is a challenging task :slight_smile:

Because CB uses append only storage engine, there’s disk overhead regarding fragmentation and write amplification.

This blog is a great resource to go over some of the consideration for sizing:
http://blog.couchbase.com/how-many-nodes-part-1-introduction-sizing-couchbase-server-20-cluster

Thanks,
Qi

Does this mean I can get that node to compact the view unless I, for example, add more servers to the cluster?

Yes, either add more disk space or add new server will fix the problem.

Thanks,
Qi

1 Like