Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow integer packing and unpacking of partial chunks #3681

Merged
merged 16 commits into from
Jun 25, 2024

Conversation

royi-luo
Copy link
Collaborator

@royi-luo royi-luo commented Jun 20, 2024

Description

#2083

Reworked single-value bitpacking/unpacking for int128 to work for all integral types.

Used the above to allow packing of a number of values per page that isn't a multiple of 32 (by packing individual values at the end of each page).

Contributor agreement

@royi-luo royi-luo self-assigned this Jun 20, 2024
src/include/common/utils.h Outdated Show resolved Hide resolved
@royi-luo royi-luo force-pushed the royi/compression-allow-pack-and-unpack-partial-chunk branch 3 times, most recently from 3ea6f03 to b8fb1c1 Compare June 21, 2024 21:06
@royi-luo royi-luo force-pushed the royi/compression-allow-pack-and-unpack-partial-chunk branch from f532892 to 0fff194 Compare June 24, 2024 13:58
@royi-luo
Copy link
Collaborator Author

royi-luo commented Jun 24, 2024

Some database sizes before/after the change (sizes in KB unless stated otherwise):

Dataset Size of data.kz Before Update (KB) Size After Update (KB)
LDBC-SF01 76840 76588
Very-large-serial 976 960
Custom Dataset (Single column int128 with bitwidth 118) 1574716 1458748

@royi-luo
Copy link
Collaborator Author

royi-luo commented Jun 24, 2024

Some database sizes before/after the change (sizes in KB unless stated otherwise):

...

For the ldbc-sf01 dataset, I noticed that the database size is non-deterministic (it fluctuates between runs), @benjaminwinger @ray6080 could one of you explain why this is the case? I do notice that the number of pages goes down though (below is the Comment table as an example)

Before



-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| node_group_id | column_name       | data_type | table_type | start_page_idx | num_pages | num_values | min               | max               | compression            |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0             | id                | INT64     | NODE       | 0              | 171       | 131072     | 32485             | 1099511998032     | INTEGER_BITPACKING[41] |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 1             | id                | INT64     | NODE       | 1783           | 171       | 19971      | 44803             | 1099511980262     | INTEGER_BITPACKING[41] |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0             | id_null           | BOOL      | NODE       | 171            | 4         | 131072     | False             | False             | BOOLEAN_BITPACKING     |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 1             | id_null           | BOOL      | NODE       | 1954           | 4         | 19971      | False             | False             | BOOLEAN_BITPACKING     |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0             | creationDate      | INT64     | NODE       | 175            | 187       | 131072     | 20100118021108230 | 20120913092441121 | INTEGER_BITPACKING[45] |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 1             | creationDate      | INT64     | NODE       | 1958           | 187       | 19971      | 20100130112756641 | 20120913091830176 | INTEGER_BITPACKING[45] |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0             | creationDate_null | BOOL      | NODE       | 362            | 4         | 131072     | False             | False             | BOOLEAN_BITPACKING     |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 1             | creationDate_null | BOOL      | NODE       | 2145           | 4         | 19971      | False             | False             | BOOLEAN_BITPACKING     |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0             | locationIP        | STRING    | NODE       | 366            | 0         | 131072     | 0                 | 0                 | UNCOMPRESSED           |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 1             | locationIP        | STRING    | NODE       | 2149           | 0         | 19971      | 0                 | 0                 | UNCOMPRESSED           |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|                                                                                   .                                                                                   |
|                                                                                   .                                                                                   |
|                                                                                   .                                                                                   |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0             | content_null      | BOOL      | NODE       | 575            | 4         | 131072     | False             | False             | BOOLEAN_BITPACKING     |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 1             | content_null      | BOOL      | NODE       | 2344           | 4         | 19971      | False             | False             | BOOLEAN_BITPACKING     |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0             | content_data      | UINT8     | NODE       | 643            | 1024      | 4010185    | 32                | 239               | UNCOMPRESSED           |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 1             | content_data      | UINT8     | NODE       | 2401           | 1024      | 606893     | 32                | 230               | UNCOMPRESSED           |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0             | content_offset    | UINT64    | NODE       | 1667           | 67        | 43768      | 0                 | 4010102           | INTEGER_BITPACKING[22] |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 1             | content_offset    | UINT64    | NODE       | 3425           | 61        | 6602       | 0                 | 606814            | INTEGER_BITPACKING[20] |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0             | length            | INT32     | NODE       | 1734           | 45        | 131072     | 2                 | 1988              | INTEGER_BITPACKING[11] |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 1             | length            | INT32     | NODE       | 3486           | 32        | 19971      | 2                 | 183               | INTEGER_BITPACKING[8]  |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0             | length_null       | BOOL      | NODE       | 1779           | 4         | 131072     | False             | False             | BOOLEAN_BITPACKING     |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 1             | length_null       | BOOL      | NODE       | 3518           | 4         | 19971      | False             | False             | BOOLEAN_BITPACKING     |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

After

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| node_group_id | column_name       | data_type | table_type | start_page_idx | num_pages | num_values | min               | max               | compression            |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0             | id                | INT64     | NODE       | 0              | 165       | 131072     | 32694             | 1099511997968     | INTEGER_BITPACKING[41] |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 1             | id                | INT64     | NODE       | 1771           | 165       | 19971      | 32485             | 1099511998032     | INTEGER_BITPACKING[41] |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0             | id_null           | BOOL      | NODE       | 165            | 4         | 131072     | False             | False             | BOOLEAN_BITPACKING     |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 1             | id_null           | BOOL      | NODE       | 1936           | 4         | 19971      | False             | False             | BOOLEAN_BITPACKING     |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0             | creationDate      | INT64     | NODE       | 169            | 181       | 131072     | 20100118021108230 | 20120913092441121 | INTEGER_BITPACKING[45] |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 1             | creationDate      | INT64     | NODE       | 1940           | 181       | 19971      | 20100123062025233 | 20120913075301763 | INTEGER_BITPACKING[45] |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0             | creationDate_null | BOOL      | NODE       | 350            | 4         | 131072     | False             | False             | BOOLEAN_BITPACKING     |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 1             | creationDate_null | BOOL      | NODE       | 2121           | 4         | 19971      | False             | False             | BOOLEAN_BITPACKING     |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0             | locationIP        | STRING    | NODE       | 354            | 0         | 131072     | 0                 | 0                 | UNCOMPRESSED           |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 1             | locationIP        | STRING    | NODE       | 2125           | 0         | 19971      | 0                 | 0                 | UNCOMPRESSED           |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|                                                                                   .                                                                                   |
|                                                                                   .                                                                                   |
|                                                                                   .                                                                                   |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0             | content_null      | BOOL      | NODE       | 563            | 4         | 131072     | False             | False             | BOOLEAN_BITPACKING     |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 1             | content_null      | BOOL      | NODE       | 2320           | 4         | 19971      | False             | False             | BOOLEAN_BITPACKING     |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0             | content_data      | UINT8     | NODE       | 631            | 1024      | 3999169    | 32                | 239               | UNCOMPRESSED           |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 1             | content_data      | UINT8     | NODE       | 2377           | 1024      | 617909     | 32                | 226               | UNCOMPRESSED           |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0             | content_offset    | UINT64    | NODE       | 1655           | 67        | 43621      | 0                 | 3998990           | INTEGER_BITPACKING[22] |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 1             | content_offset    | UINT64    | NODE       | 3401           | 61        | 6749       | 0                 | 617795            | INTEGER_BITPACKING[20] |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0             | length            | INT32     | NODE       | 1722           | 45        | 131072     | 2                 | 1988              | INTEGER_BITPACKING[11] |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 1             | length            | INT32     | NODE       | 3462           | 45        | 19971      | 2                 | 1119              | INTEGER_BITPACKING[11] |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0             | length_null       | BOOL      | NODE       | 1767           | 4         | 131072     | False             | False             | BOOLEAN_BITPACKING     |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 1             | length_null       | BOOL      | NODE       | 3507           | 4         | 19971      | False             | False             | BOOLEAN_BITPACKING     |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Copy link

Benchmark Result

Master commit hash: a34055108d1af0577cd1454f198840b0b1e6ce2f
Branch commit hash: 2b475005c2633a891223dae606ed3fd3722a4019

Query Group Query Name Mean Time - Commit (ms) Mean Time - Master (ms) Diff
aggregation q24 648.93 639.92 9.01 (1.41%)
aggregation q28 12390.00 13647.79 -1257.78 (-9.22%)
copy node-Comment 51152.87 N/A N/A
copy node-Forum 5051.43 N/A N/A
copy node-Organisation 1441.45 N/A N/A
copy node-Person 2726.77 N/A N/A
copy node-Place 1528.67 N/A N/A
copy node-Post 19720.52 N/A N/A
copy node-Tag 1330.93 N/A N/A
copy node-Tagclass 1307.92 N/A N/A
copy rel-comment-hasCreator 44925.04 N/A N/A
copy rel-comment-hasTag 66770.28 N/A N/A
copy rel-comment-isLocatedIn 54175.91 N/A N/A
copy rel-containerOf 11398.37 N/A N/A
copy rel-forum-hasTag 2738.23 N/A N/A
copy rel-hasInterest 2045.58 N/A N/A
copy rel-hasMember 36625.33 N/A N/A
copy rel-hasModerator 1091.48 N/A N/A
copy rel-hasType 384.52 N/A N/A
copy rel-isPartOf 404.55 N/A N/A
copy rel-isSubclassOf 173.05 N/A N/A
copy rel-knows 4418.80 N/A N/A
copy rel-likes-comment 76638.86 N/A N/A
copy rel-likes-post 26247.60 N/A N/A
copy rel-organisation-isLocatedIn 192.81 N/A N/A
copy rel-person-isLocatedIn 424.34 N/A N/A
copy rel-post-hasCreator 10969.56 N/A N/A
copy rel-post-hasTag 15581.19 N/A N/A
copy rel-post-isLocatedIn 12214.38 N/A N/A
copy rel-replyOf-comment 44889.55 N/A N/A
copy rel-replyOf-post 35290.55 N/A N/A
copy rel-studyAt 596.75 N/A N/A
copy rel-workAt 665.28 N/A N/A
filter q14 127.78 125.05 2.73 (2.19%)
filter q15 121.49 126.58 -5.09 (-4.02%)
filter q16 306.18 300.64 5.55 (1.85%)
filter q17 451.81 450.03 1.78 (0.40%)
filter q18 1932.45 1932.14 0.32 (0.02%)
fixed_size_expr_evaluator q07 570.96 561.59 9.37 (1.67%)
fixed_size_expr_evaluator q08 799.20 786.18 13.02 (1.66%)
fixed_size_expr_evaluator q09 796.70 783.38 13.32 (1.70%)
fixed_size_expr_evaluator q10 243.82 240.90 2.92 (1.21%)
fixed_size_expr_evaluator q11 237.77 234.29 3.47 (1.48%)
fixed_size_expr_evaluator q12 239.30 233.20 6.09 (2.61%)
fixed_size_expr_evaluator q13 1488.93 1469.58 19.35 (1.32%)
fixed_size_seq_scan q23 114.45 115.89 -1.44 (-1.24%)
join q29 666.78 661.23 5.55 (0.84%)
join q30 1432.50 1436.68 -4.18 (-0.29%)
join q31 8.28 8.50 -0.22 (-2.63%)
ldbc_snb_ic q35 756.27 691.64 64.63 (9.34%)
ldbc_snb_ic q36 37.20 34.44 2.76 (8.01%)
ldbc_snb_is q32 7.53 7.53 0.00 (0.02%)
ldbc_snb_is q33 17.46 15.38 2.08 (13.49%)
ldbc_snb_is q34 5.74 6.29 -0.55 (-8.75%)
order_by q25 128.56 128.05 0.51 (0.40%)
order_by q26 442.22 432.59 9.63 (2.23%)
order_by q27 1386.97 1402.93 -15.96 (-1.14%)
scan_after_filter q01 174.48 167.15 7.33 (4.38%)
scan_after_filter q02 159.77 152.65 7.12 (4.66%)
shortest_path_ldbc100 q39 114.17 49.31 64.86 (131.53%)
var_size_expr_evaluator q03 2056.41 2055.44 0.97 (0.05%)
var_size_expr_evaluator q04 2210.79 2239.14 -28.35 (-1.27%)
var_size_expr_evaluator q05 2622.12 2614.88 7.24 (0.28%)
var_size_expr_evaluator q06 1354.98 1360.08 -5.10 (-0.38%)
var_size_seq_scan q19 1456.70 1459.44 -2.74 (-0.19%)
var_size_seq_scan q20 3045.84 3101.10 -55.26 (-1.78%)
var_size_seq_scan q21 2373.57 2352.36 21.22 (0.90%)
var_size_seq_scan q22 130.22 130.01 0.21 (0.16%)

@royi-luo
Copy link
Collaborator Author

Some database sizes before/after the change (sizes in KB unless stated otherwise):

LDBC-SF01

Before

...

For the ldbc-sf01 dataset, I noticed that the database size is non-deterministic (it fluctuates between runs), @benjaminwinger @ray6080 could one of you explain why this is the case? I do notice that the number of pages goes down though (below is the Comment table as an example)
...

Looks like the non-determinism was due to parallel copies changing how the data is arranged, the numbers have been updated with single-threaded copying.

// TODO(bmwinger): Now I'm a bit confused here. Why do we always need to unpack the chunk
// first?
// Can't we just unpack the chunk if we need to modify only partial of it?
fastunpack(chunkStart, chunk, header.bitWidth);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change should be able to address the comment here. You can do an unaligned pack first (like the one at the end) and then this loop can be modified to remove the unpack and just pack the 32-value chunks (which should be able to be simplified; the looping is a little complicated because it starts and ends at arbitrary points in the chunk, but if its only being used for full chunks the values can just be copied from the srcBuffer into the temporary chunk minus the offset, and then packed, before moving to the next 32-value chunk).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@royi-luo royi-luo force-pushed the royi/compression-allow-pack-and-unpack-partial-chunk branch from 3a5527b to ca96787 Compare June 24, 2024 20:44
@royi-luo royi-luo force-pushed the royi/compression-allow-pack-and-unpack-partial-chunk branch from ca96787 to 80cca78 Compare June 24, 2024 20:46
Copy link
Contributor

@ray6080 ray6080 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can u also report some numbers on COPY? Just want to know if extra paddings will introduce some regression over COPY. The benchmark server is not able to show diff of COPY on ldbc100 right now.

#include "common/utils.h"

namespace kuzu::storage {
namespace {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need L9 here mespace { ? Also L111.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made an anonymous namespace for the internal functions, I can remove if it's not part of our coding standards

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm I don't think we have that convention, but not against adding that either. @benjaminwinger what do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with it. It's similar to making functions static, but somewhat more capable since you can also use it for classes/structs which are local to the translation unit.

@royi-luo royi-luo force-pushed the royi/compression-allow-pack-and-unpack-partial-chunk branch from 80cca78 to c805e5a Compare June 24, 2024 23:36
Copy link

Benchmark Result

Master commit hash: a34055108d1af0577cd1454f198840b0b1e6ce2f
Branch commit hash: 76fc92baa55c5c6fd6eab0578065aa81196ff626

Query Group Query Name Mean Time - Commit (ms) Mean Time - Master (ms) Diff
aggregation q24 656.26 639.92 16.34 (2.55%)
aggregation q28 11395.39 13647.79 -2252.40 (-16.50%)
copy node-Comment 54349.85 N/A N/A
copy node-Forum 4555.00 N/A N/A
copy node-Organisation 1470.06 N/A N/A
copy node-Person 2693.48 N/A N/A
copy node-Place 703.78 N/A N/A
copy node-Post 19480.07 N/A N/A
copy node-Tag 1243.17 N/A N/A
copy node-Tagclass 1215.11 N/A N/A
copy rel-comment-hasCreator 46890.64 N/A N/A
copy rel-comment-hasTag 61245.19 N/A N/A
copy rel-comment-isLocatedIn 47481.71 N/A N/A
copy rel-containerOf 11562.09 N/A N/A
copy rel-forum-hasTag 2837.73 N/A N/A
copy rel-hasInterest 1940.22 N/A N/A
copy rel-hasMember 38015.06 N/A N/A
copy rel-hasModerator 1126.34 N/A N/A
copy rel-hasType 245.26 N/A N/A
copy rel-isPartOf 362.66 N/A N/A
copy rel-isSubclassOf 200.61 N/A N/A
copy rel-knows 4277.30 N/A N/A
copy rel-likes-comment 76414.40 N/A N/A
copy rel-likes-post 26222.22 N/A N/A
copy rel-organisation-isLocatedIn 412.99 N/A N/A
copy rel-person-isLocatedIn 510.35 N/A N/A
copy rel-post-hasCreator 11465.88 N/A N/A
copy rel-post-hasTag 15238.46 N/A N/A
copy rel-post-isLocatedIn 12439.14 N/A N/A
copy rel-replyOf-comment 51708.05 N/A N/A
copy rel-replyOf-post 34746.34 N/A N/A
copy rel-studyAt 528.94 N/A N/A
copy rel-workAt 662.09 N/A N/A
filter q14 127.34 125.05 2.30 (1.84%)
filter q15 127.54 126.58 0.96 (0.75%)
filter q16 303.43 300.64 2.80 (0.93%)
filter q17 453.79 450.03 3.76 (0.84%)
filter q18 1898.73 1932.14 -33.40 (-1.73%)
fixed_size_expr_evaluator q07 571.92 561.59 10.33 (1.84%)
fixed_size_expr_evaluator q08 797.72 786.18 11.54 (1.47%)
fixed_size_expr_evaluator q09 797.11 783.38 13.72 (1.75%)
fixed_size_expr_evaluator q10 244.04 240.90 3.13 (1.30%)
fixed_size_expr_evaluator q11 237.46 234.29 3.17 (1.35%)
fixed_size_expr_evaluator q12 238.20 233.20 5.00 (2.14%)
fixed_size_expr_evaluator q13 1493.28 1469.58 23.70 (1.61%)
fixed_size_seq_scan q23 118.73 115.89 2.84 (2.45%)
join q29 682.99 661.23 21.77 (3.29%)
join q30 1483.05 1436.68 46.37 (3.23%)
join q31 5.37 8.50 -3.14 (-36.88%)
ldbc_snb_ic q35 778.62 691.64 86.98 (12.58%)
ldbc_snb_ic q36 37.03 34.44 2.58 (7.50%)
ldbc_snb_is q32 6.99 7.53 -0.54 (-7.17%)
ldbc_snb_is q33 14.75 15.38 -0.63 (-4.10%)
ldbc_snb_is q34 5.76 6.29 -0.53 (-8.40%)
order_by q25 131.03 128.05 2.98 (2.33%)
order_by q26 449.07 432.59 16.48 (3.81%)
order_by q27 1406.48 1402.93 3.55 (0.25%)
scan_after_filter q01 174.47 167.15 7.31 (4.37%)
scan_after_filter q02 157.93 152.65 5.28 (3.46%)
shortest_path_ldbc100 q39 84.01 49.31 34.70 (70.37%)
var_size_expr_evaluator q03 2057.96 2055.44 2.52 (0.12%)
var_size_expr_evaluator q04 2252.15 2239.14 13.00 (0.58%)
var_size_expr_evaluator q05 2626.94 2614.88 12.06 (0.46%)
var_size_expr_evaluator q06 1364.03 1360.08 3.95 (0.29%)
var_size_seq_scan q19 1456.44 1459.44 -3.00 (-0.21%)
var_size_seq_scan q20 3038.55 3101.10 -62.55 (-2.02%)
var_size_seq_scan q21 2398.02 2352.36 45.66 (1.94%)
var_size_seq_scan q22 128.09 130.01 -1.92 (-1.48%)

@royi-luo royi-luo force-pushed the royi/compression-allow-pack-and-unpack-partial-chunk branch from 7cb1820 to 44f0d81 Compare June 25, 2024 02:12
@royi-luo
Copy link
Collaborator Author

royi-luo commented Jun 25, 2024

Can u also report some numbers on COPY? Just want to know if extra paddings will introduce some regression over COPY. The benchmark server is not able to show diff of COPY on ldbc100 right now.

create node table person (ID INT128, PRIMARY KEY (ID));

Quick performance benchmark on a dataset with 100M nodes:

Action Time On Branch (ms) Time On Master (ms)
COPY (bitwidth 118) 9008.19ms 13006.84ms
MATCH (bitwidth 118) 518.91ms 855.57ms
COPY (bitwidth ~27) 9441.83ms 12276.10ms
MATCH (bitwidth ~27) 308.86ms 1722.66ms

@royi-luo royi-luo force-pushed the royi/compression-allow-pack-and-unpack-partial-chunk branch from 44f0d81 to 4245526 Compare June 25, 2024 02:18
Copy link

Benchmark Result

Master commit hash: a34055108d1af0577cd1454f198840b0b1e6ce2f
Branch commit hash: cab8a642a1f4316029198586f9802df2cd2805a9

Query Group Query Name Mean Time - Commit (ms) Mean Time - Master (ms) Diff
aggregation q24 651.85 639.92 11.93 (1.86%)
aggregation q28 11281.71 13647.79 -2366.08 (-17.34%)
filter q14 126.91 125.05 1.87 (1.49%)
filter q15 131.80 126.58 5.22 (4.12%)
filter q16 306.78 300.64 6.14 (2.04%)
filter q17 459.46 450.03 9.44 (2.10%)
filter q18 1925.30 1932.14 -6.84 (-0.35%)
fixed_size_expr_evaluator q07 564.09 561.59 2.50 (0.45%)
fixed_size_expr_evaluator q08 788.77 786.18 2.59 (0.33%)
fixed_size_expr_evaluator q09 789.86 783.38 6.48 (0.83%)
fixed_size_expr_evaluator q10 244.57 240.90 3.66 (1.52%)
fixed_size_expr_evaluator q11 238.25 234.29 3.96 (1.69%)
fixed_size_expr_evaluator q12 235.59 233.20 2.39 (1.02%)
fixed_size_expr_evaluator q13 1500.57 1469.58 30.99 (2.11%)
fixed_size_seq_scan q23 121.40 115.89 5.51 (4.76%)
join q29 676.55 661.23 15.32 (2.32%)
join q30 1440.68 1436.68 4.00 (0.28%)
join q31 8.04 8.50 -0.46 (-5.44%)
ldbc_snb_ic q35 1083.60 691.64 391.96 (56.67%)
ldbc_snb_ic q36 46.96 34.44 12.52 (36.34%)
ldbc_snb_is q32 7.62 7.53 0.09 (1.21%)
ldbc_snb_is q33 15.54 15.38 0.16 (1.01%)
ldbc_snb_is q34 4.62 6.29 -1.67 (-26.55%)
order_by q25 131.80 128.05 3.76 (2.93%)
order_by q26 445.44 432.59 12.85 (2.97%)
order_by q27 1384.63 1402.93 -18.30 (-1.30%)
scan_after_filter q01 176.51 167.15 9.36 (5.60%)
scan_after_filter q02 161.54 152.65 8.89 (5.83%)
shortest_path_ldbc100 q39 84.44 49.31 35.13 (71.23%)
var_size_expr_evaluator q03 2043.78 2055.44 -11.66 (-0.57%)
var_size_expr_evaluator q04 2231.68 2239.14 -7.46 (-0.33%)
var_size_expr_evaluator q05 2615.73 2614.88 0.85 (0.03%)
var_size_expr_evaluator q06 1343.82 1360.08 -16.26 (-1.20%)
var_size_seq_scan q19 1448.96 1459.44 -10.47 (-0.72%)
var_size_seq_scan q20 3019.31 3101.10 -81.79 (-2.64%)
var_size_seq_scan q21 2345.39 2352.36 -6.97 (-0.30%)
var_size_seq_scan q22 129.01 130.01 -1.00 (-0.77%)

@royi-luo royi-luo force-pushed the royi/compression-allow-pack-and-unpack-partial-chunk branch from c2ceb5f to c45cc9a Compare June 25, 2024 13:37
Copy link

Benchmark Result

Master commit hash: af65b43010436c8f5842ac576f8a7f3b168a946e
Branch commit hash: b6e36ee3ea2c8a3b465c7dcd44f0731411016854

Query Group Query Name Mean Time - Commit (ms) Mean Time - Master (ms) Diff
aggregation q24 658.75 653.10 5.65 (0.87%)
aggregation q28 12029.57 12416.85 -387.28 (-3.12%)
copy node-Comment 51501.50 51075.91 425.59 (0.83%)
copy node-Forum 4754.78 4662.96 91.82 (1.97%)
copy node-Organisation 1472.41 2033.53 -561.12 (-27.59%)
copy node-Person 2593.05 2731.10 -138.05 (-5.05%)
copy node-Place 1328.99 1445.24 -116.25 (-8.04%)
copy node-Post 20221.49 18857.86 1363.63 (7.23%)
copy node-Tag 1369.36 1295.53 73.83 (5.70%)
copy node-Tagclass 791.80 1315.10 -523.30 (-39.79%)
copy rel-comment-hasCreator 45018.70 45448.34 -429.64 (-0.95%)
copy rel-comment-hasTag 60135.63 68756.69 -8621.06 (-12.54%)
copy rel-comment-isLocatedIn 51175.27 47310.23 3865.04 (8.17%)
copy rel-containerOf 11280.01 11382.16 -102.15 (-0.90%)
copy rel-forum-hasTag 2650.40 2665.18 -14.78 (-0.55%)
copy rel-hasInterest 1858.11 2136.01 -277.90 (-13.01%)
copy rel-hasMember 36674.84 37804.43 -1129.59 (-2.99%)
copy rel-hasModerator 1101.47 1018.78 82.69 (8.12%)
copy rel-hasType 369.77 398.25 -28.48 (-7.15%)
copy rel-isPartOf 240.00 311.60 -71.60 (-22.98%)
copy rel-isSubclassOf 260.02 197.92 62.10 (31.38%)
copy rel-knows 4232.55 4380.27 -147.72 (-3.37%)
copy rel-likes-comment 76004.75 75720.20 284.55 (0.38%)
copy rel-likes-post 25965.37 25792.54 172.83 (0.67%)
copy rel-organisation-isLocatedIn 260.18 308.32 -48.14 (-15.61%)
copy rel-person-isLocatedIn 470.42 466.37 4.05 (0.87%)
copy rel-post-hasCreator 11207.14 11322.03 -114.89 (-1.01%)
copy rel-post-hasTag 15104.23 15549.11 -444.88 (-2.86%)
copy rel-post-isLocatedIn 12363.55 12077.81 285.74 (2.37%)
copy rel-replyOf-comment 51526.53 50540.11 986.42 (1.95%)
copy rel-replyOf-post 36511.62 37112.15 -600.53 (-1.62%)
copy rel-studyAt 500.08 564.82 -64.74 (-11.46%)
copy rel-workAt 601.03 592.94 8.09 (1.36%)
filter q14 126.04 127.31 -1.27 (-1.00%)
filter q15 125.33 122.03 3.30 (2.70%)
filter q16 300.09 304.83 -4.74 (-1.55%)
filter q17 448.61 450.24 -1.63 (-0.36%)
filter q18 1873.81 1969.20 -95.39 (-4.84%)
fixed_size_expr_evaluator q07 562.47 571.01 -8.54 (-1.50%)
fixed_size_expr_evaluator q08 801.65 787.59 14.06 (1.79%)
fixed_size_expr_evaluator q09 785.41 802.16 -16.75 (-2.09%)
fixed_size_expr_evaluator q10 240.47 242.42 -1.95 (-0.80%)
fixed_size_expr_evaluator q11 234.47 236.39 -1.92 (-0.81%)
fixed_size_expr_evaluator q12 235.29 237.61 -2.32 (-0.98%)
fixed_size_expr_evaluator q13 1472.79 1463.57 9.21 (0.63%)
fixed_size_seq_scan q23 120.39 114.16 6.23 (5.45%)
join q29 702.76 689.64 13.12 (1.90%)
join q30 1398.16 1466.89 -68.73 (-4.69%)
join q31 7.64 7.72 -0.08 (-1.01%)
ldbc_snb_ic q35 777.24 920.45 -143.21 (-15.56%)
ldbc_snb_ic q36 40.73 37.84 2.90 (7.66%)
ldbc_snb_is q32 6.64 7.80 -1.16 (-14.88%)
ldbc_snb_is q33 16.29 14.62 1.67 (11.40%)
ldbc_snb_is q34 5.63 5.64 -0.01 (-0.18%)
order_by q25 127.98 125.10 2.89 (2.31%)
order_by q26 440.27 432.76 7.51 (1.74%)
order_by q27 1384.00 1420.55 -36.55 (-2.57%)
scan_after_filter q01 173.54 167.00 6.54 (3.91%)
scan_after_filter q02 159.90 151.39 8.52 (5.63%)
shortest_path_ldbc100 q39 137.44 48.91 88.52 (180.97%)
var_size_expr_evaluator q03 2033.38 2078.12 -44.74 (-2.15%)
var_size_expr_evaluator q04 2238.55 2248.52 -9.97 (-0.44%)
var_size_expr_evaluator q05 2582.91 2652.49 -69.58 (-2.62%)
var_size_expr_evaluator q06 1344.60 1375.47 -30.88 (-2.24%)
var_size_seq_scan q19 1461.97 1474.31 -12.34 (-0.84%)
var_size_seq_scan q20 3098.11 3172.37 -74.26 (-2.34%)
var_size_seq_scan q21 2324.50 2399.74 -75.24 (-3.14%)
var_size_seq_scan q22 127.46 131.46 -4.00 (-3.04%)

@royi-luo royi-luo force-pushed the royi/compression-allow-pack-and-unpack-partial-chunk branch from c45cc9a to 811a815 Compare June 25, 2024 14:37
Copy link

Benchmark Result

Master commit hash: af65b43010436c8f5842ac576f8a7f3b168a946e
Branch commit hash: db567405633daf97af5237ed7e4fa21f63b42b5c

Query Group Query Name Mean Time - Commit (ms) Mean Time - Master (ms) Diff
aggregation q24 662.20 653.10 9.11 (1.39%)
aggregation q28 13218.22 12416.85 801.37 (6.45%)
filter q14 124.70 127.31 -2.61 (-2.05%)
filter q15 128.73 122.03 6.70 (5.49%)
filter q16 299.01 304.83 -5.82 (-1.91%)
filter q17 457.51 450.24 7.27 (1.61%)
filter q18 1901.43 1969.20 -67.78 (-3.44%)
fixed_size_expr_evaluator q07 562.69 571.01 -8.32 (-1.46%)
fixed_size_expr_evaluator q08 801.66 787.59 14.07 (1.79%)
fixed_size_expr_evaluator q09 792.47 802.16 -9.68 (-1.21%)
fixed_size_expr_evaluator q10 245.70 242.42 3.28 (1.35%)
fixed_size_expr_evaluator q11 238.56 236.39 2.17 (0.92%)
fixed_size_expr_evaluator q12 236.71 237.61 -0.90 (-0.38%)
fixed_size_expr_evaluator q13 1490.23 1463.57 26.66 (1.82%)
fixed_size_seq_scan q23 121.28 114.16 7.12 (6.24%)
join q29 674.28 689.64 -15.37 (-2.23%)
join q30 1493.31 1466.89 26.42 (1.80%)
join q31 8.46 7.72 0.75 (9.67%)
ldbc_snb_ic q35 788.38 920.45 -132.07 (-14.35%)
ldbc_snb_ic q36 44.97 37.84 7.13 (18.85%)
ldbc_snb_is q32 6.83 7.80 -0.96 (-12.34%)
ldbc_snb_is q33 16.61 14.62 1.99 (13.63%)
ldbc_snb_is q34 5.39 5.64 -0.25 (-4.38%)
order_by q25 127.38 125.10 2.28 (1.82%)
order_by q26 445.10 432.76 12.34 (2.85%)
order_by q27 1393.73 1420.55 -26.82 (-1.89%)
scan_after_filter q01 176.96 167.00 9.96 (5.96%)
scan_after_filter q02 159.35 151.39 7.96 (5.26%)
shortest_path_ldbc100 q39 138.09 48.91 89.18 (182.32%)
var_size_expr_evaluator q03 2040.88 2078.12 -37.25 (-1.79%)
var_size_expr_evaluator q04 2226.25 2248.52 -22.27 (-0.99%)
var_size_expr_evaluator q05 2612.16 2652.49 -40.33 (-1.52%)
var_size_expr_evaluator q06 1333.29 1375.47 -42.19 (-3.07%)
var_size_seq_scan q19 1429.84 1474.31 -44.46 (-3.02%)
var_size_seq_scan q20 3112.95 3172.37 -59.42 (-1.87%)
var_size_seq_scan q21 2380.53 2399.74 -19.21 (-0.80%)
var_size_seq_scan q22 129.39 131.46 -2.07 (-1.57%)

@royi-luo royi-luo merged commit e74352e into master Jun 25, 2024
20 checks passed
@royi-luo royi-luo deleted the royi/compression-allow-pack-and-unpack-partial-chunk branch June 25, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants