Skip to content

Commit 3acda2b

Browse files
Merge pull request ceph#52081 from YiteGu/mds-optracked-have-no-slow-op-threshold
mds/MDSRank: Add set_history_slow_op_size_and_threshold for op_tracker Reviewed-by: Venky Shankar <[email protected]> Reviewed-by: Patrick Donnelly <[email protected]> Reviewed-by: Dhairya Parmar <[email protected]> Reviewed-by: Rishabh Dave <[email protected]>
2 parents f0588bd + 9b88a47 commit 3acda2b

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

src/common/options/mds.yaml.in

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,24 @@ options:
11661166
services:
11671167
- mds
11681168
with_legacy: true
1169+
# Max number of slow ops to track
1170+
- name: mds_op_history_slow_op_size
1171+
type: uint
1172+
level: advanced
1173+
desc: maximum size for list of historical slow operations
1174+
default: 20
1175+
services:
1176+
- mds
1177+
with_legacy: true
1178+
# Track the op if over this threshold
1179+
- name: mds_op_history_slow_op_threshold
1180+
type: uint
1181+
level: advanced
1182+
desc: track the op if over this threshold
1183+
default: 10
1184+
services:
1185+
- mds
1186+
with_legacy: true
11691187
# how many seconds old makes an op complaint-worthy
11701188
- name: mds_op_complaint_time
11711189
type: float

src/mds/MDSRank.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,8 @@ MDSRank::MDSRank(
550550
cct->_conf->mds_op_log_threshold);
551551
op_tracker.set_history_size_and_duration(cct->_conf->mds_op_history_size,
552552
cct->_conf->mds_op_history_duration);
553+
op_tracker.set_history_slow_op_size_and_threshold(cct->_conf->mds_op_history_slow_op_size,
554+
cct->_conf->mds_op_history_slow_op_threshold);
553555

554556
schedule_update_timer_task();
555557
}
@@ -3850,6 +3852,9 @@ void MDSRankDispatcher::handle_conf_change(const ConfigProxy& conf, const std::s
38503852
if (changed.count("mds_op_history_size") || changed.count("mds_op_history_duration")) {
38513853
op_tracker.set_history_size_and_duration(conf->mds_op_history_size, conf->mds_op_history_duration);
38523854
}
3855+
if (changed.count("mds_op_history_slow_op_size") || changed.count("mds_op_history_slow_op_threshold")) {
3856+
op_tracker.set_history_slow_op_size_and_threshold(conf->mds_op_history_slow_op_size, conf->mds_op_history_slow_op_threshold);
3857+
}
38533858
if (changed.count("mds_enable_op_tracker")) {
38543859
op_tracker.set_tracking(conf->mds_enable_op_tracker);
38553860
}

0 commit comments

Comments
 (0)