Skip to content

Commit 6fee31f

Browse files
committed
bench: disable the sharded nros benchmark
Signed-off-by: Reto Achermann <[email protected]>
1 parent b1fbc29 commit 6fee31f

File tree

5 files changed

+60
-21
lines changed

5 files changed

+60
-21
lines changed

kernel/tests/s11_rackscale_benchmarks.rs

+7-13
Original file line numberDiff line numberDiff line change
@@ -804,12 +804,12 @@ fn rackscale_memcached_checkout() {
804804
}
805805

806806
println!(
807-
"CHECKOUT fe0eb024882481717efd6a3f4600e96c99ca77a2 {:?}",
807+
"CHECKOUT 0d90d53b99c3890b6e47efe08446e5180711ff09 {:?}",
808808
out_dir
809809
);
810810

811811
let res = Command::new("git")
812-
.args(&["checkout", "fe0eb024882481717efd6a3f4600e96c99ca77a2"])
812+
.args(&["checkout", "0d90d53b99c3890b6e47efe08446e5180711ff09"])
813813
.current_dir(out_dir_path.as_path())
814814
.output()
815815
.expect("git checkout failed");
@@ -1113,6 +1113,7 @@ fn s11_rackscale_memcached_benchmark_sharded_linux() {
11131113
}
11141114

11151115
#[test]
1116+
#[ignored]
11161117
#[cfg(not(feature = "baremetal"))]
11171118
fn s11_rackscale_memcached_benchmark_sharded_nros() {
11181119
use rexpect::process::signal::Signal::SIGKILL;
@@ -1319,24 +1320,17 @@ fn s11_rackscale_memcached_benchmark_sharded_nros() {
13191320
test.arg = Some(config);
13201321
test.run_dhcpd_for_baseline = true;
13211322
test.is_multi_node = true;
1323+
test.shmem_size = 0;
13221324

1323-
if !is_smoke {
1324-
test.shmem_size = std::cmp::max(
1325-
MEMCACHED_MEM_SIZE_MB * 2,
1326-
testutils::helpers::SHMEM_SIZE * 2,
1327-
);
1328-
}
13291325

13301326
fn cmd_fn(num_cores: usize, num_clients: usize, arg: Option<MemcachedShardedConfig>) -> String {
13311327
let config = arg.expect("missing configuration");
13321328
let num_threads = num_cores / num_clients;
13331329

13341330
format!(
1335-
r#"init=memcachedbench.bin initargs={} appcmd='--x-benchmark-no-run --disable-evictions --conn-limit=1024 --threads={} --x-benchmark-mem={} --memory-limit={}'"#,
1336-
num_threads,
1337-
num_threads,
1338-
config.mem_size,
1339-
config.mem_size * 2
1331+
r#"init=memcachedbench.bin initargs={num_threads} appcmd='--x-benchmark-no-run --disable-evictions --conn-limit=1024 --threads={num_threads} --x-benchmark-mem={} --memory-limit={}'"#,
1332+
config.mem_size * 2,
1333+
config.mem_size * 4
13401334
)
13411335
}
13421336

kernel/testutils/src/configs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright © 2021 VMware, Inc. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
33

4-
pub const MEMCACHED_MEM_SIZE_MB: usize = 1 * 1024;
5-
pub const MEMCACHED_NUM_QUERIES: usize = 500_000;
4+
pub const MEMCACHED_MEM_SIZE_MB: usize = 4 * 1024;
5+
pub const MEMCACHED_NUM_QUERIES: usize = 1_000_000;

kernel/testutils/src/runner_args.rs

+46-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ use rexpect::process::wait::WaitStatus;
99
use crate::builder::{BuildArgs, Built, Machine};
1010
use crate::ExitStatus;
1111

12+
/// defines the threshold on when the output is truncated.
13+
const PRINT_NUM_LINES: usize = 100;
14+
1215
/// Different build modes for rackscale
1316
#[derive(Eq, PartialEq, Debug, Clone)]
1417
pub enum RackscaleMode {
@@ -496,10 +499,26 @@ pub fn log_qemu_out(args: &RunnerArgs, output: String) {
496499
log_qemu_out_with_name(Some(args), String::from(""), output)
497500
}
498501

502+
503+
499504
pub fn log_qemu_out_with_name(args: Option<&RunnerArgs>, name: String, output: String) {
500505
if !output.is_empty() {
501506
println!("\n===== QEMU LOG {}=====", name);
502-
println!("{}", &output);
507+
let num_lines = output.lines().count();
508+
509+
if num_lines > PRINT_NUM_LINES {
510+
for l in output.lines().take(PRINT_NUM_LINES / 2) {
511+
println!(" > {}", l);
512+
}
513+
println!(" > ... {} more lines\n", num_lines - PRINT_NUM_LINES);
514+
for l in output.lines().skip(num_lines - PRINT_NUM_LINES / 2) {
515+
println!(" > {}", l);
516+
}
517+
} else {
518+
for l in output.lines() {
519+
println!(" > {l}");
520+
}
521+
}
503522
println!("===== END QEMU LOG {}=====", name);
504523
}
505524
if let Some(nrk_args) = args {
@@ -620,7 +639,32 @@ pub fn wait_for_sigterm_or_successful_exit_no_log(
620639
}
621640
Err(e) => {
622641
log_qemu_args(args);
623-
panic!("Qemu testing failed: {} {}", name, e);
642+
println!("Qemu testing failed: {} ", name);
643+
use rexpect::errors::Error;
644+
use rexpect::errors::ErrorKind::Timeout;
645+
match e {
646+
Error(Timeout(expected, got, timeout), st) => {
647+
println!("Expected: `{expected}`\n");
648+
println!("Got:",);
649+
let count = got.lines().count();
650+
if count > PRINT_NUM_LINES {
651+
for l in got.lines().take(PRINT_NUM_LINES / 2) {
652+
println!(" > {l}");
653+
}
654+
println!(" > ... skipping {} more lines...", count - PRINT_NUM_LINES);
655+
for l in got.lines().skip(count - PRINT_NUM_LINES / 2) {
656+
println!(" > {l}");
657+
}
658+
} else {
659+
for l in got.lines() {
660+
println!(" > {l}");
661+
}
662+
}
663+
}
664+
_ => println!("{e}")
665+
}
666+
667+
panic!("Qemu testing failed");
624668
}
625669
e => {
626670
log_qemu_args(args);

scripts/ci.bash

+3-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ RUST_TEST_THREADS=1 cargo test --test s11* -- s11_rackscale_shmem_vmops_maplat_b
3232
RUST_TEST_THREADS=1 cargo test --test s11* -- s11_rackscale_shmem_fxmark_bench --nocapture
3333
RUST_TEST_THREADS=1 cargo test --test s11* -- s11_rackscale_memcached_benchmark_internal --nocapture
3434
RUST_TEST_THREADS=1 cargo test --test s11* -- s11_rackscale_memcached_benchmark_sharded_linux --nocapture
35-
RUST_TEST_THREADS=1 cargo test --test s11* -- s11_rackscale_memcached_benchmark_sharded_nros --nocapture
35+
# disabled for now as this causes too much issues with running for now
36+
# RUST_TEST_THREADS=1 cargo test --test s11* -- s11_rackscale_memcached_benchmark_sharded_nros --nocapture
3637

3738
# Clone repo
3839
rm -rf gh-pages
@@ -66,7 +67,7 @@ mkdir -p ${DEPLOY_DIR}
6667
mv memcached_benchmark_internal.csv ${DEPLOY_DIR}
6768
mv memcached_benchmark_sharded_*.csv ${DEPLOY_DIR}
6869
gzip ${DEPLOY_DIR}/memcached_benchmark_internal.csv
69-
gzip ${DEPLOY_DIR}/memcached_benchmark_sharded_nros.csv
70+
# gzip ${DEPLOY_DIR}/memcached_benchmark_sharded_nros.csv
7071
gzip ${DEPLOY_DIR}/memcached_benchmark_sharded_linux.csv
7172

7273
# Copy vmops results

usr/rkapps/build.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ fn main() {
138138
.unwrap();
139139

140140
println!(
141-
"CHECKOUT b2a11dee71b5181148830b8869b27742a8ebe96b {:?}",
141+
"CHECKOUT eece690294fbfed418f43034b5dc77290865f8cf {:?}",
142142
out_dir
143143
);
144144
Command::new("git")
145-
.args(&["checkout", "b2a11dee71b5181148830b8869b27742a8ebe96b"])
145+
.args(&["checkout", "eece690294fbfed418f43034b5dc77290865f8cf"])
146146
.current_dir(&Path::new(&out_dir))
147147
.status()
148148
.unwrap();

0 commit comments

Comments
 (0)