-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
c1c3332
commit 6355b48
Showing
6 changed files
with
179 additions
and
252 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.