-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
raftstore: increase region size from 64M to 96M #1449
Conversation
Should update the |
PTAL |
LGTM |
etc/config-template.toml
Outdated
# When region size changes exceeds region-split-check-diff, we should check | ||
# whether the region should be split or not. | ||
region-split-check-diff = "8MB" | ||
region-split-check-diff = "24MB" |
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.
Why 24M
?
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.
To reduce scanning times.
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 will delay split scan.
src/raftstore/store/config.rs
Outdated
const REGION_MAX_SIZE: u64 = 80 * 1024 * 1024; | ||
const REGION_CHECK_DIFF: u64 = 8 * 1024 * 1024; | ||
const REGION_SPLIT_SIZE: u64 = 96 * 1024 * 1024; | ||
const REGION_MAX_SIZE: u64 = REGION_SPLIT_SIZE + REGION_SPLIT_SIZE / 3; |
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.
I think REGION_SPLIT_SIZE / 4 * 5
is more appropriate. REGION_SPLIT_SIZE
can be divided by 4 or 8 normally.
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 doesn't need to be accurate.
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.
But it will look ugly when change the split size to something else, like 160m, the max size will become 213m in which case. But if using 5 / 4
, default max size will become 200m.
src/raftstore/store/config.rs
Outdated
const REGION_CHECK_DIFF: u64 = 8 * 1024 * 1024; | ||
const REGION_SPLIT_SIZE: u64 = 96 * 1024 * 1024; | ||
const REGION_MAX_SIZE: u64 = REGION_SPLIT_SIZE / 4 * 5; | ||
const REGION_CHECK_DIFF: u64 = REGION_SPLIT_SIZE / 4; |
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.
Should be 8.
src/bin/tikv-server.rs
Outdated
|
||
cfg.raft_store.region_check_size_diff = | ||
get_toml_int(config, | ||
"raftstore.region-split-check-diff", | ||
Some(8 * 1024 * 1024)) as u64; | ||
Some(24 * 1024 * 1024)) as u64; |
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.
Should be 16.
In our test, for 128MB region size, snapshot applying can cause IO higher and affect the raftstore thread. |
@hhkbp2 seem we can use SST to test this now. |
LGTM |
I prefer to merge the PR into 1.0.rc3, it's ready. PTAL |
LGTM |
Signed-off-by: Wish <[email protected]>
Close #1447