Setting PGs on pools
In Chapter 4,Planning your Deployment, we discussed the importance of an appropriate number of placement groups per pool.
Every Ceph pool needs pg_num
PGs set and created before we can write data to it. Ceph avails us of two settings for the PG count. One controls the number of PGs present in the pool, while the second controls the number of PGs actually used to hold Objects in the pool. These are pg_num
and pgp_num
respectively.
Let's discuss pg_num
and pgp_num
in more detail. The pg
prefix of pg_num
means simply placement groups while the pgp
prefix of pgp_num
stands for PGs for placement. When we increase the value of pg_num
, some or all of the existing PGs are broken into multiple PGs, a process we call splitting. A smaller, incremental increase in pg_num
will result in fewer existing PGs being split into multiple new PGs. If we exactly double a pool's current pg_num
value—remember that we strongly favor powers of 2—all existing PGs are split. Splitting is a very expensive...