From a162dd2e3be16ff9cd56f80f09f83c4b4b7bc959 Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Mon, 17 Feb 2025 14:31:08 -0500 Subject: Thread count sweep --- benchmarks/tail-latency/mixed_workload.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/benchmarks/tail-latency/mixed_workload.cpp b/benchmarks/tail-latency/mixed_workload.cpp index 531d1fa..517ccd8 100644 --- a/benchmarks/tail-latency/mixed_workload.cpp +++ b/benchmarks/tail-latency/mixed_workload.cpp @@ -43,6 +43,8 @@ size_t query_ratio = 3; std::atomic total_res = 0; size_t reccnt = 0; +size_t thrd_cnt = 0; + void operation_thread(Ext *extension, std::vector *queries, std::vector *records) { TIMER_INIT(); @@ -58,7 +60,7 @@ void operation_thread(Ext *extension, std::vector *queries, auto res = extension->query(std::move(q)).get(); TIMER_STOP(); - fprintf(stdout, "Q\t%ld\n", TIMER_RESULT()); + fprintf(stdout, "Q\t%ld\t%ld\n", thrd_cnt, TIMER_RESULT()); total_res.fetch_add(res); @@ -76,7 +78,7 @@ void operation_thread(Ext *extension, std::vector *queries, } TIMER_STOP(); - fprintf(stdout, "I\t%ld\n", TIMER_RESULT()); + fprintf(stdout, "I\t%ld\t%ld\n", thrd_cnt, TIMER_RESULT()); if (idx.load() == reccnt) { inserts_done.store(true); @@ -107,18 +109,23 @@ int main(int argc, char **argv) { std::vector sfs = {8}; //, 4, 8, 16, 32, 64, 128, 256, 512, 1024}; size_t buffer_size = 8000; std::vector policies = { - 0, + 5 }; + std::vector thread_counts = {1, 2, 4, 8, 16, 32}; + reccnt = n; for (auto pol : policies) { - for (size_t i = 0; i < sfs.size(); i++) { - auto policy = get_policy(sfs[i], buffer_size, pol, n); + for (size_t i = 0; i < thread_counts.size(); i++) { + auto policy = get_policy(sfs[0], buffer_size, pol, n); auto config = Conf(std::move(policy)); - config.recon_enable_maint_on_flush = false; - config.recon_maint_disabled = true; + config.recon_enable_maint_on_flush = true; + config.recon_maint_disabled = false; config.buffer_flush_trigger = 4000; + config.maximum_threads = thread_counts[i]; + + thrd_cnt = thread_counts[i]; auto extension = new Ext(std::move(config)); -- cgit v1.2.3