From d0c8721f7edc64c2f4e0a864b68bc7ff2893462d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 21 Apr 2017 10:49:43 -0400 Subject: [PATCH] os/bluestore: rename throttle configs: bluestore_throttle[_deferred]_bytes Signed-off-by: Sage Weil --- src/common/config_opts.h | 5 ++--- src/os/bluestore/BlueStore.cc | 33 +++++++++++++++++---------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 19aafd60d4ede..45cc9015a050a 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -1124,12 +1124,11 @@ OPTION(bluestore_fsck_on_umount_deep, OPT_BOOL, true) OPTION(bluestore_fsck_on_mkfs, OPT_BOOL, true) OPTION(bluestore_fsck_on_mkfs_deep, OPT_BOOL, false) OPTION(bluestore_sync_submit_transaction, OPT_BOOL, false) // submit kv txn in queueing thread (not kv_sync_thread) -OPTION(bluestore_max_bytes, OPT_U64, 64*1024*1024) +OPTION(bluestore_throttle_bytes, OPT_U64, 64*1024*1024) +OPTION(bluestore_throttle_deferred_bytes, OPT_U64, 128*1024*1024) OPTION(bluestore_throttle_cost_per_io_hdd, OPT_U64, 1500000) OPTION(bluestore_throttle_cost_per_io_ssd, OPT_U64, 4000) OPTION(bluestore_throttle_cost_per_io, OPT_U64, 0) -OPTION(bluestore_deferred_max_ops, OPT_U64, 512) -OPTION(bluestore_deferred_max_bytes, OPT_U64, 128*1024*1024) OPTION(bluestore_deferred_batch_ops, OPT_U64, 0) OPTION(bluestore_deferred_batch_ops_hdd, OPT_U64, 64) OPTION(bluestore_deferred_batch_ops_ssd, OPT_U64, 16) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 00c5168caef6c..8efb89c4488cc 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -3170,10 +3170,11 @@ static void aio_cb(void *priv, void *priv2) BlueStore::BlueStore(CephContext *cct, const string& path) : ObjectStore(cct, path), - throttle_bytes(cct, "bluestore_max_bytes", cct->_conf->bluestore_max_bytes), - throttle_deferred_bytes(cct, "bluestore_deferred_max_bytes", - cct->_conf->bluestore_max_bytes + - cct->_conf->bluestore_deferred_max_bytes), + throttle_bytes(cct, "bluestore_throttle_bytes", + cct->_conf->bluestore_throttle_bytes), + throttle_deferred_bytes(cct, "bluestore_throttle_deferred_bytes", + cct->_conf->bluestore_throttle_bytes + + cct->_conf->bluestore_throttle_deferred_bytes), kv_sync_thread(this), mempool_thread(this) { @@ -3197,10 +3198,11 @@ BlueStore::BlueStore(CephContext *cct, const string& path, uint64_t _min_alloc_size) : ObjectStore(cct, path), - throttle_bytes(cct, "bluestore_max_bytes", cct->_conf->bluestore_max_bytes), - throttle_deferred_bytes(cct, "bluestore_deferred_max_bytes", - cct->_conf->bluestore_max_bytes + - cct->_conf->bluestore_deferred_max_bytes), + throttle_bytes(cct, "bluestore_throttle_bytes", + cct->_conf->bluestore_throttle_bytes), + throttle_deferred_bytes(cct, "bluestore_throttle_deferred_bytes", + cct->_conf->bluestore_throttle_bytes + + cct->_conf->bluestore_throttle_deferred_bytes), kv_sync_thread(this), min_alloc_size(_min_alloc_size), min_alloc_size_order(ctz(_min_alloc_size)), @@ -3259,9 +3261,8 @@ const char **BlueStore::get_tracked_conf_keys() const "bleustore_deferred_batch_ops", "bleustore_deferred_batch_ops_hdd", "bleustore_deferred_batch_ops_ssd", - "bluestore_max_bytes", - "bluestore_deferred_max_ops", - "bluestore_deferred_max_bytes", + "bluestore_throttle_bytes", + "bluestore_throttle_deferred_bytes", "bluestore_max_blob_size", "bluestore_max_blob_size_ssd", "bluestore_max_blob_size_hdd", @@ -3309,14 +3310,14 @@ void BlueStore::handle_conf_change(const struct md_config_t *conf, _set_throttle_params(); } } - if (changed.count("bluestore_max_bytes")) { - throttle_bytes.reset_max(conf->bluestore_max_bytes); + if (changed.count("bluestore_throttle_bytes")) { + throttle_bytes.reset_max(conf->bluestore_throttle_bytes); throttle_deferred_bytes.reset_max( - conf->bluestore_max_bytes + conf->bluestore_deferred_max_bytes); + conf->bluestore_throttle_bytes + conf->bluestore_throttle_deferred_bytes); } - if (changed.count("bluestore_deferred_max_bytes")) { + if (changed.count("bluestore_throttle_deferred_bytes")) { throttle_deferred_bytes.reset_max( - conf->bluestore_max_bytes + conf->bluestore_deferred_max_bytes); + conf->bluestore_throttle_bytes + conf->bluestore_throttle_deferred_bytes); } }