fix(profiler): don't double compress non-delta profiles#3918
Merged
Conversation
Our non-delta heap, block, and mutex profiles are getting double-compressed. That is, they are gzip-compressed, and if you decompress them then you get another gzip-compressed blob, which is in turn a compressed pprof file. This is due to a bug introduced by #3529. In that PR we reworked our compression logic in order to support re-compression (into zstd in particular). We incorrectly decided whether a given profile type is a delta profile by just checking whether there are delta values for the profile, without checking whether delta profiling is actually enabled. As a result, when delta profiling is disabled we use the delta profling _enabled_ logic, where we assume the input data is uncomprossed and then gzip-compress it.
BenchmarksBenchmark execution time: 2025-08-26 20:39:42 Comparing candidate commit 62c127f in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 24 metrics, 0 unstable metrics. |
nsrip-dd
marked this pull request as ready for review
August 26, 2025 20:30
felixge
approved these changes
Aug 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Our non-delta heap, block, and mutex profiles are getting
double-compressed. That is, they are gzip-compressed, and if you
decompress them then you get another gzip-compressed blob, which is in
turn a compressed pprof file.
This is due to a bug introduced by #3529. In that PR we reworked our
compression logic in order to support re-compression (into zstd in
particular). We incorrectly decided whether a given profile type is a
delta profile by just checking whether there are delta values for the
profile type, without checking whether delta profiling is actually enabled.
As a result, when delta profiling is disabled we use the delta profling
enabled logic, where we assume the input data is uncomprossed and then
gzip-compress it.