Skip to content

Commit d847eaa

Browse files
committed
bench: more tweaks to run memcached
Signed-off-by: Reto Achermann <[email protected]>
1 parent 369b4e2 commit d847eaa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

kernel/tests/s11_rackscale_benchmarks.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ fn s11_rackscale_memcached_benchmark_sharded_nros() {
12971297
test.is_multi_node = true;
12981298

12991299
if !is_smoke {
1300-
test.shmem_size = MEMCACHED_MEM_SIZE_MB * 2;
1300+
test.shmem_size = std::cmp::min(MEMCACHED_MEM_SIZE_MB * 2, SHMEM_SIZE);
13011301
}
13021302

13031303
fn cmd_fn(num_cores: usize, arg: Option<MemcachedShardedConfig>) -> String {
@@ -1321,7 +1321,8 @@ fn s11_rackscale_memcached_benchmark_sharded_nros() {
13211321
8192
13221322
} else {
13231323
// Memory must also be divisible by number of nodes, which could be 1, 2, 3, or 4
1324-
(2048 + 2 * MEMCACHED_MEM_SIZE_MB) * (((((num_cores + 1) / 2) + 3 - 1) / 3) * 3)
1324+
(4096 + std::cmp::min(MEMCACHED_MEM_SIZE_MB * 2, SHMEM_SIZE))
1325+
* (((((num_cores + 1) / 2) + 3 - 1) / 3) * 3)
13251326
}
13261327
}
13271328

0 commit comments

Comments
 (0)