-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
tikv-ctl: dynamically modify rocksdb cache size #2921
tikv-ctl: dynamically modify rocksdb cache size #2921
Conversation
src/server/debug.rs
Outdated
opt.push((config_name, config_value)); | ||
box_try!(rocksdb.set_options_cf(handle, &opt)); | ||
// currently we can't modify block_cache_capacity via set_options_cf | ||
if config_name == "block_cache_capacity" { |
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.
Could we modify the function set_options_cf
and let it support modify block_cache_capacity
?
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.
Not really.
…b.com/UncP/tikv into dynamically-modify-rocksdb-cache-size
src/server/debug.rs
Outdated
opt.push((config_name, config_value)); | ||
box_try!(rocksdb.set_options_cf(handle, &opt)); | ||
// currently we can't modify block_cache_capacity via set_options_cf | ||
if config_name == "block_cache_capacity" { |
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 keep consistent with cfg.
src/server/debug.rs
Outdated
// currently we can't modify block_cache_capacity via set_options_cf | ||
if config_name == "block_cache_capacity" { | ||
let opt = rocksdb.get_options_cf(handle); | ||
let capacity = config_value.parse::<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.
Can we support MB and GB here?
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.
Sure, but this can only be used on cache size
here, other cfgs is passed to rocksdb.
@huachaohuang PTAL |
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.
LGTM
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.
LGTM
No description provided.