Add an option to configure the number of epochs the overload lasts before migrating,
setting it to a higher value can avoid frequent migrations caused by load fluctuations.
Signed-off-by: Zhansong Gao <zhsgao@hotmail.com>
.. confval:: mds_bal_max_until
.. confval:: mds_bal_mode
.. confval:: mds_bal_min_rebalance
+.. confval:: mds_bal_overload_epochs
.. confval:: mds_bal_min_start
.. confval:: mds_bal_need_min
.. confval:: mds_bal_need_max
services:
- mds
with_legacy: true
+# must be overloaded for more than these epochs before we export anything
+- name: mds_bal_overload_epochs
+ type: int
+ level: dev
+ default: 2
+ services:
+ - mds
+ fmt_desc: The number of epochs the overload lasts before Ceph migrates,
+ setting it to a higher value can avoid frequent migrations caused by load fluctuations.
+ with_legacy: true
# if we need less than this, we don't do anything
- name: mds_bal_min_start
type: float
return;
}
// am i over long enough?
- if (last_epoch_under && beat_epoch - last_epoch_under < 2) {
+ if (last_epoch_under && beat_epoch - last_epoch_under < g_conf()->mds_bal_overload_epochs) {
dout(7) << " i am overloaded, but only for " << (beat_epoch - last_epoch_under) << " epochs" << dendl;
return;
}