summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Rumbaugh <dbr4@psu.edu>2025-04-09 10:55:27 -0400
committerDouglas Rumbaugh <dbr4@psu.edu>2025-04-09 10:55:27 -0400
commit7440266737210c7979178d1747cc3d68594f364f (patch)
tree47e7b6db037438adc14e81a2f4acd383411895f3
parent47c8864758399a83b5a80e2a8a31ea316b06505d (diff)
downloaddynamic-extension-7440266737210c7979178d1747cc3d68594f364f.tar.gz
Disabled early abort for point lookups
I'm having some trouble getting "bad" query performance, so I'm going to try using PLs w/o early abort as a worst-case scenario. This should get the best per-shard performance scaling
-rw-r--r--benchmarks/include/file_util.h26
-rw-r--r--benchmarks/tail-latency/insert_query_threads.cpp17
-rw-r--r--include/query/pointlookup.h2
3 files changed, 36 insertions, 9 deletions
diff --git a/benchmarks/include/file_util.h b/benchmarks/include/file_util.h
index df8d999..a159dbe 100644
--- a/benchmarks/include/file_util.h
+++ b/benchmarks/include/file_util.h
@@ -10,6 +10,7 @@
#include <memory>
#include <sstream>
#include <string>
+#include <type_traits>
#include <vector>
#include "psu-util/progress.h"
@@ -73,6 +74,7 @@ static std::vector<QP> read_range_queries(std::string &fname,
while (fscanf(qf, "%zu%zu%lf\n", &start, &stop, &sel) != EOF) {
if (start < stop && std::abs(sel - selectivity) < 0.00001) {
QP q;
+
q.lower_bound = start;
q.upper_bound = stop;
@@ -85,6 +87,30 @@ static std::vector<QP> read_range_queries(std::string &fname,
}
template <typename QP>
+static std::vector<QP> read_sosd_point_lookups(std::string &fname, size_t n) {
+ std::vector<QP> queries;
+
+ FILE *qf = fopen(fname.c_str(), "r");
+
+ if (!qf) {
+ fprintf(stderr, "ERROR: Failed to open file %s\n", fname.c_str());
+ exit(EXIT_FAILURE);
+ }
+
+ size_t start, stop;
+ double sel;
+ while (fscanf(qf, "%zu%zu%lf\n", &start, &stop, &sel) != EOF && queries.size() < n) {
+ QP q;
+
+ q.search_key= start;
+ queries.push_back(q);
+ }
+ fclose(qf);
+
+ return queries;
+}
+
+template <typename QP>
static std::vector<QP> read_binary_knn_queries(std::string fname, size_t k,
size_t n) {
std::vector<QP> queries;
diff --git a/benchmarks/tail-latency/insert_query_threads.cpp b/benchmarks/tail-latency/insert_query_threads.cpp
index 0d92fde..d5939de 100644
--- a/benchmarks/tail-latency/insert_query_threads.cpp
+++ b/benchmarks/tail-latency/insert_query_threads.cpp
@@ -14,8 +14,8 @@
#include "framework/scheduling/FIFOScheduler.h"
#include "framework/scheduling/SerialScheduler.h"
#include "framework/util/Configuration.h"
-#include "query/rangecount.h"
-#include "shard/TrieSpline.h"
+#include "query/pointlookup.h"
+#include "shard/ISAMTree.h"
#include "standard_benchmarks.h"
#include "util/types.h"
@@ -26,8 +26,8 @@
#include "psu-util/timer.h"
typedef de::Record<uint64_t, uint64_t> Rec;
-typedef de::TrieSpline<Rec> Shard;
-typedef de::rc::Query<Shard> Q;
+typedef de::ISAMTree<Rec> Shard;
+typedef de::pl::Query<Shard> Q;
typedef de::DynamicExtension<Shard, Q, de::DeletePolicy::TOMBSTONE,
de::FIFOScheduler>
Ext;
@@ -64,7 +64,7 @@ void query_thread(Ext *extension, std::vector<QP> *queries) {
TIMER_STOP();
total_query_time.fetch_add(TIMER_RESULT());
- total_res.fetch_add(res);
+ total_res.fetch_add(res.size());
}
}
@@ -99,15 +99,16 @@ int main(int argc, char **argv) {
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);
+ //auto queries = read_range_queries<QP>(q_fname, .0001);
+ auto queries =read_sosd_point_lookups<QP>(q_fname, 100);
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 = {2};
+ std::vector<size_t> policies = {0, 1, 2};
std::vector<size_t> thread_counts = {8};
std::vector<size_t> modifiers = {0};
- std::vector<size_t> scale_factors = {2, 3, 4, 5, 6, 7, 8};
+ std::vector<size_t> scale_factors = {2, 4, 8, 16, 32, 64, 128, 256};
size_t insert_threads = 1;
size_t query_threads = 1;
diff --git a/include/query/pointlookup.h b/include/query/pointlookup.h
index 65cffa7..b42ec85 100644
--- a/include/query/pointlookup.h
+++ b/include/query/pointlookup.h
@@ -41,7 +41,7 @@ public:
typedef std::vector<Wrapped<R>> LocalResultType;
typedef std::vector<R> ResultType;
- constexpr static bool EARLY_ABORT = true;
+ constexpr static bool EARLY_ABORT = false;
constexpr static bool SKIP_DELETE_FILTER = true;
static LocalQuery *local_preproc(S *shard, Parameters *parms) {