diff options
author | Sage Weil <sage@inktank.com> | 2012-06-01 09:44:09 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-06-01 09:44:09 -0700 |
commit | 97d4396415a95f62f6deccda62d105d8d04717a4 (patch) | |
tree | 9e47a3a35e572318a1d091a7c0e49328a7868188 /src/ceph_mon.cc | |
parent | 52b28ed631f80109a2056d475d5c047c94ecf597 (diff) | |
download | ceph-97d4396415a95f62f6deccda62d105d8d04717a4.tar.gz |
mon: throttle client msgr memory
Limit the amount of memory that can be consumed by client messages, similar
to the OSD. Do not limit inter-mon messages.
Fixes: #2495
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Diffstat (limited to 'src/ceph_mon.cc')
-rw-r--r-- | src/ceph_mon.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ceph_mon.cc b/src/ceph_mon.cc index 3010377547e..14a776af374 100644 --- a/src/ceph_mon.cc +++ b/src/ceph_mon.cc @@ -387,6 +387,13 @@ int main(int argc, const char **argv) CEPH_FEATURE_PGID64 | CEPH_FEATURE_OSDENC)); + // throttle client traffic + Throttle client_throttler(g_ceph_context, "mon_client_bytes", + g_conf->mon_client_bytes); + messenger->set_policy_throttler(entity_name_t::TYPE_CLIENT, &client_throttler); + messenger->set_policy_throttler(entity_name_t::TYPE_OSD, &client_throttler); + messenger->set_policy_throttler(entity_name_t::TYPE_MDS, &client_throttler); + global_print_banner(); cout << "starting " << g_conf->name << " rank " << rank |