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

Only commit memory on windows when initially claiming the frame #4047

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

benjaminwinger
Copy link
Collaborator

This fixes a fairly significant performance issue on Windows.

I was less familiar with our buffer manager when initially getting it to work on Windows. There's no need to ensure the memory is committed every time we call getFrame.

It was also necessary to skip evicted pages in updateFrameIfPageIsInFrameWithoutLock as it would otherwise segfault from trying to access uncommitted memory (it's not necessary to update them if they're evicted anyway).

Copy link

github-actions bot commented Aug 8, 2024

Benchmark Result

Master commit hash: 670db898a2ccb81823d1e444b349eec13183ceb3
Branch commit hash: 50c464588bdccc49b7a98246132e2cd99928cfe7

Query Group Query Name Mean Time - Commit (ms) Mean Time - Master (ms) Diff
aggregation q24 686.26 685.54 0.72 (0.11%)
aggregation q28 10846.82 11391.03 -544.22 (-4.78%)
filter q14 160.82 160.94 -0.12 (-0.07%)
filter q15 162.46 162.29 0.17 (0.10%)
filter q16 342.82 334.05 8.77 (2.63%)
filter q17 480.33 480.75 -0.41 (-0.09%)
filter q18 1926.79 1954.48 -27.68 (-1.42%)
fixed_size_expr_evaluator q07 571.97 571.37 0.59 (0.10%)
fixed_size_expr_evaluator q08 786.82 788.84 -2.02 (-0.26%)
fixed_size_expr_evaluator q09 793.36 781.47 11.89 (1.52%)
fixed_size_expr_evaluator q10 273.15 272.70 0.44 (0.16%)
fixed_size_expr_evaluator q11 270.88 268.04 2.83 (1.06%)
fixed_size_expr_evaluator q12 268.30 267.62 0.67 (0.25%)
fixed_size_expr_evaluator q13 1497.07 1507.57 -10.50 (-0.70%)
fixed_size_seq_scan q23 152.73 156.53 -3.80 (-2.43%)
join q31 49.38 46.95 2.43 (5.18%)
ldbc_snb_ic q35 3679.68 3609.70 69.98 (1.94%)
ldbc_snb_ic q36 132.34 125.28 7.06 (5.63%)
ldbc_snb_is q32 10.28 10.74 -0.46 (-4.32%)
ldbc_snb_is q33 98.71 96.46 2.25 (2.33%)
ldbc_snb_is q34 98.81 96.66 2.15 (2.22%)
multi-rel multi-rel-large-scan 3007.05 2905.26 101.80 (3.50%)
multi-rel multi-rel-lookup 82.91 78.49 4.42 (5.63%)
multi-rel multi-rel-small-scan 60.51 69.52 -9.01 (-12.96%)
order_by q25 164.52 164.76 -0.25 (-0.15%)
order_by q26 478.12 495.45 -17.33 (-3.50%)
order_by q27 1427.69 1432.58 -4.89 (-0.34%)
scan_after_filter q01 205.16 205.47 -0.31 (-0.15%)
scan_after_filter q02 195.42 197.34 -1.92 (-0.97%)
shortest_path_ldbc100 q39 86.13 82.75 3.38 (4.09%)
var_size_expr_evaluator q03 2101.23 2094.28 6.95 (0.33%)
var_size_expr_evaluator q04 2220.60 2305.32 -84.72 (-3.68%)
var_size_expr_evaluator q05 2699.24 2572.47 126.77 (4.93%)
var_size_expr_evaluator q06 1349.95 1363.64 -13.70 (-1.00%)
var_size_seq_scan q19 1486.87 1492.22 -5.35 (-0.36%)
var_size_seq_scan q20 3211.29 3203.26 8.04 (0.25%)
var_size_seq_scan q21 2452.62 2546.02 -93.40 (-3.67%)
var_size_seq_scan q22 134.82 141.06 -6.24 (-4.43%)

Copy link

codecov bot commented Aug 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.13%. Comparing base (13b20ef) to head (fc621bd).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4047      +/-   ##
==========================================
- Coverage   85.13%   85.13%   -0.01%     
==========================================
  Files        1297     1297              
  Lines       50599    50599              
  Branches     6978     6979       +1     
==========================================
- Hits        43079    43076       -3     
- Misses       7379     7382       +3     
  Partials      141      141              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mewim mewim merged commit 83806ee into master Aug 8, 2024
25 checks passed
@mewim mewim deleted the windows-virtualalloc-opt branch August 8, 2024 16:05
ted-wq-x pushed a commit to ted-wq-x/kuzu that referenced this pull request Nov 14, 2024
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