Skip to content

Commit

Permalink
os/bluestore: rename throttle configs: bluestore_throttle[_deferred]_…
Browse files Browse the repository at this point in the history
…bytes

Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Apr 26, 2017
1 parent c2a1c30 commit d0c8721
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
5 changes: 2 additions & 3 deletions src/common/config_opts.h
Expand Up @@ -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)
Expand Down
33 changes: 17 additions & 16 deletions src/os/bluestore/BlueStore.cc
Expand Up @@ -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)
{
Expand All @@ -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)),
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit d0c8721

Please sign in to comment.