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

server/heapprofiler: don't consider "goIdle" memory #37412

Merged
merged 2 commits into from
Jun 3, 2019

Commits on May 28, 2019

  1. server: add the unit to some variables

    Release note: None
    andreimatei committed May 28, 2019
    Configuration menu
    Copy the full SHA
    a63b42d View commit details
    Browse the repository at this point in the history

Commits on May 30, 2019

  1. server/heapprofiler: don't consider "goIdle" memory

    Before this patch we were taking a heap profile once RSS got above 85%
    of system memory and then we wouldn't take another profile until we go
    below it and then again above it. The problem with the RSS is that it
    includes "goIdle" memory (memory allocated from the OS that's not
    actually in use) ; I've seen it be up to several gigs.
    With this patch, we now take a profile every time a new high-water mark
    is reached. The recorded high-water mark is reset once an hour, this way
    ensuring that one big measurement doesn't stop us forever from taking
    another profile. It's simpler and it has a chance of catching some
    further heap increases.
    
    The rationale behind the patch is that we want profiles when the heap is
    large more than when the RSS is large. I'm looking at a case where we
    took a heap profile when the heap was 4.5 gigs with 2 gigs idle and then
    never took one again because of how the heuristic works. And then we
    OOMed when the heap was larger and the idle space was lower, but the RSS
    was about the same. With this patch, we would have taken a profile at a
    more interesting time.
    
    Release note: None
    andreimatei committed May 30, 2019
    Configuration menu
    Copy the full SHA
    f53c14a View commit details
    Browse the repository at this point in the history