From: Sage Weil Date: Mon, 23 Sep 2019 19:40:48 +0000 (-0500) Subject: osd/OSDMap: health alert for non-power-of-two pg_num X-Git-Tag: v14.2.8~85^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4108c4657eebf2e70d2f503ad7a511a959afb778;p=ceph.git osd/OSDMap: health alert for non-power-of-two pg_num Fixes: https://tracker.ceph.com/issues/41647 Signed-off-by: Sage Weil (cherry picked from commit 6e46b1c0e50ad377d5db058e0452b0d956b3fad6) Conflicts: PendingReleaseNotes - dropped this change, since it does not apply to nautilus src/osd/OSDMap.cc - checks->add() takes an additional argument in master - dropped it --- diff --git a/doc/rados/operations/health-checks.rst b/doc/rados/operations/health-checks.rst index 2ed2da4871a9..3cbf9eae4afa 100644 --- a/doc/rados/operations/health-checks.rst +++ b/doc/rados/operations/health-checks.rst @@ -636,6 +636,23 @@ The PG count for existing pools can be increased or new pools can be created. Please refer to :ref:`choosing-number-of-placement-groups` for more information. +POOL_PG_NUM_NOT_POWER_OF_TWO +____________________________ + +One or more pools has a ``pg_num`` value that is not a power of two. +Although this is not strictly incorrect, it does lead to a less +balanced distribution of data because some PGs have roughly twice as +much data as others. + +This is easily corrected by setting the ``pg_num`` value for the +affected pool(s) to a nearby power of two:: + + ceph osd pool set pg_num + +This health warning can be disabled with:: + + ceph config set global mon_warn_on_pool_pg_num_not_power_of_two false + POOL_TOO_FEW_PGS ________________ diff --git a/src/common/options.cc b/src/common/options.cc index 2bee6e90fd60..141db25016ca 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -1735,6 +1735,11 @@ std::vector