Add compression stats and ratio threshold for ZSTD dict#7000
Conversation
There was a problem hiding this comment.
Pull request overview
This PR exposes QList compression statistics via Prometheus, adds a savings-ratio threshold to avoid storing poorly-compressible blobs with the ZSTD dictionary path, and adjusts malloc_size_ tracking during bulk ZSTD dict compression.
Changes:
- Add Prometheus metrics for QList compression attempts and compressed/raw byte counts.
- Add a “30% savings required” ratio gate to reject low-benefit ZSTD dict compression results.
- Switch
CompressWithZstdDictfrom a fullmalloc_size_recomputation loop to per-node delta updates.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/server/server_family.cc |
Exposes QList compression stats as Prometheus metrics. |
src/core/qlist.cc |
Adds ratio-based rejection for ZSTD dict compression and changes how malloc_size_ is updated during bulk compression. |
src/core/qlist_test.cc |
Adds tests covering incompressible-data rejection and stats invariants. |
🤖 Augment PR SummarySummary: Improves QList compression observability and tightens ZSTD-dictionary compression behavior. Changes:
🤖 Was this summary useful? React with 👍 or 👎 |
c940225 to
59e3f8f
Compare
Expose QList compression stats as Prometheus metrics:
- list_compression_attempts{type=total|fail}
- list_compressed_bytes{type=compressed|raw}
Skip storing incompressible blobs by adding a 30% savings
ratio threshold to CompressNodeWithDict. Track attempts
and failures using the existing shared compression counters.
Fix malloc_size_ tracking in CompressWithZstdDict by computing
per-node deltas instead of a full recalculation loop.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Fixed some bugs as well. Results, based on https://github.com/romange/python_queue_benchmark I forked and improved to have also non-python frameworks. TBD: streams - they are being used by some of the frameworks like bullmq and others. |
Summary
list_compression_attempts,list_compressed_bytes)CompressNodeWithDictmalloc_size_tracking inCompressWithZstdDictby computing per-node deltas instead of a second loopFollow-up to #6967.
🤖 Generated with Claude Code