From: Sage Weil Date: Fri, 14 Oct 2011 20:30:43 +0000 (-0700) Subject: mon: make number of old paxos states configurable X-Git-Tag: v0.38~63^2~21 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=818cf8c887f55658191cf7a70fccfe117773cc4d;p=ceph.git mon: make number of old paxos states configurable Currently settable on osdmaps, pgmaps, and log. Still need MDSMap and authmap trimming. Signed-off-by: Sage Weil --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index f9b61d3e50f9..700a6ed8a778 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -95,6 +95,9 @@ OPTION(mon_osd_nearfull_ratio, OPT_INT, 85) // what % full makes an OSD near ful OPTION(mon_globalid_prealloc, OPT_INT, 100) // how many globalids to prealloc OPTION(mon_osd_report_timeout, OPT_INT, 900) // grace period before declaring unresponsive OSDs dead OPTION(mon_force_standby_active, OPT_BOOL, true) // should mons force standby-replay mds to be active +OPTION(mon_min_osdmap_epochs, OPT_INT, 500) +OPTION(mon_max_pgmap_epochs, OPT_INT, 500) +OPTION(mon_max_log_epochs, OPT_INT, 500) OPTION(paxos_propose_interval, OPT_DOUBLE, 1.0) // gather updates for this long before proposing a map update OPTION(paxos_min_wait, OPT_DOUBLE, 0.05) // min time to gather updates for after period of inactivity OPTION(paxos_observer_timeout, OPT_DOUBLE, 5*60) // gather updates for this long before proposing a map update diff --git a/src/mon/LogMonitor.cc b/src/mon/LogMonitor.cc index b609a0588495..2c8db1fa882f 100644 --- a/src/mon/LogMonitor.cc +++ b/src/mon/LogMonitor.cc @@ -171,7 +171,7 @@ bool LogMonitor::update_from_paxos() // trim - unsigned max = 500; + unsigned max = g_conf->mon_max_log_epochs; if (mon->is_leader() && paxosv > max) paxos->trim_to(paxosv - max); diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 682d57d8982a..adc0cd1268da 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -1131,7 +1131,7 @@ void OSDMonitor::tick() mon->pgmon()->pg_map.creating_pgs.empty()) { epoch_t floor = mon->pgmon()->pg_map.calc_min_last_epoch_clean(); dout(10) << " min_last_epoch_clean " << floor << dendl; - unsigned min = 100; + unsigned min = g_conf->mon_min_osdmap_epochs; if (floor + min < paxos->get_version()) paxos->trim_to(floor); } diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index 08eaabd4e9fe..909aa6b348a9 100644 --- a/src/mon/PGMonitor.cc +++ b/src/mon/PGMonitor.cc @@ -180,7 +180,7 @@ bool PGMonitor::update_from_paxos() mon->store->put_bl_sn(d, "pgmap_dump", paxosv); } - unsigned max = 500; + unsigned max = g_conf->mon_max_pgmap_epochs; if (mon->is_leader() && paxosv > max) paxos->trim_to(paxosv - max);