]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/options: add `mon_target_pg_per_osd`
authorJohn Spray <john.spray@redhat.com>
Wed, 19 Sep 2018 22:09:41 +0000 (18:09 -0400)
committerSage Weil <sage@redhat.com>
Tue, 18 Dec 2018 16:50:14 +0000 (10:50 -0600)
This is the partner to mon_max_pg_per_osd, where
this is a more conservative target for PG auto adjustment,
leaving some breathing room for situations where we
might temporarily exceed our target PG count (but not
want to exceed our maximum PG count)

Signed-off-by: John Spray <john.spray@redhat.com>
src/common/options.cc

index 681c8a615367332307004588f5b78b33ca1a47d8..0daa306c13b061d7a26275c46427ed1cd7fc9a8f 100644 (file)
@@ -1525,9 +1525,25 @@ std::vector<Option> get_global_options() {
     .set_description("minimal number PGs per (in) osd before we warn the admin"),
 
     Option("mon_max_pg_per_osd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
+    .set_min(1)
     .set_default(250)
     .add_service("mgr")
-    .set_description("Max number of PGs per OSD the cluster will allow"),
+    .set_description("Max number of PGs per OSD the cluster will allow")
+    .set_long_description("If the number of PGs per OSD exceeds this, a "
+        "health warning will be visible in `ceph status`.  This is also used "
+        "in automated PG management, as the threshold at which some pools' "
+        "pg_num may be shrunk in order to enable increasing the pg_num of "
+        "others."),
+
+    Option("mon_target_pg_per_osd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
+    .set_min(1)
+    .set_default(100)
+    .set_description("Automated PG management creates this many PGs per OSD")
+    .set_long_description("When creating pools, the automated PG management "
+        "logic will attempt to reach this target.  In some circumstances, it "
+        "may exceed this target, up to the ``mon_max_pg_per_osd`` limit. "
+        "Conversely, a lower number of PGs per OSD may be created if the "
+        "cluster is not yet fully utilised"),
 
     Option("mon_pg_warn_max_object_skew", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
     .set_default(10.0)