Skip to content

Commit

Permalink
bench: more tweaks to run memcached
Browse files Browse the repository at this point in the history
Signed-off-by: Reto Achermann <[email protected]>
  • Loading branch information
achreto committed Oct 11, 2023
1 parent 369b4e2 commit d847eaa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kernel/tests/s11_rackscale_benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ fn s11_rackscale_memcached_benchmark_sharded_nros() {
test.is_multi_node = true;

if !is_smoke {
test.shmem_size = MEMCACHED_MEM_SIZE_MB * 2;
test.shmem_size = std::cmp::min(MEMCACHED_MEM_SIZE_MB * 2, SHMEM_SIZE);
}

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

Expand Down

0 comments on commit d847eaa

Please sign in to comment.