Skip to content
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

pkg/storage: change the default ssttable compression algorithm to zstd #123954

Closed
wants to merge 1 commit into from

Conversation

nicktrav
Copy link
Collaborator

In #120784, we now allow for the zstd compression algorithm to be used as the codec for SSTables. Initial testing has shown this algorithm to provide a better compression ratio than snappy, at the cost of a minor increase in CPU. This unlocks benefits such as an improved node density, as more data can reside in each store.

Alter the default SStable compression algorithm to zstd.

Closes #123953.

Release note (performance improvement): The default SSTable compression algorithm was changed from snappy to zstd. The latter has been shown to improve a store's compression ratio at the cost of a minor CPU increase. Existing clusters can opt into this new compression algorithm by setting storage.sstable.compression_algorithm to zstd. Existing SSTables compressed with the snappy compression algorithm will NOT be actively re-written. Instead, as SSTables are re-written over time with the new compression algorithm as existing SSTables are compacted.

Copy link

blathers-crl bot commented May 10, 2024

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

In cockroachdb#120784, we now allow for the `zstd` compression algorithm to be used
as the codec for SSTables. Initial testing has shown this algorithm to
provide a better compression ratio than snappy, at the cost of a minor
increase in CPU. This unlocks benefits such as an improved node density,
as more data can reside in each store.

Alter the default SStable compression algorithm to `zstd`.

Closes cockroachdb#123953.

Release note (performance improvement): The default SSTable compression
algorithm was changed from snappy to zstd. The latter has been shown to
improve a store's compression ratio at the cost of a minor CPU increase.
Existing clusters can opt into this new compression algorithm by setting
`storage.sstable.compression_algorithm` to `zstd`. Existing SSTables
compressed with the snappy compression algorithm will NOT be actively
re-written. Instead, as SSTables are re-written over time with the new
compression algorithm as existing SSTables are compacted.
@nicktrav nicktrav closed this May 15, 2024
@nicktrav nicktrav deleted the nickt.zstd-default branch May 15, 2024 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

storage: alter default cluster setting for sstable compression algorithm
2 participants