mirror of
https://github.com/ceph/ceph
synced 2025-02-20 09:27:35 +00:00
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 <florian@hastexo.com>
This commit is contained in:
parent
9987e486ad
commit
047287afbe
@ -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
|
||||
.. _Create a Pool: ../pools#createpool
|
||||
|
Loading…
Reference in New Issue
Block a user