Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add YCSB-A, B, D, E, and F workloads #65

Merged
merged 4 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 32 additions & 2 deletions betree/haura-benchmarks/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,36 @@ function ci() {
run "$RUN_IDENT" switchover_small switchover 4 "$((128 * 1024 * 1024))"
}

function ycsb() {
function ycsb_a() {
run "$RUN_IDENT" ycsb_a_block ycsb-a "$((8 * 1024 * 1024 * 1024))" 0 8
run "$RUN_IDENT" ycsb_a_memory ycsb-a "$((8 * 1024 * 1024 * 1024))" 1 8
}

function ycsb_b() {
run "$RUN_IDENT" ycsb_b_block ycsb-b "$((8 * 1024 * 1024 * 1024))" 0 8
run "$RUN_IDENT" ycsb_b_memory ycsb-b "$((8 * 1024 * 1024 * 1024))" 1 8
}

function ycsb_c() {
run "$RUN_IDENT" ycsb_c_block ycsb-c "$((8 * 1024 * 1024 * 1024))" 0 8
run "$RUN_IDENT" ycsb_c_memory ycsb-c "$((8 * 1024 * 1024 * 1024))" 1 8
}

function ycsb_d() {
run "$RUN_IDENT" ycsb_d_block ycsb-d "$((8 * 1024 * 1024 * 1024))" 0 8
run "$RUN_IDENT" ycsb_d_memory ycsb-d "$((8 * 1024 * 1024 * 1024))" 1 8
}

function ycsb_e() {
run "$RUN_IDENT" ycsb_e_block ycsb-e "$((8 * 1024 * 1024 * 1024))" 0 8
run "$RUN_IDENT" ycsb_e_memory ycsb-e "$((8 * 1024 * 1024 * 1024))" 1 8
}

function ycsb_f() {
run "$RUN_IDENT" ycsb_f_block ycsb-f "$((8 * 1024 * 1024 * 1024))" 0 8
run "$RUN_IDENT" ycsb_f_memory ycsb-f "$((8 * 1024 * 1024 * 1024))" 1 8
}

cargo build --release

if [ -z "$BETREE_CONFIG" ]
Expand Down Expand Up @@ -257,4 +282,9 @@ ensure_config
#checkpoints
#switchover
#ingest
#ycsb
# ycsb_a
# ycsb_b
# ycsb_c
# ycsb_d
# ycsb_e
# ycsb_f
80 changes: 80 additions & 0 deletions betree/haura-benchmarks/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,48 @@ enum Mode {
object_size: u64,
rewrite_count: u64,
},
YcsbA {
size: u64,
kind: u8,
threads: u32,
#[structopt(default_value = "120")]
runtime: u64,
},
YcsbB {
size: u64,
kind: u8,
threads: u32,
#[structopt(default_value = "120")]
runtime: u64,
},
YcsbC {
size: u64,
kind: u8,
threads: u32,
#[structopt(default_value = "120")]
runtime: u64,
},
YcsbD {
size: u64,
kind: u8,
threads: u32,
#[structopt(default_value = "120")]
runtime: u64,
},
YcsbE {
size: u64,
kind: u8,
threads: u32,
#[structopt(default_value = "120")]
runtime: u64,
},
YcsbF {
size: u64,
kind: u8,
threads: u32,
#[structopt(default_value = "120")]
runtime: u64,
},
}

fn run_all(mode: Mode) -> Result<(), Box<dyn Error>> {
Expand Down Expand Up @@ -170,6 +205,24 @@ fn run_all(mode: Mode) -> Result<(), Box<dyn Error>> {
let mut client = control.client(0, b"rewrite");
rewrite::run(&mut client, object_size, rewrite_count)?;
}
Mode::YcsbA {
size,
kind,
threads,
runtime,
} => {
let client = control.kv_client(0);
ycsb::a(client, size, threads as usize, runtime)
}
Mode::YcsbB {
size,
kind,
threads,
runtime,
} => {
let client = control.kv_client(0);
ycsb::b(client, size, threads as usize, runtime)
}
Mode::YcsbC {
size,
kind,
Expand All @@ -179,6 +232,33 @@ fn run_all(mode: Mode) -> Result<(), Box<dyn Error>> {
let client = control.kv_client(0);
ycsb::c(client, size, threads as usize, runtime)
}
Mode::YcsbD {
size,
kind,
threads,
runtime,
} => {
let client = control.kv_client(0);
ycsb::d(client, size, threads as usize, runtime)
}
Mode::YcsbE {
size,
kind,
threads,
runtime,
} => {
let client = control.kv_client(0);
ycsb::e(client, size, threads as usize, runtime)
}
Mode::YcsbF {
size,
kind,
threads,
runtime,
} => {
let client = control.kv_client(0);
ycsb::f(client, size, threads as usize, runtime)
}
}

thread::sleep(Duration::from_millis(2000));
Expand Down
Loading
Loading