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

Improve memory defragmentation (#7788) #7790

Merged
merged 1 commit into from May 18, 2020

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented May 11, 2020

cherry-pick #7788 to release-3.0


Signed-off-by: Breezewish breezewish@pingcap.com

What problem does this PR solve?

Problem Summary:

There was a PR fixing the memory fragmentation issue. However there is a bug in the PR that the defragmentation will not be very effective after running for a long time. This PR fixes it.

What is changed and how it works?

What's Changed: Bug fix.

Related changes

  • Need to cherry-pick to the release branch

Check List

  • Manual test: Tested a cluster that has been started for > 1 day, confirmed that sys_getdents are now called by 10 minutes interval, instead of 15 secods.
[pid 64038] 15:24:16.579973 getdents(556</data3/wenxuan_kv1_exp/data/snap>, /* 2 entries */, 32768) = 48 <0.000037>
[pid 64038] 15:24:16.580232 getdents(556</data3/wenxuan_kv1_exp/data/snap>, /* 0 entries */, 32768) = 0 <0.000027>
[pid 64039] 15:25:16.582008 getdents(555</data3/wenxuan_kv1_exp/data/snap>, /* 2 entries */, 32768) = 48 <0.000026>
[pid 64039] 15:25:16.582121 getdents(555</data3/wenxuan_kv1_exp/data/snap>, /* 0 entries */, 32768) = 0 <0.000013>
[pid 64039] 15:26:16.584170 getdents(555</data3/wenxuan_kv1_exp/data/snap>, /* 2 entries */, 32768) = 48 <0.000048>
[pid 64039] 15:26:16.584302 getdents(555</data3/wenxuan_kv1_exp/data/snap>, /* 0 entries */, 32768) = 0 <0.000023>
[pid 64039] 15:27:16.586493 getdents(3</data3/wenxuan_kv1_exp/data/snap>, /* 2 entries */, 32768) = 48 <0.000038>
[pid 64039] 15:27:16.586632 getdents(3</data3/wenxuan_kv1_exp/data/snap>, /* 0 entries */, 32768) = 0 <0.000022>
[pid 64078] 15:27:16.671043 getdents(3</proc/63302/task>, /* 187 entries */, 32768) = 5968 <0.000183>
[pid 64078] 15:27:16.671527 getdents(3</proc/63302/task>, /* 0 entries */, 32768) = 0 <0.000016>
[pid 64039] 15:28:16.588570 getdents(539</data3/wenxuan_kv1_exp/data/snap>, /* 2 entries */, 32768) = 48 <0.000046>
[pid 64039] 15:28:16.588703 getdents(539</data3/wenxuan_kv1_exp/data/snap>, /* 0 entries */, 32768) = 0 <0.000021>
[pid 64039] 15:29:16.590764 getdents(556</data3/wenxuan_kv1_exp/data/snap>, /* 2 entries */, 32768) = 48 <0.000028>
[pid 64039] 15:29:16.590885 getdents(556</data3/wenxuan_kv1_exp/data/snap>, /* 0 entries */, 32768) = 0 <0.000041>
[pid 64038] 15:30:16.593033 getdents(513</data3/wenxuan_kv1_exp/data/snap>, /* 2 entries */, 32768) = 48 <0.000030>
[pid 64038] 15:30:16.593173 getdents(513</data3/wenxuan_kv1_exp/data/snap>, /* 0 entries */, 32768) = 0 <0.000027>
[pid 64038] 15:31:16.595139 getdents(555</data3/wenxuan_kv1_exp/data/snap>, /* 2 entries */, 32768) = 48 <0.000064>
[pid 64038] 15:31:16.595302 getdents(555</data3/wenxuan_kv1_exp/data/snap>, /* 0 entries */, 32768) = 0 <0.000016>
[pid 64039] 15:32:16.597362 getdents(556</data3/wenxuan_kv1_exp/data/snap>, /* 2 entries */, 32768) = 48 <0.000039>
[pid 64039] 15:32:16.597480 getdents(556</data3/wenxuan_kv1_exp/data/snap>, /* 0 entries */, 32768) = 0 <0.000022>

Release note

Improve memory defragmentation.

@sre-bot
Copy link
Contributor Author

sre-bot commented May 11, 2020

/run-all-tests

@sre-bot sre-bot added type/bugfix Type: PR - Fix a bug type/cherry-pick Type: PR - Cherry pick labels May 11, 2020
@sre-bot sre-bot added this to the v3.0.13(3.0.12-hotfix) milestone May 11, 2020
Signed-off-by: Breezewish <breezewish@pingcap.com>
@breezewish
Copy link
Member

/run-all-tests

@youjiali1995 youjiali1995 merged commit 1c182fc into tikv:release-3.0 May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bugfix Type: PR - Fix a bug type/cherry-pick Type: PR - Cherry pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants