The Road to CouchDB 3.0: Smarter Compaction Daemon

This is a post in a series about the Apache CouchDB 3.0 release. Check out the other posts in this series.

Much like automatic view index building, database compaction is a maintenance task that needs to run periodically. Unlike automatic view index building, CouchDB has included a Compaction Daemon since 1.x, which saw significant improvements in 2.x.

For 3.x, we are taking this to a whole new level.

The 1.x/2.x compaction daemon works in the most primitive way:

for each database/shard:

  start compaction

  for each design document in database:

    start compaction

That is it. There are some configuration options about when compactions can run, but with the introduction of ioq in 2.x. those have mostly been obsolete.

In CouchDB 3.0, we are introducing Smoosh, again a contribution from Cloudant.

Smoosh lets you define channels for different operations in CouchDB, some databases and view indexes might need compaction more eagerly than others, and you can now configure this every which way you’d need to slice it.

This ensures that your operational CouchDB experience should be a lot smoother.
See the documentation for all available options.

One thought on “The Road to CouchDB 3.0: Smarter Compaction Daemon

  1. The Road to CouchDB 3.0 – CouchDB Blog

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s