From: Piotr Dałek Date: Tue, 31 Jan 2017 15:07:18 +0000 (+0100) Subject: OSD: allow client throttler to be adjusted on-fly, without restart X-Git-Tag: v12.0.0~20^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F13213%2Fhead;p=ceph.git OSD: allow client throttler to be adjusted on-fly, without restart This patch allows the osd_client_message_cap and osd_client_message_size_cap to be adjusted on-fly, using admin socket functionality. Fixes: http://tracker.ceph.com/issues/18791 Signed-off-by: Piotr Dałek --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 7afa5dc20055..c072edfd57dc 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -9165,6 +9165,8 @@ const char** OSD::get_tracked_conf_keys() const "host", "fsid", "osd_recovery_delay_start", + "osd_client_message_size_cap", + "osd_client_message_cap", NULL }; return KEYS; @@ -9228,6 +9230,21 @@ void OSD::handle_conf_change(const struct md_config_t *conf, service.kick_recovery_queue(); } + if (changed.count("osd_client_message_cap")) { + uint64_t newval = cct->_conf->osd_client_message_cap; + Messenger::Policy pol = client_messenger->get_policy(entity_name_t::TYPE_CLIENT); + if (pol.throttler_messages && newval > 0) { + pol.throttler_messages->reset_max(newval); + } + } + if (changed.count("osd_client_message_size_cap")) { + uint64_t newval = cct->_conf->osd_client_message_size_cap; + Messenger::Policy pol = client_messenger->get_policy(entity_name_t::TYPE_CLIENT); + if (pol.throttler_bytes && newval > 0) { + pol.throttler_bytes->reset_max(newval); + } + } + check_config(); }