Skip to content

statistics: use swiss table to improve fmsketch#47055

Merged
ti-chi-bot[bot] merged 3 commits intopingcap:masterfrom
hawkingrei:use_fmsketch
Sep 20, 2023
Merged

statistics: use swiss table to improve fmsketch#47055
ti-chi-bot[bot] merged 3 commits intopingcap:masterfrom
hawkingrei:use_fmsketch

Conversation

@hawkingrei
Copy link
Copy Markdown
Member

@hawkingrei hawkingrei commented Sep 18, 2023

What problem does this PR solve?

Issue Number: close #47057

Problem Summary:

What is changed and how it works?

fmsketch's hashmap is so big. it slows the copy speed and use many memory. we use swiss table to replace it.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

before:

image

after:

image

more less usage of memory

before:

image

after:

image
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 18, 2023
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 18, 2023

Codecov Report

Merging #47055 (4e7cddd) into master (d569d19) will decrease coverage by 0.1975%.
Report is 14 commits behind head on master.
The diff coverage is 96.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #47055        +/-   ##
================================================
- Coverage   72.9684%   72.7710%   -0.1975%     
================================================
  Files          1338       1359        +21     
  Lines        399152     406971      +7819     
================================================
+ Hits         291255     296157      +4902     
- Misses        89082      92091      +3009     
+ Partials      18815      18723        -92     
Flag Coverage Δ
integration 30.4337% <64.0000%> (?)
unit 73.1095% <96.0000%> (+0.1411%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 53.9913% <ø> (ø)
parser 84.9620% <ø> (-0.0108%) ⬇️
br 48.9785% <ø> (-3.9496%) ⬇️

@hawkingrei
Copy link
Copy Markdown
Member Author

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 18, 2023
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
@hawkingrei
Copy link
Copy Markdown
Member Author

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 20, 2023
Copy link
Copy Markdown
Member

@0xPoe 0xPoe left a comment

Choose a reason for hiding this comment

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

The changes look good to me. But I am still not sure if is it a good idea to introduce this dep.

cc: @qw4990 Do you have any thoughts about this?

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Sep 20, 2023
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Sep 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hi-rustin, qw4990

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 20, 2023
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Sep 20, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-09-20 08:47:40.795502967 +0000 UTC m=+680026.763091017: ☑️ agreed by hi-rustin.
  • 2023-09-20 13:42:37.095335968 +0000 UTC m=+697723.062924019: ☑️ agreed by qw4990.

@hawkingrei
Copy link
Copy Markdown
Member Author

/retest

@ti-chi-bot ti-chi-bot bot merged commit 3b21c7a into pingcap:master Sep 20, 2023
@hawkingrei hawkingrei deleted the use_fmsketch branch September 20, 2023 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize HashMap Implementation Using Swiss Table

3 participants