]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: Add "nearest power of two" to PG rule-of-thumb 1438/head
authorFlorian Haas <florian@hastexo.com>
Wed, 12 Mar 2014 18:31:54 +0000 (19:31 +0100)
committerFlorian Haas <florian@hastexo.com>
Wed, 12 Mar 2014 18:51:27 +0000 (19:51 +0100)
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 <florian@hastexo.com>
doc/rados/operations/placement-groups.rst

index fe23a51de4d05d1c7a8d4a6289af628271ba4b5f..2f6fe141dbf90ccc079a367fc7f683100203de16 100644 (file)
@@ -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