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

tikv-ctl: dynamically modify rocksdb cache size #2921

Merged
merged 6 commits into from
Apr 9, 2018
Merged

tikv-ctl: dynamically modify rocksdb cache size #2921

merged 6 commits into from
Apr 9, 2018

Conversation

UncP
Copy link
Contributor

@UncP UncP commented Apr 5, 2018

No description provided.

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" {
Copy link
Member

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 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really.

@UncP
Copy link
Contributor Author

UncP commented Apr 8, 2018

@zhangjinpeng1987

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" {
Copy link
Member

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.

// 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>();
Copy link
Member

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?

Copy link
Contributor Author

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.

@zhangjinpeng87
Copy link
Member

@huachaohuang PTAL

Copy link
Contributor

@huachaohuang huachaohuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@zhangjinpeng87 zhangjinpeng87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhangjinpeng87 zhangjinpeng87 merged commit 9c94527 into tikv:master Apr 9, 2018
@UncP UncP deleted the dynamically-modify-rocksdb-cache-size branch April 9, 2018 03:22
sticnarf pushed a commit to sticnarf/tikv that referenced this pull request Oct 27, 2019
@sre-bot sre-bot added the contribution This PR is from a community contributor. label Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution This PR is from a community contributor.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants