@@ -24,6 +24,9 @@ use testutils::builder::Machine;
2424use testutils:: rackscale_runner:: { RackscaleBench , RackscaleRun } ;
2525use testutils:: runner_args:: RackscaleTransport ;
2626
27+ use testutils:: configs:: MEMCACHED_MEM_SIZE_MB ;
28+ use testutils:: configs:: MEMCACHED_NUM_QUERIES ;
29+
2730#[ test]
2831#[ cfg( not( feature = "baremetal" ) ) ]
2932fn s11_rackscale_shmem_fxmark_benchmark ( ) {
@@ -138,7 +141,7 @@ fn rackscale_fxmark_benchmark(transport: RackscaleTransport) {
138141 fn timeout_fn ( num_cores : usize ) -> u64 {
139142 180_000 + 5_000 * num_cores as u64
140143 }
141- fn mem_fn ( num_cores : usize , is_smoke : bool ) -> usize {
144+ fn mem_fn ( num_cores : usize , _num_clients : usize , is_smoke : bool ) -> usize {
142145 if is_smoke {
143146 8192
144147 } else {
@@ -302,7 +305,7 @@ fn rackscale_vmops_benchmark(transport: RackscaleTransport, benchtype: VMOpsBenc
302305 fn rackscale_timeout_fn ( num_cores : usize ) -> u64 {
303306 240_000 + 1_000 * num_cores as u64
304307 }
305- fn mem_fn ( num_cores : usize , is_smoke : bool ) -> usize {
308+ fn mem_fn ( num_cores : usize , _num_clients : usize , is_smoke : bool ) -> usize {
306309 if is_smoke {
307310 8192
308311 } else {
@@ -440,7 +443,7 @@ fn s11_rackscale_shmem_leveldb_benchmark() {
440443 240_000 + 500 * num_cores as u64
441444 }
442445
443- fn mem_fn ( num_cores : usize , is_smoke : bool ) -> usize {
446+ fn mem_fn ( num_cores : usize , _num_clients : usize , is_smoke : bool ) -> usize {
444447 if is_smoke {
445448 8192
446449 } else {
@@ -463,9 +466,6 @@ fn s11_rackscale_shmem_leveldb_benchmark() {
463466 bench. run_bench ( false , is_smoke) ;
464467}
465468
466- const MEMCACHED_MEM_SIZE_MB : usize = 16 ;
467- const MEMCACHED_NUM_QUERIES : usize = 1000_000 ;
468-
469469#[ derive( Clone ) ]
470470struct MemcachedInternalConfig {
471471 pub num_queries : usize ,
@@ -625,8 +625,8 @@ fn rackscale_memcached_benchmark(transport: RackscaleTransport) {
625625
626626 if !is_smoke {
627627 test. shmem_size = std:: cmp:: max (
628- MEMCACHED_MEM_SIZE_MB * 8 ,
629- testutils:: helpers:: SHMEM_SIZE * 4 ,
628+ MEMCACHED_MEM_SIZE_MB * 2 ,
629+ testutils:: helpers:: SHMEM_SIZE * 2 ,
630630 ) ;
631631 }
632632
@@ -646,18 +646,20 @@ fn rackscale_memcached_benchmark(transport: RackscaleTransport) {
646646 500_000 + 5_000 * num_cores as u64
647647 }
648648
649- fn mem_fn ( num_cores : usize , is_smoke : bool ) -> usize {
649+ fn mem_fn ( num_cores : usize , num_clients : usize , is_smoke : bool ) -> usize {
650+ let base_memory = if num_cores > 64 { 8192 } else { 4096 } ;
651+
650652 if is_smoke {
651- 8192
653+ base_memory
652654 } else {
653655 // Memory must also be divisible by number of nodes, which could be 1, 2, 3, or 4
654656 // memory = result of this function / num_clients - shmem_size
655- ( 8192
657+ ( base_memory
656658 + std:: cmp:: max (
657- MEMCACHED_MEM_SIZE_MB * 8 ,
658- testutils:: helpers:: SHMEM_SIZE * 4 ,
659+ MEMCACHED_MEM_SIZE_MB * 2 ,
660+ testutils:: helpers:: SHMEM_SIZE * 2 ,
659661 ) )
660- * ( ( ( ( ( num_cores + 1 ) / 2 ) + 3 - 1 ) / 3 ) * 3 )
662+ * num_clients
661663 }
662664 }
663665
@@ -852,7 +854,7 @@ fn s11_rackscale_memcached_benchmark_sharded_linux() {
852854 mem_size : 16 ,
853855 protocol : "tcp" ,
854856 is_local_host : true ,
855- num_threads : 4 ,
857+ num_threads : 8 ,
856858 path : out_dir_path,
857859 }
858860 } else {
@@ -863,7 +865,7 @@ fn s11_rackscale_memcached_benchmark_sharded_linux() {
863865 mem_size : MEMCACHED_MEM_SIZE_MB ,
864866 protocol : "tcp" ,
865867 is_local_host : true ,
866- num_threads : 4 ,
868+ num_threads : 8 ,
867869 path : out_dir_path,
868870 }
869871 } ;
@@ -984,7 +986,7 @@ fn s11_rackscale_memcached_benchmark_sharded_linux() {
984986 config. num_servers = num_nodes;
985987
986988 for num_threads in 1 ..=max_threads_per_node {
987- if ( num_threads != 1 || num_threads != max_threads_per_node) && ( num_threads % 4 != 0 ) {
989+ if ( num_threads != 1 || num_threads != max_threads_per_node) && ( num_threads % 8 != 0 ) {
988990 continue ;
989991 }
990992
@@ -1335,7 +1337,7 @@ fn s11_rackscale_memcached_benchmark_sharded_nros() {
13351337 600_000 + 60_000 * num_cores as u64
13361338 }
13371339
1338- fn mem_fn ( num_cores : usize , is_smoke : bool ) -> usize {
1340+ fn mem_fn ( num_cores : usize , _num_clients : usize , is_smoke : bool ) -> usize {
13391341 if is_smoke {
13401342 8192
13411343 } else {
@@ -1423,7 +1425,7 @@ fn rackscale_monetdb_benchmark(transport: RackscaleTransport) {
14231425 180_000 + 500 * num_cores as u64
14241426 }
14251427
1426- fn mem_fn ( num_cores : usize , is_smoke : bool ) -> usize {
1428+ fn mem_fn ( num_cores : usize , _num_clients : usize , is_smoke : bool ) -> usize {
14271429 if is_smoke {
14281430 8192
14291431 } else {
0 commit comments