OPTION(mon_max_log_entries_per_event, OPT_INT, 4096)
OPTION(mon_reweight_min_pgs_per_osd, OPT_U64, 10) // min pgs per osd for reweight-by-pg command
OPTION(mon_reweight_min_bytes_per_osd, OPT_U64, 100*1024*1024) // min bytes per osd for reweight-by-utilization command
+OPTION(mon_reweight_max_change, OPT_FLOAT, 0.05) // max change to each osd per reweight-by-* command
OPTION(mon_health_data_update_interval, OPT_FLOAT, 60.0)
OPTION(mon_health_to_clog, OPT_BOOL, true)
OPTION(mon_health_to_clog_interval, OPT_INT, 3600)
// to represent e.g. differing storage capacities
unsigned weight = osdmap.get_weight(p->first);
unsigned new_weight = (unsigned)((average_util / util) * (float)weight);
+ new_weight = MAX(new_weight, weight - g_conf->mon_reweight_max_change);
if (sure) {
pending_inc.new_weight[p->first] = new_weight;
changed = true;
// assign a higher weight.. if we can.
unsigned weight = osdmap.get_weight(p->first);
unsigned new_weight = (unsigned)((average_util / util) * (float)weight);
+ new_weight = MIN(new_weight, weight + g_conf->mon_reweight_max_change);
if (new_weight > 0x10000)
- new_weight = 0x10000;
+ new_weight = 0x10000;
if (new_weight > weight) {
sep = ", ";
if (sure) {