Replies: 1 comment 6 replies
-
Nuance on Navy alignment: navyBlockSize is the alignment when a region gets written to the device. Each region has a memory buffer. By default it is 16MB. The size one item takes in block cache would be 4096+key size + 24 (size of BlockCache::EntryDesc) then aligned to 512. So likely the item ends up taking 4608 bytes. One region would hold 3640 items, meaning that the internal fragmentation in a region is 4096. 4KB in 16MB isn't too bad. Can you share more how T1 and T2 are setup? Such as how the requests are routed and how do you read the item count and eviction counts. |
Beta Was this translation helpful? Give feedback.
-
I am using the following CacheBench configuration I wrote for my custom CacheStressor.
{
"cache_config": {
"cacheSizeMB": 500,
"allocSizes": [4136],
"navySizeClasses": [],
"nvmCachePaths": [
"/users/pbhandar/flash/disk.file"
],
"navyBigHashSizePct": 0,
"navyBlockSize": 4096,
"truncateItemToOriginalAllocSizeInNvm": true,
"nvmCacheSizeMB": 400
},
"test_config": {
"populateItem": true,
"generator": "multi-replay",
"numThreads": 1,
"inputQueueSize": 128,
"processorThreadCount": 8,
"asyncIOTrackerThreadCount": 8,
"traceBlockSizeBytes": 512,
"pageSizeBytes": 4096,
"statPrintDelaySec": 30,
"relativeTiming": true,
"scaleIAT": 100.0,
"diskFilePath": "/users/pbhandar/disk/disk.file",
"replayGeneratorConfig": {
"traceList": ["/users/pbhandar/w103.csv"]
}
}
}
I am replaying a block trace. The size of a page is set to 4096. I had a few questions about configuration and its effect on the system.
The size of each cache request is 4096 bytes. I had to set the allosSizes class for RAM cache to 4136 before the items were being admitted so it seems it took 40 bytes for metadata instead of 31? Also for NVM cache, should I use stack allocation mode and allocate an empty array for class sizes or is there a way to optimize the NVM cache size utilization?
There were around 3.4 million block requests.
blockReqCount=3442095
T1 and T2 were full and had evictions.
t1EvictionCount=4082937
t2EvictionCount=3661448
The size of t1 was 125735 -> 125735 * 4136 bytes -> 520 MB (so slightly more than even allocated?)
t1Size=74161
The size of t2 was 74161->74161 * 4136 bytes -> 306.7 MB (much less than allocated?)
Is there any way I can improve NVM cache size utilization? I know it goes up and down during the experiment but generally I see it around 70%, for even larger NVM sizes like 1.5GB.
Beta Was this translation helpful? Give feedback.
All reactions