From: Sage Weil Date: Thu, 16 Jan 2020 17:22:34 +0000 (-0600) Subject: osd: trim pg logs based on a per-osd budget X-Git-Tag: v15.1.0~124^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0db140c15c16ce45de2e59f075de2b70c0a9cd95;p=ceph.git osd: trim pg logs based on a per-osd budget Set the default budget based on the current defaults: 3000 per osd, and a rule of thumb target of 100 PGs per OSD. Set the per-PG trim target by dividing the overall value by the number of PGs on the OSD. Increase the max pg log length alone, so if the OSD has <100 PGs, those PGs will get more entries. Reduce the minimum to be smaller than the max. Use the min/max config options to bracket what is allocated to a single PG. Signed-off-by: Sage Weil --- diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index 875f64dc92a..7aff6bedcad 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -721,6 +721,7 @@ OPTION(osd_kill_backfill_at, OPT_INT) // Bounds how infrequently a new map epoch will be persisted for a pg OPTION(osd_pg_epoch_persisted_max_stale, OPT_U32) // make this < map_cache_size! +OPTION(osd_target_pg_log_entries_per_osd, OPT_U32) OPTION(osd_min_pg_log_entries, OPT_U32) // number of entries to keep in the pg log when trimming it OPTION(osd_max_pg_log_entries, OPT_U32) // max entries, say when degraded, before we trim OPTION(osd_pg_log_dups_tracked, OPT_U32) // how many versions back to track combined in both pglog's regular + dup logs diff --git a/src/common/options.cc b/src/common/options.cc index 51d5d48080f..1810dea7370 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -3302,15 +3302,21 @@ std::vector