-
Notifications
You must be signed in to change notification settings - Fork 13
[Upstreaming] Added per pool per class used size metrics #70
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
Conversation
1fee456
to
4090a0b
Compare
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.
Reviewable status: 0 of 10 files reviewed, 1 unresolved discussion (waiting on @guptask)
cachelib/allocator/tests/AllocatorHitStatsTest.h
line 398 at r1 (raw file):
ASSERT_EQ(globalCacheStats.poolUsedSize.size(), MemoryPoolManager::kMaxPools); ASSERT_EQ(4521459712, globalCacheStats.poolUsedSize[0]);
please calculate this value based on slab size
6134eec
to
d908f8a
Compare
(cherry picked from commit ea5b3a3)
1c7c5d7
to
242e304
Compare
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.
Reviewable status: 0 of 11 files reviewed, 1 unresolved discussion (waiting on @guptask)
cachelib/allocator/CacheAllocator.h
line 1119 at r2 (raw file):
bool isOnShm() const noexcept { return isOnShm_; } ClassId getAllocClassId(PoolId pid,
I'm not sure if Meta will be OK with adding such functions. Can't we use some existing ones? Some of the tests are also marked as friends of this class, so maybe we could use that?
Previously, igchor (Igor Chorążewicz) wrote…
We can raise the PR as it is here and see what Meta has to say about it. I think having an API approach is cleaner. |
Previously, igchor (Igor Chorążewicz) wrote…
I didn't understand your point. This check was pre-existing. |
This per pool size statistics reports the current size of each memory pool. Existing implementation does not report this statistic accurately. `allocAttempts - allocFailed - regularItemsEvictions - chainedItemsEvictions won't report this value accurately because pool size grows in multiples of block sizes. This statistics will be reported in the final report generated by cachebench.
This change is