Skip to content
This repository was archived by the owner on Jul 17, 2025. It is now read-only.

Commit 056cf17

Browse files
committed
more tweak memory sizes
Signed-off-by: Reto Achermann <achreto@gmail.com>
1 parent 8bb9a8f commit 056cf17

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

kernel/tests/s11_rackscale_benchmarks.rs

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,10 @@ fn rackscale_memcached_benchmark(transport: RackscaleTransport) {
624624
test.run_dhcpd_for_baseline = true;
625625

626626
if !is_smoke {
627-
test.shmem_size = std::cmp::min(MEMCACHED_MEM_SIZE_MB * 8, testutils::helpers::SHMEM_SIZE);
627+
test.shmem_size = std::cmp::min(
628+
MEMCACHED_MEM_SIZE_MB * 8,
629+
testutils::helpers::SHMEM_SIZE * 4,
630+
);
628631
}
629632

630633
fn cmd_fn(num_cores: usize, arg: Option<MemcachedInternalConfig>) -> String {
@@ -649,7 +652,11 @@ fn rackscale_memcached_benchmark(transport: RackscaleTransport) {
649652
} else {
650653
// Memory must also be divisible by number of nodes, which could be 1, 2, 3, or 4
651654
// memory = result of this function / num_clients - shmem_size
652-
(8192 + std::cmp::min(MEMCACHED_MEM_SIZE_MB * 8, testutils::helpers::SHMEM_SIZE))
655+
(8192
656+
+ std::cmp::min(
657+
MEMCACHED_MEM_SIZE_MB * 8,
658+
testutils::helpers::SHMEM_SIZE * 4,
659+
))
653660
* (((((num_cores + 1) / 2) + 3 - 1) / 3) * 3)
654661
}
655662
}
@@ -1298,7 +1305,10 @@ fn s11_rackscale_memcached_benchmark_sharded_nros() {
12981305
test.is_multi_node = true;
12991306

13001307
if !is_smoke {
1301-
test.shmem_size = std::cmp::min(MEMCACHED_MEM_SIZE_MB * 8, testutils::helpers::SHMEM_SIZE);
1308+
test.shmem_size = std::cmp::min(
1309+
MEMCACHED_MEM_SIZE_MB * 8,
1310+
testutils::helpers::SHMEM_SIZE * 4,
1311+
);
13021312
}
13031313

13041314
fn cmd_fn(num_cores: usize, arg: Option<MemcachedShardedConfig>) -> String {
@@ -1322,7 +1332,11 @@ fn s11_rackscale_memcached_benchmark_sharded_nros() {
13221332
8192
13231333
} else {
13241334
// Memory must also be divisible by number of nodes, which could be 1, 2, 3, or 4
1325-
(8192 + std::cmp::min(MEMCACHED_MEM_SIZE_MB * 8, testutils::helpers::SHMEM_SIZE))
1335+
(8192
1336+
+ std::cmp::min(
1337+
MEMCACHED_MEM_SIZE_MB * 8,
1338+
testutils::helpers::SHMEM_SIZE * 4,
1339+
))
13261340
* (((((num_cores + 1) / 2) + 3 - 1) / 3) * 3)
13271341
}
13281342
}

0 commit comments

Comments
 (0)