This repository has been archived by the owner on Dec 8, 2021. It is now read-only.
backend/local: optimize local writer concurrency and memory usage #560
Closed
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
glorv
force-pushed
the
opt-local-writer
branch
from
January 28, 2021 14:56
4da0eed
to
e36ee90
Compare
…to opt-local-writer
…to opt-local-writer
glorv
force-pushed
the
opt-local-writer
branch
4 times, most recently
from
February 3, 2021 06:03
1708476
to
79a411d
Compare
glorv
force-pushed
the
opt-local-writer
branch
from
February 3, 2021 10:12
79a411d
to
da778be
Compare
glorv
added
the
status/PTAL
This PR is ready for review. Add this label back after committing new changes
label
Feb 3, 2021
/run-all-tests |
kennytm
reviewed
Feb 22, 2021
lightning/restore/restore.go
Outdated
Comment on lines
1268
to
1272
engineCtx := context.WithValue(ctx, kv.LocalEngineConfigKey, kv.LocalEngineConfig{ | ||
Compact: true, | ||
CompactConcurrency: 4, | ||
CompactThreshold: 4 << 30, // 4GB | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is very strange to use context.WithValue
to pass in these settings. since we control the interface of OpenEngine
we could add an argument specifying the type of engine (index engine, data engine sorted, data engine unsorted).
glorv
force-pushed
the
opt-local-writer
branch
from
February 23, 2021 11:28
b04b721
to
793f02b
Compare
glorv
force-pushed
the
opt-local-writer
branch
from
February 23, 2021 11:46
793f02b
to
5af4778
Compare
/run-all-tests |
closed in favor of pingcap/br#753 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What problem does this PR solve?
Optimize local writer performance and memory usage.
What is changed and how it works?
Optimize local writer by:
Bench result:
The benchmark tests were run on a 40core machine with an NVME disk. and based on the following three data and table schema:
order_line
table with 3 indexes. Thus each row generates 4 kvs.order_line
table with 3 indexes. Thus each row generates 8 kvs.Bench Result:
Check List
Tests
Side effects
Related changes