This simplifies modifying a subset of rocksdb settings since it
eliminates the need to re-provide bluestore's rocksdb settings.
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit
711505e8f9effbf4f0ada3bfe8d25dbc7e86861e)
Conflicts:
(trivial) PendingReleaseNotes
(trivial) src/common/options.cc
(trivial) src/os/bluestore/BlueStore.cc
This improves out of the box performance of Ceph by allowing more PGs
to be created for a given pool.
+* New bluestore_rocksdb_options_annex config parameter. Complements
+ bluestore_rocksdb_options and allows setting rocksdb options without repeating
+ the existing defaults.
+
15.2.8
------
* $pid expansion in config paths like `admin_socket` will now properly expand
OPTION(bluestore_max_deferred_txc, OPT_U64)
OPTION(bluestore_max_defer_interval, OPT_U64)
OPTION(bluestore_rocksdb_options, OPT_STR)
+OPTION(bluestore_rocksdb_options_annex, OPT_STR)
OPTION(bluestore_fsck_on_mount, OPT_BOOL)
OPTION(bluestore_fsck_on_mount_deep, OPT_BOOL)
OPTION(bluestore_fsck_quick_fix_on_mount, OPT_BOOL)
Option("bluestore_rocksdb_options", Option::TYPE_STR, Option::LEVEL_ADVANCED)
.set_default("compression=kNoCompression,max_write_buffer_number=4,min_write_buffer_number_to_merge=1,recycle_log_file_num=4,write_buffer_size=268435456,writable_file_max_buffer_size=0,compaction_readahead_size=2097152,max_background_compactions=2")
- .set_description("Rocksdb options"),
+ .set_description("Full set of rocksdb settings to override"),
+
+ Option("bluestore_rocksdb_options_annex", Option::TYPE_STR, Option::LEVEL_ADVANCED)
+ .set_default("")
+ .set_description("An addition to bluestore_rocksdb_options. Allows setting rocksdb options without repeating the existing defaults."),
Option("bluestore_rocksdb_cf", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
.set_default(false)
if (bluefs_layout.shared_bdev == BlueFS::BDEV_SLOW) {
string options = cct->_conf->bluestore_rocksdb_options;
+ string options_annex = cct->_conf->bluestore_rocksdb_options_annex;
+ if (!options_annex.empty()) {
+ if (!options.empty() &&
+ *options.rbegin() != ',') {
+ options += ',';
+ }
+ options += options_annex;
+ }
rocksdb::Options rocks_opts;
int r = RocksDBStore::ParseOptionsFromStringStatic(
ceph_assert(!(create && read_only));
string fn = path + "/db";
string options;
+ string options_annex;
stringstream err;
std::shared_ptr<Int64ArrayMergeOperator> merge_op(new Int64ArrayMergeOperator);
if (kv_backend == "rocksdb") {
options = cct->_conf->bluestore_rocksdb_options;
+ options_annex = cct->_conf->bluestore_rocksdb_options_annex;
+ if (!options_annex.empty()) {
+ if (!options.empty() &&
+ *options.rbegin() != ',') {
+ options += ',';
+ }
+ options += options_annex;
+ }
map<string,string> cf_map;
cct->_conf.with_val<string>("bluestore_rocksdb_cfs",