-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[release/6.0] CreateDump: Only add pages with committed memory #80005
[release/6.0] CreateDump: Only add pages with committed memory #80005
Conversation
Creating a dump against some kernel implementations is committing empty pages with the page probing technique we currently use during memory enumeration. This change uses the `pagemap` API's in the `/proc` system if available - both regarding existence and permissions - along with the `maps` api to decide what pages contain relevant information. This results in smaller dumps and no increase in resident memory usage when collecting a dump. Co-authored-by: Eugene Zhirov <e.zhirov@criteo.com>
Tagging subscribers to this area: @tommcdon Issue DetailsBackport of #79853 to release/7.0, issue #71472 Creating a dump against some kernel implementations is committing empty pages with the page probing technique we currently use during memory enumeration. This change uses the Customer ImpactCustomers have reported memory doubling in processes they dump. This is fatal environments such as K8s and cgroups hosting, where the process of collecting a dump often results of a OOM kill. This makes crash and ad-hoc diagnostics harder than needs be. TestingTBD RiskLow - fallback to prior code paths is enabled.
|
We may want a opt-in/out env variable to control using the page map code. Tom and I briefly talked about this before vacation. /cc: @tommcdon |
Happy to add that as long as it is opt out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved. we will take for consideration in 6.0.x
Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it. |
Backport of #79853 to release/7.0, issue #71472
Creating a dump against some kernel implementations is committing empty pages with the page probing technique we currently use during memory enumeration. This change uses the
pagemap
API's in the/proc
system if available - both regarding existence and permissions - along with themaps
api to decide what pages contain relevant information. This results in smaller dumps and no increase in resident memory usage when collecting a dump.Customer Impact
Customers have reported memory doubling in processes they dump. This is fatal environments such as K8s and cgroups hosting, where the process of collecting a dump often results of a OOM kill. This makes crash and ad-hoc diagnostics harder than needs be.
Testing
TBD
Risk
Low - fallback to prior code paths is enabled. Also, it's possible to explicitly disable the new behavior by setting the env var
DbgDisablePagemapUse
.