This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 102
lightning: reduce memory use (#847) #866
Merged
zhouqiang-cl
merged 3 commits into
pingcap:release-4.0
from
ti-srebot:release-4.0-01adaa0a1ece
Mar 18, 2021
Merged
lightning: reduce memory use (#847) #866
zhouqiang-cl
merged 3 commits into
pingcap:release-4.0
from
ti-srebot:release-4.0-01adaa0a1ece
Mar 18, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: ti-srebot <[email protected]>
/lgtm |
/lgtm |
/merge |
/run-all-tests |
@ti-srebot merge failed. |
/merge
|
/run-integration-test |
/run-integration-test
|
glorv
approved these changes
Mar 18, 2021
ti-srebot
added
status/LGT3
LGTM3. This PR looks very good to our bot.
and removed
status/LGT2
LGTM2
labels
Mar 18, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
component/import
status/can-merge
status/LGT3
LGTM3. This PR looks very good to our bot.
type/4.0-cherry-pick
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cherry-pick #847 to release-4.0
You can switch your code base to this Pull Request by using git-extras:
# In br repo: git pr https://github.com/pingcap/br/pull/866
After apply modifications, you can push your change to this PR via:
What problem does this PR solve?
Lightning's Local Backend may OOM because some cache are too aggressive.
What is changed and how it works?
(Split off from #815).
LocalWriter.kvsChan
from 1024 to 16. Originally this will make Lightning retain 1024 × (region-conc) × (encoded-kvs) in the channel buffer, which can hold over 3 GiB.Check List
Tests
Code changes
Side effects
Related changes
Release Note
tikv-importer.engine-mem-cache-size
andtikv-importer.local-writer-mem-cache-size
to tune between memory usage and performance.