From: Mark Nelson Date: Thu, 15 Jun 2017 13:23:23 +0000 (-0500) Subject: os/Bluestore: target_bytes should scale with meta/data ratios. X-Git-Tag: v12.1.0~132^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F15708%2Fhead;p=ceph.git os/Bluestore: target_bytes should scale with meta/data ratios. Signed-off-by: Mark Nelson --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index e89986833920..88f986a9dc22 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -3256,7 +3256,9 @@ void *BlueStore::MempoolThread::entry() float bytes_per_onode = (float)meta_bytes / (float)onode_num; size_t num_shards = store->cache_shards.size(); - uint64_t shard_target = store->cct->_conf->bluestore_cache_size / num_shards; + float target_ratio = store->cache_meta_ratio + store->cache_data_ratio; + // A little sloppy but should be close enough + uint64_t shard_target = target_ratio * (store->cct->_conf->bluestore_cache_size / num_shards); for (auto i : store->cache_shards) { i->trim(shard_target,