Normalize heapz data in the size class generator to per-process. - #976
Draft
copybara-service[bot] wants to merge 1 commit into
Draft
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
This gives us a consistent number instead of a total multiplied by some semi-arbitrary sampling factor; it is especially important if we want to estimate external fragmentation, where the model is inherently per-process. We still store the totals, but without multiplying by the sampling factor when collecting (we still store it, and use it to compute the fleet-wide totals), and we store the number of distinct sessions so that we can divide by them in the generator. Note that this changes the meaning of the 0.3 factor in the reuse-distance optimization subtly; it tries to balance memory usage against allocation rates (in itself two different units; bytes and seconds/byte), and the two values are now normalized to both be per-process instead of separately normalized as before. However, the difference is small enough in practice that it outputs the same size classes, and we'll want to adjust this factor in a separate project later, so we keep the same value for now. We could now output per-process usage columns for each size class, but we don't change it at this point. PiperOrigin-RevId: 981649456
copybara-service
Bot
force-pushed
the
test_981649456
branch
from
September 18, 2026 09:27
dd7b09d to
b2ac8f2
Compare
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.
Normalize heapz data in the size class generator to per-process.
This gives us a consistent number instead of a total multiplied
by some semi-arbitrary sampling factor; it is especially important
if we want to estimate external fragmentation, where the model
is inherently per-process.
We still store the totals, but without multiplying by the sampling
factor when collecting (we still store it, and use it to compute
the fleet-wide totals), and we store the number of distinct sessions
so that we can divide by them in the generator.
Note that this changes the meaning of the 0.3 factor in the
reuse-distance optimization subtly; it tries to balance memory usage
against allocation rates (in itself two different units; bytes and
seconds/byte), and the two values are now normalized to both be
per-process instead of separately normalized as before. However,
the difference is small enough in practice that it outputs the same
size classes, and we'll want to adjust this factor in a separate
project later, so we keep the same value for now.
We could now output per-process usage columns for each size class,
but we don't change it at this point.