Details
-
Task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Morpheus
-
1
-
Magma May 2022
Description
While doing read random benchmark for Magma paper, even when block cache was given ample memory to have a 100% index resident ratio, block cache hit ratio was not reaching 100%. Maximum it reached is 98%. Investigate why.
Attachments
For Gerrit Dashboard: MB-51320 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
172984,1 | MB-51320 magma: Base IndexResidentRatio on BlockCacheBlockSize | master | magma | Status: NEW | 0 | +1 |
The reason is this check.
// BlockCache sizing.
auto bCacheSize = static_cast<size_t>(avail * (1 - cfg.WriteCacheRatio));
if (bCacheSize > usage.IndexBlockSize) {
bCacheSize = usage.IndexBlockSize;
}
We size block cache exactly depending on the index size. But block cache's internal overheads and jemalloc's internal fragmentation could require more memory than what the index size is on disk. Hence we need some buffer space added here so that block cache is able to cache everything when there's ample memory available.