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

os/bluestore: configure rocksdb cache via bluestore_cache_kv_ratio #15580

Merged
merged 4 commits into from Jun 12, 2017

Conversation

Projects
None yet
2 participants
@liewegas
Member

liewegas commented Jun 8, 2017

Also, enable the rocksdb row cache via rocksdb_cache_row_meta (default: .2)

Also, add rocksdb_cache_type = lru|clock option. Note that 'clock' doesn't seem to work
in that it reports 'block_cache_name: LRUCache' when specified, and row_cache
comes back as None if I try to use it there.

cache_kv_ratio = cct->_conf->bluestore_cache_kv_ratio;
cache_data_ratio = 1.0 - cache_meta_ratio - cache_kv_ratio;
if (cache_meta_ratio <= 0 || cache_meta_ratio > 1.0) {

This comment has been minimized.

@ifed01

ifed01 Jun 9, 2017

Contributor

Not sure that's a good approach to set values and then return an error.

@ifed01

ifed01 Jun 9, 2017

Contributor

Not sure that's a good approach to set values and then return an error.

This comment has been minimized.

@liewegas

liewegas Jun 9, 2017

Member

we error out in this case so the values aren't used. this is mostly just less typing

@liewegas

liewegas Jun 9, 2017

Member

we error out in this case so the values aren't used. this is mostly just less typing

liewegas added some commits Jun 8, 2017

kv/RocksDBStore: make rocksdb_cache_type tunable (lru or clock)
"[Clock is] Similar to NewLRUCache, but create a cache based on CLOCK
algorithm with better concurrent performance in some cases. See
[cache]/clock_cache.cc for more detail."

Signed-off-by: Sage Weil <sage@redhat.com>
kv/RocksDBStore: allow cache_size to be specified explicitly
(Not via a config option)

Signed-off-by: Sage Weil <sage@redhat.com>

liewegas added some commits Jun 8, 2017

kv/RocksDBStore: rocksdb_cache_row_ratio
Specify portion of cache to devote to row cache (the rest goes to the
block cache).

Signed-off-by: Sage Weil <sage@redhat.com>
os/bluestore: set bluestore_cache_kv_ratio to configure rocksdb cache…
… size

Devote 40% to kv (rocksdb), 50% to metadata (onodes etc), 10% to data.

Note that if we don't consume the data portion (e.g., no cache hints) that
the onode metadata will "borrow" that space.

Signed-off-by: Sage Weil <sage@redhat.com>

@liewegas liewegas merged commit e56f827 into ceph:master Jun 12, 2017

2 of 3 checks passed

make check make check failed
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details

@liewegas liewegas deleted the liewegas:wip-bluestore-memory branch Jun 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment