summaryrefslogtreecommitdiff
path: root/src/ceph_mon.cc
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-04-03 21:30:51 -0700
committerSage Weil <sage@inktank.com>2013-04-06 08:17:01 -0700
commitf7070e956859357fefede892886db98a7958d71a (patch)
treef695b0beca6c86ed586f7a4457a674fbca634abd /src/ceph_mon.cc
parent79b71441f8c2a1b282fa0e85badcb7d410c8005d (diff)
downloadceph-f7070e956859357fefede892886db98a7958d71a.tar.gz
msgr: add second per-message throttler to message policy
We already have a throttler that lets of limit the amount of memory consumed by messages from a given source. Currently this is based only on the size of the message payload. Add a second throttler that limits the number of messages so that we can effectively throttle small requests as well. Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'src/ceph_mon.cc')
-rw-r--r--src/ceph_mon.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ceph_mon.cc b/src/ceph_mon.cc
index 4a4df8942e9..72354e18876 100644
--- a/src/ceph_mon.cc
+++ b/src/ceph_mon.cc
@@ -407,15 +407,15 @@ int main(int argc, const char **argv)
// throttle client traffic
Throttle *client_throttler = new Throttle(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_throttlers(entity_name_t::TYPE_CLIENT, client_throttler, NULL);
// throttle daemon traffic
// NOTE: actual usage on the leader may multiply by the number of
// monitors if they forward large update messages from daemons.
Throttle *daemon_throttler = new Throttle(g_ceph_context, "mon_daemon_bytes",
g_conf->mon_daemon_bytes);
- messenger->set_policy_throttler(entity_name_t::TYPE_OSD, daemon_throttler);
- messenger->set_policy_throttler(entity_name_t::TYPE_MDS, daemon_throttler);
+ messenger->set_policy_throttlers(entity_name_t::TYPE_OSD, daemon_throttler, NULL);
+ messenger->set_policy_throttlers(entity_name_t::TYPE_MDS, daemon_throttler, NULL);
cout << "starting " << g_conf->name << " rank " << rank
<< " at " << ipaddr