exceeds that setting the MDS starts writing back metadata so that it
can remove (trim) the oldest segments. If this writeback is happening
too slowly, or a software bug is preventing trimming, then this health
-message may appear. The threshold for this message to appear is for the
-number of segments to be double ``mds_log_max_segments``.
+message may appear. The threshold for this message to appear is controlled by
+the config option ``mds_log_warn_factor``, the default is 2.0.
Message: "Client *name* failing to respond to capability release"
Code: MDS_HEALTH_CLIENT_LATE_RELEASE, MDS_HEALTH_CLIENT_LATE_RELEASE_MANY
.set_default(128)
.set_description("maximum number of segments which may be untrimmed"),
+ Option("mds_log_warn_factor", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
+ .set_default(2.0)
+ .set_min(1.0)
+ .set_flag(Option::FLAG_RUNTIME)
+ .set_description("trigger MDS_HEALTH_TRIM warning when the mds log is longer than mds_log_max_segments * mds_log_warn_factor"),
+
Option("mds_bal_export_pin", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
.set_default(true)
.set_description("allow setting directory export pins to particular ranks"),
}
// Detect MDS_HEALTH_TRIM condition
- // Arbitrary factor of 2, indicates MDS is not trimming promptly
+ // Indicates MDS is not trimming promptly
{
- if (mds->mdlog->get_num_segments() > (size_t)(g_conf()->mds_log_max_segments * 2)) {
+ if (mds->mdlog->get_num_segments() > (size_t)(g_conf()->mds_log_max_segments * g_conf().get_val<double>("mds_log_warn_factor"))) {
std::ostringstream oss;
oss << "Behind on trimming (" << mds->mdlog->get_num_segments()
<< "/" << g_conf()->mds_log_max_segments << ")";