]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/mon: make max maps per MOSDMap message tunable
authorSage Weil <sage.weil@dreamhost.com>
Sat, 24 Sep 2011 22:49:32 +0000 (15:49 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Sat, 24 Sep 2011 22:49:32 +0000 (15:49 -0700)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/common/config_opts.h
src/mon/OSDMonitor.cc
src/osd/OSD.cc

index 27e7b0cfd12db5101f4acd7c82a9d55a11aceb5b..818ce35e97c2859444cf80c06a8a93923eb317a1 100644 (file)
@@ -234,6 +234,7 @@ OPTION(osd_pool_default_size, OPT_INT, 2)
 OPTION(osd_pool_default_pg_num, OPT_INT, 8)
 OPTION(osd_pool_default_pgp_num, OPT_INT, 8)
 OPTION(osd_map_cache_max, OPT_INT, 250)
+OPTION(osd_map_message_max, OPT_INT, 100)  // max maps per MOSDMap message
 OPTION(osd_op_threads, OPT_INT, 2)    // 0 == no threading
 OPTION(osd_max_opq, OPT_INT, 10)
 OPTION(osd_disk_threads, OPT_INT, 1)
index abb878dea9d510e87e24df04cfd15b6555e474f9..fdc7ca3b4efa27dc8c11ca086fce0e0445e71e32 100644 (file)
@@ -933,7 +933,7 @@ void OSDMonitor::send_incremental(epoch_t first, entity_inst_t& dest)
   dout(5) << "send_incremental [" << first << ".." << osdmap.get_epoch() << "]"
          << " to " << dest << dendl;
   while (first <= osdmap.get_epoch()) {
-    epoch_t last = MIN(first + 100, osdmap.get_epoch());
+    epoch_t last = MIN(first + g_conf->osd_map_message_max, osdmap.get_epoch());
     MOSDMap *m = build_incremental(first, last);
     mon->messenger->send_message(m, dest);
     first = last + 1;
index fdad9b4f8961784ea88e47f12c19b665c6905db1..59ba9562afd5e59d2089a2ad3b537aaab2df156d 100644 (file)
@@ -3499,8 +3499,8 @@ void OSD::send_incremental_map(epoch_t since, const entity_inst_t& inst, bool la
   
   while (since < osdmap->get_epoch()) {
     epoch_t to = osdmap->get_epoch();
-    if (to - since > 100)
-      to = since + 100;
+    if (to - since > g_conf->osd_map_message_max)
+      to = since + g_conf->osd_map_message_max;
     MOSDMap *m = build_incremental_map_msg(since, to);
     Messenger *msgr = client_messenger;
     if (entity_name_t::TYPE_OSD == inst.name._type)