-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Track Jemalloc external fragmentation to bound the cache
Summary: Currently, size-awareness isn't tracking Jemalloc external fragmentation. And a bad external fragmentation can potentially cause OOM issue. In this diff, we utilize two Jemalloc counters `stats.allocated` and `stats.active` to track the external fragmentation: ``` external fragmentation = stats.active - stats.allocated. ``` the total active object size will be: ``` totalActiveObjSize = totalAllocatedObjSize / stats.allocated * stats.active ``` Also add two Jemalloc counters: - `objcache.jemalloc_active_bytes` - `objcache.jemalloc_allocated_bytes` Reviewed By: therealgymmy, jaesoo-fb Differential Revision: D45460371 fbshipit-source-id: 71b5bc261581d9cc0c2f914237aa3766bf54ff12
- Loading branch information
1 parent
b2785af
commit 94907cc
Showing
4 changed files
with
59 additions
and
0 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
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