From 6bd42f5ce54ee1259298d9839e85056e58b4be6f Mon Sep 17 00:00:00 2001 From: Akash Bilgi <44390281+akashbilgi@users.noreply.github.com> Date: Fri, 3 Mar 2023 23:46:09 -0800 Subject: [PATCH 1/7] fixing issue threads count was reduced to 1 --- example/example1.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/example1.cpp b/example/example1.cpp index 5845314..b175123 100644 --- a/example/example1.cpp +++ b/example/example1.cpp @@ -31,7 +31,7 @@ int main() { } // set the number of threads for parallel bitmap construction - int thread_num = 16; + int thread_num = 1; /* set the number of levels of bitmaps to create, either based on the * query or the JSON records. E.g., query $[*].user.id needs three levels From 236534c11dbde230f69fd8cbf22ffccd0f9b3142 Mon Sep 17 00:00:00 2001 From: Akash Bilgi Date: Tue, 14 Mar 2023 01:19:25 -0700 Subject: [PATCH 2/7] test push --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2a7d372..c6b6aec 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,8 @@ We compared Pison with [RapidJSON](https://github.com/Tencent/rapidjson) and [si All experiments were conducted on two Xeon servers: -- **[Server 1]**: a 16-core machine equipped with two Intel 2.1GHz Xeon E5-2620 v4 CPUs and 64GB RAM. +- **[Server 1]**: a 16-core machine equipped with two Intel 2.1GHz Xeon E5-2620 v4 CPUs and 64GB RAM. +- amend - **[Server 2]**: a 4-core machine equipped with an Intel 3.5GHz Xeon E3-1240 v5 CPUs and 16GB RAM. The following two figures report the exeuction time (including both the index construction and the query evaluation) for bulky JSON record processing. Overall, both Pison and simdjson outperform RapidJSON, thanks to the use of SIMD and bitwise parallelism. The performance of serial Pison is comparable to simdjson, while parallel Pison achieves 5.4X and 3.1X speedups (on average) over simdjson on Server 1 (with 8 threads) and Server 2 (with 4 threads), respectively. From 09ee1fb0a8b54ed48345938bbb666b0d752c69f0 Mon Sep 17 00:00:00 2001 From: Akash Bilgi Date: Tue, 14 Mar 2023 01:51:50 -0700 Subject: [PATCH 3/7] test push2 --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index c6b6aec..6e7a279 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,6 @@ We compared Pison with [RapidJSON](https://github.com/Tencent/rapidjson) and [si All experiments were conducted on two Xeon servers: - **[Server 1]**: a 16-core machine equipped with two Intel 2.1GHz Xeon E5-2620 v4 CPUs and 64GB RAM. -- amend - **[Server 2]**: a 4-core machine equipped with an Intel 3.5GHz Xeon E3-1240 v5 CPUs and 16GB RAM. The following two figures report the exeuction time (including both the index construction and the query evaluation) for bulky JSON record processing. Overall, both Pison and simdjson outperform RapidJSON, thanks to the use of SIMD and bitwise parallelism. The performance of serial Pison is comparable to simdjson, while parallel Pison achieves 5.4X and 3.1X speedups (on average) over simdjson on Server 1 (with 8 threads) and Server 2 (with 4 threads), respectively. From 8f4896bfa457f53bebd220cb44cc0b541b4c3a5a Mon Sep 17 00:00:00 2001 From: Akash Bilgi Date: Tue, 14 Mar 2023 01:55:27 -0700 Subject: [PATCH 4/7] test push3 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e7a279..bfa8112 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ The original idea of JSON structural index construction was proposed in Mison [2 ## Publications [1] Lin Jiang, Junqiao Qiu, Zhijia Zhao. [Scalable Structural Index Construction for JSON Analytics](https://vldb.org/pvldb/vol14/p694-zhao.pdf). PVLDB, 14(4):694-707, 2021. - +TEST [2] Yinan Li, Nikos R. Katsipoulakis, Badrish Chandramouli, Jonathan Goldstein, D. Kossmann. Mison: A Fast JSON Parser for Data Analytics. PVLDB, 10(10): 2017. ## Getting Started From b3da13a0384acdf89e1d5f367fdbb4bebfa1eb2d Mon Sep 17 00:00:00 2001 From: Akash Bilgi Date: Tue, 14 Mar 2023 02:03:48 -0700 Subject: [PATCH 5/7] test push 4 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bfa8112..6e7a279 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ The original idea of JSON structural index construction was proposed in Mison [2 ## Publications [1] Lin Jiang, Junqiao Qiu, Zhijia Zhao. [Scalable Structural Index Construction for JSON Analytics](https://vldb.org/pvldb/vol14/p694-zhao.pdf). PVLDB, 14(4):694-707, 2021. -TEST + [2] Yinan Li, Nikos R. Katsipoulakis, Badrish Chandramouli, Jonathan Goldstein, D. Kossmann. Mison: A Fast JSON Parser for Data Analytics. PVLDB, 10(10): 2017. ## Getting Started From 67f7c6db35165e44952badda700c2677f67e353b Mon Sep 17 00:00:00 2001 From: ubuntu Date: Sat, 18 Mar 2023 16:40:56 -0700 Subject: [PATCH 6/7] fixed the issue --- src/ParallelBitmapIterator.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ParallelBitmapIterator.cpp b/src/ParallelBitmapIterator.cpp index f064018..4a7bdc2 100644 --- a/src/ParallelBitmapIterator.cpp +++ b/src/ParallelBitmapIterator.cpp @@ -26,7 +26,7 @@ CommaPosInfo comma_pos_info[MAX_THREAD]; int num_of_threads = 1; void* generateCommaPositionsInThread(void* arg) { - int thread_id = (int)(*((int*)arg));; + int thread_id = *((int*)arg); int level = comma_pos_info[thread_id].level; long start_pos = comma_pos_info[thread_id].start_pos; long end_pos = comma_pos_info[thread_id].end_pos; @@ -50,10 +50,7 @@ void* generateCommaPositionsInThread(void* arg) { long st = cur_start_pos > (start_pos / 64) ? cur_start_pos : (start_pos / 64); long ed = cur_end_pos < (ceil(double(end_pos) / 64)) ? cur_end_pos : (ceil(double(end_pos) / 64)); for (long i = st; i < ed; ++i) { - unsigned long idx = 0; - if (thread_id >= 1) idx = i - cur_start_pos; - else idx = i; - commabit = levels[idx]; + commabit = levels[thread_id >= 1 ? i - cur_start_pos : i]; int cnt = __builtin_popcountl(commabit); while (commabit) { long offset = i * 64 + __builtin_ctzll(commabit); @@ -62,9 +59,11 @@ void* generateCommaPositionsInThread(void* arg) { } commabit = commabit & (commabit - 1); } - } + } + return NULL; } + void ParallelBitmapIterator::generateCommaPositionsParallel(long start_pos, long end_pos, int level, long* comma_positions, long& top_comma_positions) { // find starting and ending chunks in linked leveled comma bitmaps int start_chunk = -1; From 7795e96f35ed84a11a1900c639a42d5df17b0931 Mon Sep 17 00:00:00 2001 From: ubuntu Date: Sat, 18 Mar 2023 16:42:04 -0700 Subject: [PATCH 7/7] test fix:print thread number --- example/example1.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/example1.cpp b/example/example1.cpp index b175123..9f92565 100644 --- a/example/example1.cpp +++ b/example/example1.cpp @@ -31,7 +31,7 @@ int main() { } // set the number of threads for parallel bitmap construction - int thread_num = 1; + int thread_num = 16; /* set the number of levels of bitmaps to create, either based on the * query or the JSON records. E.g., query $[*].user.id needs three levels @@ -42,6 +42,7 @@ int main() { /* process the input record: first build bitmap, then perform * the query with a bitmap iterator */ + cout<<"Threads used: "<