Merge pull request #14717 from liewegas/wip-bluestore-remove-max-ops

os/bluestore: rename/fix throttle options

Reviewed-by: Igor Fedotov <ifedotov@mirantis.com>
This commit is contained in:
Yuri Weinstein 2017-04-27 09:35:09 -07:00 committed by GitHub
commit b9d9eb9933
2 changed files with 22 additions and 21 deletions

View File

@ -1131,13 +1131,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_ops, OPT_U64, 512)
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)

View File

@ -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,10 +3261,11 @@ const char **BlueStore::get_tracked_conf_keys() const
"bleustore_deferred_batch_ops",
"bleustore_deferred_batch_ops_hdd",
"bleustore_deferred_batch_ops_ssd",
"bluestore_max_ops",
"bluestore_max_bytes",
"bluestore_deferred_max_ops",
"bluestore_deferred_max_bytes",
"bluestore_throttle_bytes",
"bluestore_throttle_deferred_bytes",
"bluestore_throttle_cost_per_io_hdd",
"bluestore_throttle_cost_per_io_ssd",
"bluestore_throttle_cost_per_io",
"bluestore_max_blob_size",
"bluestore_max_blob_size_ssd",
"bluestore_max_blob_size_hdd",
@ -3310,14 +3313,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);
}
}