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:
Venky Shankar 2023-10-04 13:46:27 +05:30 committed by GitHub
commit acd7f82846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -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;
}