Skip to content

Commit

Permalink
Merge PR ceph#53332 into wip-vshankar-testing-20230926.081818
Browse files Browse the repository at this point in the history
* refs/pull/53332/head:
	mds: add option mds_bal_overload_epochs
  • Loading branch information
vshankar committed Sep 26, 2023
2 parents 3e683d1 + 17ae57d commit 5396c6e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/cephfs/mds-config-ref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions src/common/options/mds.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/mds/MDBalancer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5396c6e

Please sign in to comment.