From: Florian Haas Date: Wed, 12 Mar 2014 18:31:54 +0000 (+0100) Subject: doc: Add "nearest power of two" to PG rule-of-thumb X-Git-Tag: v0.79~162^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=047287afbe0ddfaaafd05e9dbf25c1c7dea9a1be;p=ceph.git doc: Add "nearest power of two" to PG rule-of-thumb Following an IRC discussion, it emerged that it would be helpful to explain the merit of choosing a number of PGs per pool that is a power of two, to keep PGs at roughly equal sizes in case of PG splits. See http://irclogs.ceph.widodh.nl/index.php?date=2014-03-12 for the original discussion. Signed-off-by: Florian Haas --- diff --git a/doc/rados/operations/placement-groups.rst b/doc/rados/operations/placement-groups.rst index fe23a51de4d0..2f6fe141dbf9 100644 --- a/doc/rados/operations/placement-groups.rst +++ b/doc/rados/operations/placement-groups.rst @@ -44,9 +44,19 @@ to balance out memory and CPU requirements and per-OSD load. For a single pool of objects, you can use the following formula:: (OSDs * 100) - Total PGs = ------------ + Total PGs = ------------ *(rounded up to the nearest power of 2)* Replicas +The rounding to the nearest power of two is optional, but recommended +if you want to ensure that all placement groups are roughly the same size. + +As an example, for a cluster with 200 OSDs and a pool size of 3 +replicas, you would estimate your number of PGs as follows: + + (200 * 100) + ----------- = 6667. Nearest power of 2: 8192 + 3 + When using multiple data pools for storing objects, you need to ensure that you balance the number of placement groups per pool with the number of placement groups per OSD so that you arrive at a reasonable total number of placement @@ -184,4 +194,4 @@ entirely. To mark the "unfound" objects as "lost", execute the following:: pg-concepts -.. _Create a Pool: ../pools#createpool \ No newline at end of file +.. _Create a Pool: ../pools#createpool