summaryrefslogtreecommitdiffstats
path: root/benchmarks/tail-latency
diff options
context:
space:
mode:
authorDouglas Rumbaugh <dbr4@psu.edu>2025-02-17 14:31:08 -0500
committerDouglas Rumbaugh <dbr4@psu.edu>2025-02-17 14:31:08 -0500
commita162dd2e3be16ff9cd56f80f09f83c4b4b7bc959 (patch)
tree66459e93f8e2734790c94c45a8d588ac455b3138 /benchmarks/tail-latency
parentf2ee7bef98a10ee52fb4e9e847df0dd173f78d73 (diff)
downloaddynamic-extension-a162dd2e3be16ff9cd56f80f09f83c4b4b7bc959.tar.gz
Thread count sweep
Diffstat (limited to 'benchmarks/tail-latency')
-rw-r--r--benchmarks/tail-latency/mixed_workload.cpp21
1 files 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<size_t> total_res = 0;
size_t reccnt = 0;
+size_t thrd_cnt = 0;
+
void operation_thread(Ext *extension, std::vector<QP> *queries,
std::vector<Rec> *records) {
TIMER_INIT();
@@ -58,7 +60,7 @@ void operation_thread(Ext *extension, std::vector<QP> *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<QP> *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<size_t> sfs = {8}; //, 4, 8, 16, 32, 64, 128, 256, 512, 1024};
size_t buffer_size = 8000;
std::vector<size_t> policies = {
- 0,
+ 5
};
+ std::vector<size_t> 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<Shard, Q>(sfs[i], buffer_size, pol, n);
+ for (size_t i = 0; i < thread_counts.size(); i++) {
+ auto policy = get_policy<Shard, Q>(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));