Skip to content

Commit bc71876

Browse files
Pranav Bhandarifacebook-github-bot
Pranav Bhandari
authored andcommitted
Add cachebench test configs with large cache size
Summary: We ran the following configuration configuration on CacheBench on a machine with 1.2TB of RAM to test if we can create large caches using the 5-byte compressed pointer. This we ran on T2: ===JSON Config=== { "cache_config": { "cacheSizeMB": 820616, "allocSizes": [4194304], "allocator": "LRU5B2Q" }, "test_config": { "name": "stressor", "enableLookaside": true, "getRatio": 0.7684563460126871, "keySizeRange": [ 1, 8, 64 ], "keySizeRangeProbability": [ 0.3, 0.7 ], "loneGetRatio": 0.2315436539873129, "numKeys": 1000000, "numOps": 5000000, "numThreads": 32, "valSizeRange": [ 4190000, 4194000 ], "valSizeRangeProbability": [ 1.0 ] } } Welcome to FB-internal version of cachebench Created 885,900 keys in 0.00 mins Generating 160.00M sampled accesses Generated access patterns in 0.02 mins Total 160.00M ops to be run 09:30:29 0.00M ops completed. Hit Ratio 0.00% (RAM 0.00%, NVM 0.00%), 0 items in cache 09:31:29 0.70M ops completed. Hit Ratio 13.34% (RAM 13.34%, NVM 0.00%), 205121 items in cache 09:32:29 2.65M ops completed. Hit Ratio 15.54% (RAM 15.54%, NVM 0.00%), 205121 items in cache 09:33:29 4.60M ops completed. Hit Ratio 15.60% (RAM 15.60%, NVM 0.00%), 205121 items in cache Reviewed By: haowu14 Differential Revision: D68662795 fbshipit-source-id: f0e11df50aef4010bbf6ce58d1cc72f12d9cac85
1 parent 41d0173 commit bc71876

File tree

3 files changed

+47
-6
lines changed

3 files changed

+47
-6
lines changed

cachelib/cachebench/runner/ProgressTracker.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@ void ProgressTracker::work() {
5151
auto [overallHitRatio, ramHitRatio, nvmHitRatio] =
5252
currCacheStats.getHitRatios(prevStats_);
5353
auto thStr = folly::sformat(
54-
"{} {:>10.2f}M ops completed. Hit Ratio {:6.2f}% "
55-
"(RAM {:6.2f}%, NVM {:6.2f}%)",
54+
"{} {:>10.2f}M ops completed. {} items in cache. Hit Ratio {:6.2f}% "
55+
"(RAM {:6.2f}%, NVM {:6.2f}%).",
5656
buf,
5757
mOpsPerSec,
58+
currCacheStats.numItems,
5859
overallHitRatio,
5960
ramHitRatio,
6061
nvmHitRatio);

cachelib/cachebench/runner/Stressor.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ std::unique_ptr<Stressor> Stressor::makeStressor(
200200
} else if (cacheConfig.allocator == "LRU5B") {
201201
return std::make_unique<AsyncCacheStressor<Lru5BAllocator>>(
202202
cacheConfig, stressorConfig, std::move(generator));
203-
} else if (cacheConfig.allocator == "LRU2Q5B") {
203+
} else if (cacheConfig.allocator == "LRU5B2Q") {
204204
return std::make_unique<AsyncCacheStressor<Lru5B2QAllocator>>(
205205
cacheConfig, stressorConfig, std::move(generator));
206206
}
@@ -214,10 +214,10 @@ std::unique_ptr<Stressor> Stressor::makeStressor(
214214
return std::make_unique<CacheStressor<Lru2QAllocator>>(
215215
cacheConfig, stressorConfig, std::move(generator));
216216
} else if (cacheConfig.allocator == "LRU5B") {
217-
return std::make_unique<AsyncCacheStressor<Lru5BAllocator>>(
217+
return std::make_unique<CacheStressor<Lru5BAllocator>>(
218218
cacheConfig, stressorConfig, std::move(generator));
219-
} else if (cacheConfig.allocator == "LRU2Q5B") {
220-
return std::make_unique<AsyncCacheStressor<Lru5B2QAllocator>>(
219+
} else if (cacheConfig.allocator == "LRU5B2Q") {
220+
return std::make_unique<CacheStressor<Lru5B2QAllocator>>(
221221
cacheConfig, stressorConfig, std::move(generator));
222222
}
223223
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"cache_config": {
3+
"cacheSizeMB": 220616,
4+
"allocSizes": [262144, 524288, 1048576, 4194304],
5+
"allocator": "LRU5B2Q"
6+
},
7+
"test_config":
8+
{
9+
"name": "stressor",
10+
"enableLookaside": true,
11+
"getRatio": 0.7684563460126871,
12+
"keySizeRange": [
13+
1,
14+
8,
15+
64
16+
],
17+
"keySizeRangeProbability": [
18+
0.3,
19+
0.7
20+
],
21+
"loneGetRatio": 0.2315436539873129,
22+
"numKeys": 125000,
23+
"numOps": 600000,
24+
"numThreads": 16,
25+
"valSizeRange": [
26+
260000,
27+
524000,
28+
1040000,
29+
4190000,
30+
4194000
31+
],
32+
"valSizeRangeProbability": [
33+
0.25,
34+
0.25,
35+
0.25,
36+
0.25
37+
]
38+
}
39+
40+
}

0 commit comments

Comments
 (0)