mirror of
https://github.com/ceph/ceph
synced 2025-02-22 02:27:29 +00:00
Merge pull request #53332 from zhsgao/mds_overload_epochs
mds: add option mds_bal_overload_epochs Reviewed-by: Venky Shankar <vshankar@redhat.com>
This commit is contained in:
commit
acd7f82846
@ -34,6 +34,7 @@
|
||||
.. 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
|
||||
|
@ -819,6 +819,16 @@ options:
|
||||
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
|
||||
|
@ -766,7 +766,7 @@ void MDBalancer::prep_rebalance(int beat)
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user