]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: throttle daemon messages independently from client messages
authorSage Weil <sage@inktank.com>
Tue, 14 Aug 2012 22:07:06 +0000 (15:07 -0700)
committerSage Weil <sage@inktank.com>
Tue, 14 Aug 2012 22:07:06 +0000 (15:07 -0700)
This lets us set a higher limit on messages from daemons (osd, mds) than
from clients, and throttle them independently.

Fixes: #2942
Signed-off-by: Sage Weil <sage@inktank.com>
src/ceph_mon.cc
src/common/config_opts.h

index 4903d99e77d39efdfc1641914ea451534275d29f..b5a14908b01a72ab3eb10e152b05ab81c7634f3d 100644 (file)
@@ -398,8 +398,14 @@ int main(int argc, const char **argv)
   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);
+
+  // 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(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);
 
   cout << "starting " << g_conf->name << " rank " << rank
        << " at " << ipaddr
index 3045dfb8beb3b8358cbcdc89f92ba0e3e2d3f3ad..9ca1b1f06a1a2b180a78ca1a953b2f6a17fbccc2 100644 (file)
@@ -129,7 +129,8 @@ OPTION(mon_max_osd, OPT_INT, 10000)
 OPTION(mon_probe_timeout, OPT_DOUBLE, 2.0)
 OPTION(mon_slurp_timeout, OPT_DOUBLE, 10.0)
 OPTION(mon_slurp_bytes, OPT_INT, 256*1024)    // limit size of slurp messages
-OPTION(mon_client_bytes, OPT_U64, 500ul<<20)  // client msg data allowed in memory (in bytes)
+OPTION(mon_client_bytes, OPT_U64, 100ul << 20)  // client msg data allowed in memory (in bytes)
+OPTION(mon_daemon_bytes, OPT_U64, 400ul << 20)  // mds, osd message memory cap (in bytes)
 OPTION(mon_max_log_entries_per_event, OPT_INT, 4096)
 OPTION(paxos_max_join_drift, OPT_INT, 10)       // max paxos iterations before we must first slurp
 OPTION(paxos_propose_interval, OPT_DOUBLE, 1.0)  // gather updates for this long before proposing a map update