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

chore: evaluating mimalloc #16694

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dantengsky
Copy link
Member

@dantengsky dantengsky commented Oct 26, 2024

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

Evaluating minmalloc https://github.com/microsoft/mimalloc (MIT license);

using rs binding https://github.com/purpleprotocol/mimalloc_rust

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe): evaluating mimalloc

This change is Reviewable

@github-actions github-actions bot added the pr-chore this PR only has small changes that no need to record, like coding styles. label Oct 26, 2024
@dantengsky dantengsky added the ci-benchmark-cloud Benchmark: run only cloud tests for tpch/hits label Oct 26, 2024
@sundy-li
Copy link
Member

#98 #9841

@dantengsky
Copy link
Member Author

#98 #9841

got it, let me give it another try : )

Copy link
Contributor

Docker Image for PR

  • tag: pr-16694-d5bbf2a-1729951722

note: this image tag is only available for internal use,
please check the internal doc for more details.

@dantengsky dantengsky added ci-benchmark-cloud Benchmark: run only cloud tests for tpch/hits and removed ci-benchmark-cloud Benchmark: run only cloud tests for tpch/hits labels Oct 27, 2024
Copy link
Contributor

Docker Image for PR

  • tag: pr-16694-517326e-1730034427

note: this image tag is only available for internal use,
please check the internal doc for more details.

Tweaks "feature passing" among dependencies, so that if feature
"jemalloc" is not enabled, binaries will no longer contain symbols of
jemalloc.
Tweaks "feature passing" among dependencies, so that if feature
"jemalloc" is not enabled, binaries will no longer contain symbols of
jemalloc.
@dantengsky
Copy link
Member Author

dantengsky commented Nov 8, 2024

Jemalloc performs marginally better for most TPCH (sf300) queries, Mimalloc, however, shows minor advantages in some queries.

Both allocators show relatively consistent timings across runs, with slight variability but no major outliers.

Environment variables for Mimalloc (not sure if these are optimal ; ):

MIMALLOC_PURGE_DECOMMITS=0 MIMALLOC_USE_NUMA_NODES=1 MIMALLOC_PURGE_DELAY=1000

Query Jemalloc Run 1 Jemalloc Run 2 Jemalloc Run 3 Jemalloc Mean Mimalloc Run 1 Mimalloc Run 2 Mimalloc Run 3 Mimalloc Mean Diff (JE - MI)
Q1 24.310 24.097 24.093 24.167 26.026 25.120 25.048 25.398 -1.231
Q2 4.228 4.007 4.063 4.099 4.194 3.991 3.999 4.061 0.038
Q3 27.917 27.513 26.391 27.273 26.549 26.892 26.356 26.599 0.674
Q4 9.747 9.479 9.442 9.556 9.968 9.851 9.824 9.881 -0.325
Q5 17.536 17.374 17.176 17.362 17.832 17.740 17.635 17.736 -0.374
Q6 10.340 10.287 10.170 10.266 10.881 10.933 10.908 10.907 -0.641
Q7 17.709 17.698 17.768 17.725 18.063 18.054 18.013 18.043 -0.318
Q8 22.317 21.890 21.886 22.031 22.779 22.511 22.448 22.579 -0.548
Q9 59.069 60.077 58.975 59.374 64.407 59.166 58.713 60.762 -1.388
Q10 20.056 19.400 19.276 19.577 22.053 20.336 19.878 20.756 -1.179
Q11 3.376 2.823 2.789 2.996 4.272 2.777 2.811 3.287 -0.291
Q12 14.596 13.577 13.485 13.886 16.052 13.801 14.044 14.632 -0.746
Q13 21.392 20.796 20.504 20.897 21.425 20.926 22.539 21.630 -0.733
Q14 11.785 11.333 11.202 11.440 12.835 11.782 11.847 12.155 -0.715
Q15 18.954 20.367 21.236 20.186 22.706 21.704 21.877 22.096 -1.910
Q16 2.782 2.704 2.684 2.723 2.674 2.592 2.596 2.621 0.102
Q17 16.297 15.881 15.885 16.021 17.090 16.866 16.819 16.925 -0.904
Q18 38.365 37.209 36.663 37.412 37.131 36.834 38.264 37.410 0.002
Q19 29.991 29.211 28.367 29.190 30.709 29.140 28.910 29.586 -0.396
Q20 25.900 24.046 23.534 24.493 24.430 23.880 23.971 24.094 0.399
Q21 57.624 57.161 56.702 57.162 55.584 54.914 54.743 55.080 2.082
Q22 3.321 3.189 3.286 3.265 3.420 3.232 3.234 3.295 -0.030

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-benchmark-cloud Benchmark: run only cloud tests for tpch/hits pr-chore this PR only has small changes that no need to record, like coding styles.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants