From fe834c21002ba7d0661d57f67c3a3a6eed08f2b1 Mon Sep 17 00:00:00 2001 From: Adam Kupczyk Date: Thu, 24 Sep 2020 12:54:46 +0200 Subject: [PATCH] BlueStore: Add block_cache logic to column family definition Modified original onode column family cache into generic feature. Now 2 options are possible for each column family: 1) use generic block cache but apply different BlockBasedTableOptions 2) create separate block cache. it will be applied for all shards of column family It is done by specifying special option "block_cache" to CF definition: Example: O(3,0-13)=block_cache={high_ratio=1.000} "block_cache" accepts all BlockBasedTableOptions options with additions: -"type" - binned_lru/lru/clock (default: ceph_options.rocksdb_cache_type) -"size" - e.g.: 100M (default: ceph_options.rocksdb_cache_size) -"high_ratio" - e.g.: 0.75 (default: 0.0) If any of above is set, new block cache is created, otherwise default is used. Signed-off-by: Adam Kupczyk --- src/common/options.cc | 4 +- src/kv/RocksDBStore.cc | 177 ++++++++++++++++++++++++++--------------- src/kv/RocksDBStore.h | 42 +++++----- 3 files changed, 134 insertions(+), 89 deletions(-) diff --git a/src/common/options.cc b/src/common/options.cc index 2033f72da3e..2465e529e0a 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -3790,7 +3790,7 @@ std::vector