mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-27 03:45:11 +00:00
The zstd implementation of `compressor` has a separate decompression and compression context per instance. This is unreasonably wasteful. One decompression buffer and one compression buffer *per shard* is enough. The waste is significant. There might exist thousands of SSTable readers, each containing its own instance of `compressor` with several hundred KiB worth of unneeded buffers. This adds up to gigabytes of wasted memory and gigapascals of allocator pressure. This patch modifies the implementation of zstd_processor so that all its instances on the shard share their contexts. Fixes #11733
6.2 KiB
6.2 KiB