Skip to content

compaction schedule at database level #5512

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

Open
Sdas0000 opened this issue Apr 22, 2025 · 2 comments
Open

compaction schedule at database level #5512

Sdas0000 opened this issue Apr 22, 2025 · 2 comments

Comments

@Sdas0000
Copy link

Summary

Desired Behaviour

Possible Solution

Additional context

@Sdas0000
Copy link
Author

WE have 500 databases own by team 'A' and another 500 databases own by team 'B', we would like to have a different compaction schedule for each database set so that the resource(disk space/CPU etc) can be utilized properly.

@nickva
Copy link
Contributor

nickva commented Apr 22, 2025

Per-db compaction schedule is not something we support.

If the two types of databases have very different sizes could try using min_size / max_size or min_priority / max_priority channel configurations with separate from/to windows size and after removing the default channels (so they don't get picked up by those).

https://docs.couchdb.org/en/stable/config/compaction.html

There is also an un-documented [smoosh.ignore] $shard = true set of settings.

It would look like:

[smoosh.ignore]
shards/50000000-5fffffff/foo.1563328001 = true
shards/... = true

You'd have to list them by shard range, name and creation suffix and then maybe toggle the lists periodically between A and B.

But your best bet might be to just create a custom script call POST _compact for each database based on your specific constraints.

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

No branches or pull requests

2 participants