diff options
| author | Douglas Rumbaugh <dbr4@psu.edu> | 2025-06-02 19:54:15 -0400 |
|---|---|---|
| committer | Douglas Rumbaugh <dbr4@psu.edu> | 2025-06-02 19:54:15 -0400 |
| commit | 6088ede2b5a8f580f78d4422162d423a7a11f520 (patch) | |
| tree | 9124cab872af7a02209c3af758d4a4bf95b1aa26 /benchmarks/tail-latency | |
| parent | 7f0acb5dc66cc93045ab0e40ebd5570388f9102b (diff) | |
| download | dynamic-extension-6088ede2b5a8f580f78d4422162d423a7a11f520.tar.gz | |
updates
Diffstat (limited to 'benchmarks/tail-latency')
| -rw-r--r-- | benchmarks/tail-latency/btree_insert_dist.cpp | 2 | ||||
| -rw-r--r-- | benchmarks/tail-latency/fixed_shard_count.cpp | 19 | ||||
| -rw-r--r-- | benchmarks/tail-latency/insert_query_threads.cpp | 4 | ||||
| -rw-r--r-- | benchmarks/tail-latency/isam_insert_dist.cpp | 107 | ||||
| -rw-r--r-- | benchmarks/tail-latency/knn_query_parm_sweep.cpp | 14 | ||||
| -rw-r--r-- | benchmarks/tail-latency/query_parm_sweep.cpp | 8 | ||||
| -rw-r--r-- | benchmarks/tail-latency/selectivity_sweep.cpp | 4 | ||||
| -rw-r--r-- | benchmarks/tail-latency/standard_latency_dist.cpp | 18 |
8 files changed, 39 insertions, 137 deletions
diff --git a/benchmarks/tail-latency/btree_insert_dist.cpp b/benchmarks/tail-latency/btree_insert_dist.cpp index af60819..e1d171d 100644 --- a/benchmarks/tail-latency/btree_insert_dist.cpp +++ b/benchmarks/tail-latency/btree_insert_dist.cpp @@ -45,7 +45,7 @@ int main(int argc, char **argv) { auto queries = read_range_queries<QP>(q_fname, .0001); /* warmup structure w/ 10% of records */ - size_t warmup = .1 * n; + size_t warmup = .3 * n; for (size_t i=0; i<warmup; i++) { btree.insert(data[i]); } diff --git a/benchmarks/tail-latency/fixed_shard_count.cpp b/benchmarks/tail-latency/fixed_shard_count.cpp index e980bcf..45c62fb 100644 --- a/benchmarks/tail-latency/fixed_shard_count.cpp +++ b/benchmarks/tail-latency/fixed_shard_count.cpp @@ -2,6 +2,7 @@ * */ +#include "framework/scheduling/SerialScheduler.h" #define ENABLE_TIMER #define TS_TEST @@ -9,8 +10,9 @@ #include "framework/DynamicExtension.h" #include "framework/scheduling/FIFOScheduler.h" -#include "shard/TrieSpline.h" +#include "shard/ISAMTree.h" #include "query/rangecount.h" +#include "framework/util/Configuration.h" #include "framework/interface/Record.h" #include "file_util.h" #include "standard_benchmarks.h" @@ -23,10 +25,11 @@ typedef de::Record<uint64_t, uint64_t> Rec; -typedef de::TrieSpline<Rec> Shard; +typedef de::ISAMTree<Rec> Shard; typedef de::rc::Query<Shard> Q; -typedef de::DynamicExtension<Shard, Q, de::DeletePolicy::TOMBSTONE, de::FIFOScheduler> Ext; +typedef de::DynamicExtension<Shard, Q, de::DeletePolicy::TOMBSTONE, de::SerialScheduler> Ext; typedef Q::Parameters QP; +typedef de::DEConfiguration<Shard, Q, de::DeletePolicy::TOMBSTONE, de::SerialScheduler> Conf; void usage(char *progname) { fprintf(stderr, "%s reccnt datafile queryfile\n", progname); @@ -52,10 +55,16 @@ int main(int argc, char **argv) { for (size_t i=0; i<shard_counts.size(); i++) { auto policy = get_policy<Shard, Q>(shard_counts[i], buffer_size, 4, n); - auto extension = new Ext(std::move(policy)); + auto config = Conf(std::move(policy)); + config.recon_enable_maint_on_flush = false; + config.recon_maint_disabled = true; + config.buffer_flush_trigger = 4000; + config.maximum_threads = 8; + + auto extension = new Ext(std::move(config)); /* warmup structure w/ 10% of records */ - size_t warmup = .1 * n; + size_t warmup = .3 * n; for (size_t i=0; i<warmup; i++) { while (!extension->insert(data[i])) { usleep(1); diff --git a/benchmarks/tail-latency/insert_query_threads.cpp b/benchmarks/tail-latency/insert_query_threads.cpp index 3f78f16..cb4b81b 100644 --- a/benchmarks/tail-latency/insert_query_threads.cpp +++ b/benchmarks/tail-latency/insert_query_threads.cpp @@ -106,11 +106,11 @@ int main(int argc, char **argv) { auto queries = read_sosd_point_lookups<QP>(q_fname, 100); size_t buffer_size = 8000; - std::vector<size_t> policies = {6}; + std::vector<size_t> policies = {0}; std::vector<size_t> thread_counts = {32}; std::vector<size_t> modifiers = {0}; std::vector<size_t> scale_factors = {6}; - std::vector<double> rate_limits = {1, 0.9999, 0.999, 0.99, 0.9, 0.85, 0.8}; + std::vector<double> rate_limits = {1}; size_t insert_threads = 1; size_t query_threads = 1; diff --git a/benchmarks/tail-latency/isam_insert_dist.cpp b/benchmarks/tail-latency/isam_insert_dist.cpp deleted file mode 100644 index 88d37c5..0000000 --- a/benchmarks/tail-latency/isam_insert_dist.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/* - * - */ - -#include "framework/scheduling/FIFOScheduler.h" -#define ENABLE_TIMER -#define TS_TEST - -#include <thread> - -#include "framework/DynamicExtension.h" -#include "shard/ISAMTree.h" -#include "query/rangecount.h" -#include "framework/interface/Record.h" -#include "file_util.h" -#include "standard_benchmarks.h" - -#include <gsl/gsl_rng.h> - -#include "psu-util/timer.h" - - -typedef de::Record<uint64_t, uint64_t> Rec; -typedef de::ISAMTree<Rec>Shard; -typedef de::rc::Query<Shard> Q; -typedef de::DynamicExtension<Shard, Q, de::DeletePolicy::TOMBSTONE, de::FIFOScheduler> Ext; -typedef Q::Parameters QP; - -void usage(char *progname) { - fprintf(stderr, "%s reccnt datafile queryfile\n", progname); -} - -int main(int argc, char **argv) { - - if (argc < 4) { - usage(argv[0]); - exit(EXIT_FAILURE); - } - - size_t n = atol(argv[1]); - std::string d_fname = std::string(argv[2]); - std::string q_fname = std::string(argv[3]); - - - auto data = read_sosd_file<Rec>(d_fname, n); - auto queries = read_range_queries<QP>(q_fname, .0001); - - std::vector<int> policies = {3}; - std::vector<size_t> buffers = {8000, 16000, 32000}; - std::vector<size_t> sfs = {8}; - - for (size_t l=0; l<policies.size(); l++) { - for (size_t j=0; j<buffers.size(); j++) { - for (size_t k=0; k<sfs.size(); k++) { - auto policy = get_policy<Shard, Q>(sfs[k], buffers[j], policies[l]); - auto extension = new Ext(policy, buffers[j]/4, buffers[j]); - - /* warmup structure w/ 10% of records */ - size_t warmup = .1 * n; - for (size_t i=0; i<warmup; i++) { - while (!extension->insert(data[i])) { - usleep(1); - } - } - - extension->await_next_epoch(); - - TIMER_INIT(); - - for (size_t i=warmup; i<data.size(); i++) { - TIMER_START(); - while (!extension->insert(data[i])) { - usleep(1); - } - TIMER_STOP(); - - //fprintf(stdout, "%ld\t%ld\t%d\t%ld\n", sfs[k], buffers[j], policies[l], TIMER_RESULT()); - } - - extension->await_next_epoch(); - - /* repeat the queries a bunch of times */ - for (size_t l=0; l<10; l++) { - for (size_t i=0; i<queries.size(); i++) { - TIMER_START(); - auto q = queries[i]; - auto res = extension->query(std::move(q)); - res.get(); - TIMER_STOP(); - - fprintf(stdout, "%ld\t%ld\t%d\t%ld\n", sfs[k], buffers[j], policies[l], TIMER_RESULT()); - } - } - - - QP p = {0, 10000}; - auto res =extension->query(std::move(p)); - - fprintf(stderr, "%ld\n", res.get()); - extension->await_next_epoch(); - delete extension; - }}} - - - fflush(stderr); -} - diff --git a/benchmarks/tail-latency/knn_query_parm_sweep.cpp b/benchmarks/tail-latency/knn_query_parm_sweep.cpp index dfd713d..1766c74 100644 --- a/benchmarks/tail-latency/knn_query_parm_sweep.cpp +++ b/benchmarks/tail-latency/knn_query_parm_sweep.cpp @@ -105,14 +105,14 @@ int main(int argc, char **argv) { //auto queries =read_sosd_point_lookups<QP>(q_fname, 1); auto data = read_vector_file<Rec, W2V_SIZE>(d_fname, n); - auto queries = read_knn_queries<QP>(q_fname, 15, 1); + auto queries = read_knn_queries<QP>(q_fname, 100, 1); - size_t buffer_size = 8000; - std::vector<size_t> policies = {0}; + size_t buffer_size = 1000; + std::vector<size_t> policies = {0, 1}; std::vector<size_t> thread_counts = {8}; std::vector<double> modifiers = {0}; - std::vector<size_t> scale_factors = {2, 4, 6, 8, 10}; + std::vector<size_t> scale_factors = {2, 4, 6, 8, 16, 32, 128}; size_t insert_threads = 1; size_t query_threads = 1; @@ -171,14 +171,14 @@ int main(int argc, char **argv) { extension->await_version(); /* run some queries to "warm up" the cache */ - for (size_t i=0; i<queries.size()*2; i++) { + for (size_t i=0; i<queries.size()*5; i++) { auto q_idx = i % queries.size(); auto q = queries[q_idx]; auto res = extension->query(std::move(q)).get(); total_res.fetch_add(res.size()); } - total_query_count.store(100000); + total_query_count.store(5000); TIMER_INIT(); TIMER_START(); for (size_t i=0; i<total_query_count; i++) { @@ -200,7 +200,7 @@ int main(int argc, char **argv) { fprintf(stdout, "%ld\t%ld\t%ld\t%lf\t%ld\t%ld\t%ld\t%ld\n", internal_thread_cnt, pol, sf, mod, extension->get_height(), extension->get_shard_count(), insert_tput, query_lat); - extension->print_scheduler_statistics(); + //extension->print_scheduler_statistics(); //extension->print_scheduler_query_data(); //extension->print_structure(); fflush(stdout); diff --git a/benchmarks/tail-latency/query_parm_sweep.cpp b/benchmarks/tail-latency/query_parm_sweep.cpp index 36665a6..f2453aa 100644 --- a/benchmarks/tail-latency/query_parm_sweep.cpp +++ b/benchmarks/tail-latency/query_parm_sweep.cpp @@ -103,11 +103,11 @@ int main(int argc, char **argv) { auto queries =read_sosd_point_lookups<QP>(q_fname, 1); size_t buffer_size = 8000; - std::vector<size_t> policies = {1}; + std::vector<size_t> policies = {0, 1}; std::vector<size_t> thread_counts = {8}; std::vector<double> modifiers = {0}; - std::vector<size_t> scale_factors = {4, 4, 4, 4}; + std::vector<size_t> scale_factors = {2, 4, 6, 8, 16, 32, 64}; size_t insert_threads = 1; size_t query_threads = 1; @@ -195,8 +195,8 @@ int main(int argc, char **argv) { fprintf(stdout, "%ld\t%ld\t%ld\t%lf\t%ld\t%ld\t%ld\t%ld\n", internal_thread_cnt, pol, sf, mod, extension->get_height(), extension->get_shard_count(), insert_tput, query_lat); - extension->print_scheduler_statistics(); - extension->print_scheduler_query_data(); + //extension->print_scheduler_statistics(); + //extension->print_scheduler_query_data(); //extension->print_structure(); fflush(stdout); diff --git a/benchmarks/tail-latency/selectivity_sweep.cpp b/benchmarks/tail-latency/selectivity_sweep.cpp index 77c088b..0fc0f42 100644 --- a/benchmarks/tail-latency/selectivity_sweep.cpp +++ b/benchmarks/tail-latency/selectivity_sweep.cpp @@ -49,13 +49,13 @@ int main(int argc, char **argv) { auto data = read_sosd_file<Rec>(d_fname, n); std::vector<std::vector<QP>> query_sets; - std::vector<double> selectivities = {0, 0.00000001, 0.0000001, 0.000001, 0.00001, 0.0001, 0.001, 0.01, 0.1}; + std::vector<double> selectivities = {0.0000001}; //, 0.000001, 0.00001, 0.0001, 0.001, 0.01, 0.1, .25}; for (auto sel: selectivities) { query_sets.push_back(generate_uniform_range_queries<QP>(100, n, sel)); } - std::vector<size_t> sfs = {2, 4, 8}; //, 4, 8, 16, 32, 64, 128, 256, 512, 1024}; + std::vector<size_t> sfs = {2, 4, 8, 16, 32, 64, 128}; size_t buffer_size = 8000; std::vector<size_t> policies = {0, 1}; diff --git a/benchmarks/tail-latency/standard_latency_dist.cpp b/benchmarks/tail-latency/standard_latency_dist.cpp index 8f1594b..dca02bf 100644 --- a/benchmarks/tail-latency/standard_latency_dist.cpp +++ b/benchmarks/tail-latency/standard_latency_dist.cpp @@ -2,17 +2,18 @@ * */ +#define ENABLE_TIMER +#define TS_TEST + #include "framework/scheduling/SerialScheduler.h" #include "framework/util/Configuration.h" #include "util/types.h" -#define ENABLE_TIMER -#define TS_TEST #include <thread> #include "framework/DynamicExtension.h" #include "framework/scheduling/FIFOScheduler.h" -#include "shard/TrieSpline.h" +#include "shard/ISAMTree.h" #include "query/rangecount.h" #include "framework/interface/Record.h" #include "file_util.h" @@ -26,11 +27,11 @@ typedef de::Record<uint64_t, uint64_t> Rec; -typedef de::TrieSpline<Rec> Shard; +typedef de::ISAMTree<Rec> Shard; typedef de::rc::Query<Shard> Q; -typedef de::DynamicExtension<Shard, Q, de::DeletePolicy::TOMBSTONE, de::FIFOScheduler> Ext; +typedef de::DynamicExtension<Shard, Q, de::DeletePolicy::TOMBSTONE, de::SerialScheduler> Ext; typedef Q::Parameters QP; -typedef de::DEConfiguration<Shard, Q, de::DeletePolicy::TOMBSTONE, de::FIFOScheduler> Conf; +typedef de::DEConfiguration<Shard, Q, de::DeletePolicy::TOMBSTONE, de::SerialScheduler> Conf; void usage(char *progname) { fprintf(stderr, "%s reccnt datafile queryfile\n", progname); @@ -50,9 +51,9 @@ int main(int argc, char **argv) { auto data = read_sosd_file<Rec>(d_fname, n); auto queries = read_range_queries<QP>(q_fname, .0001); - std::vector<size_t> sfs = {2, 3, 4, 5, 6, 7, 8}; //, 4, 8, 16, 32, 64, 128, 256, 512, 1024}; + std::vector<size_t> sfs = {4, 8}; //, 4, 8, 16, 32, 64, 128, 256, 512, 1024}; size_t buffer_size = 8000; - std::vector<size_t> policies = {0, 1, 2}; + std::vector<size_t> policies = {0, 1}; for (auto pol: policies) { for (size_t i=0; i<sfs.size(); i++) { @@ -83,7 +84,6 @@ int main(int argc, char **argv) { for (size_t j=warmup; j<data.size(); j++) { while (!extension->insert(data[j])) { usleep(1); - fprintf(stderr, "insert blocked %ld\r", j); } } TIMER_STOP(); |