From: Sage Weil Date: Sat, 24 Sep 2011 22:49:32 +0000 (-0700) Subject: osd/mon: make max maps per MOSDMap message tunable X-Git-Tag: v0.36~17^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8aa15e8c55aab67446fd39b5d0113d6363bf050e;p=ceph.git osd/mon: make max maps per MOSDMap message tunable Signed-off-by: Sage Weil --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 27e7b0cfd12d..818ce35e97c2 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -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) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index abb878dea9d5..fdc7ca3b4efa 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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; diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index fdad9b4f8961..59ba9562afd5 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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)