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

profiler: Add WithDeltaProfiles() option #1038

Merged
merged 3 commits into from
Nov 21, 2021

Conversation

felixge
Copy link
Member

@felixge felixge commented Oct 28, 2021

Delta profiles require a certain amount of heap memory that is
proportional to MemStats.BuckHashSys (typically ~2x). For applications
that make heavy use of code generation or recursion this memory usage can
be several hundred MB.

Add WithDeltaProfiles() that allows to disable delta profiles for
applications where this is a deal breaker. Those applications will still
see allocation profiles, but they won't be able to aggregate or compare
them.

The default value for WithDeltaProfiles() is true since applications
with high BuckHashSys seem to be rare.

See https://dtdg.co/go-delta-profile-docs for more information about
delta profiles.

Mitigates #1025 and implements PROF-4305.

Delta profiles require a certain amount of heap memory that is
proportional to MemStats.BuckHashSys (typically ~2x). For applications
that make heavy use of code generation or recursion the memory usage can
be several hundred MB.

Add WithDeltaProfiles() that allows to disable delta profiles for
applications where this is a deal breaker. Those applications will still
see allocation profiles, but they won't be able to aggregate or compare
them.

The default value for WithDeltaProfiles() is true since applications
with high BuckHashSys seem to be rare.

See https://dtdg.co/go-delta-profile-docs for more information about
delta profiles.

Mitigates #1025 and implements PROF-4305.
@felixge
Copy link
Member Author

felixge commented Oct 28, 2021

Todo after this gets merged:

  • Update documentation

@felixge felixge added this to the 1.34.0 milestone Oct 28, 2021
Copy link
Contributor

@gbbr gbbr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, feel free to ignore the comment.

profiler/options.go Show resolved Hide resolved
@felixge felixge modified the milestones: 1.34.0, 1.35.0 Nov 8, 2021
@felixge felixge merged commit 7d933ed into v1 Nov 21, 2021
@felixge felixge deleted the felix.geisendoerfer/disable-delta-profiles branch November 21, 2021 13:23
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.

None yet

2 participants