Merge pull request #10863 from rook/mergify/bp/release-1.10/pr-10781

docs/storage-config: add yaml way of configuring pg_num and pgp_num (backport #10781)
This commit is contained in:
Travis Nielsen authored and GitHub committed 2022-09-01 12:09:02 -06:00
commit 00b21f4807
2 files changed
+34 -6

No files matched your search

@@ -159,8 +159,10 @@ a common practice for those looking to target certain workloads onto faster
!!! note
Since Ceph Nautilus (v14.x), you can use the Ceph MGR `pg_autoscaler`
module to auto scale the PGs as needed. If you want to enable this feature,
please refer to [Default PG and PGP counts](ceph-configuration.md#default-pg-and-pgp-counts).
module to auto scale the PGs as needed. It is highly advisable to configure
default pg_num value on per-pool basis, If you want to enable this feature,
please refer to [Default PG and PGP
counts](configuration.md#default-pg-and-pgp-counts).
The general rules for deciding how many PGs your pool(s) should contain is:
@@ -20,11 +20,37 @@ configuration options which users are well advised to consider for any productio
### Default PG and PGP counts
The number of PGs and PGPs can be configured on a per-pool basis, but it is highly advised to set
default values that are appropriate for your Ceph cluster. Appropriate values depend on the number
of OSDs the user expects to have backing each pool. The Ceph [OSD and Pool config
The number of PGs and PGPs can be configured on a per-pool basis, but it is
advised to set default values that are appropriate for your Ceph
cluster.
Appropriate values depend on the number of OSDs the user expects to have
backing each pool. These can be configured by declaring pg_num and pgp_num
parameters under CephBlockPool resource.
For determining the right value for pg_num please refer [placement group
sizing](ceph-configuration.md#placement-group-sizing)
In this example configuration, 128 PGs are applied to the pool:
```yaml
apiVersion: ceph.rook.io/v1
kind: CephBlockPool
metadata:
name: ceph-block-pool-test
namespace: rook-ceph
spec:
deviceClass: hdd
replicated:
size: 3
spec:
parameters:
pg_num: '128' # create the pool with a pre-configured placement group number
pgp_num: '128' # this should at least match `pg_num` so that all PGs are used
```
Ceph [OSD and Pool config
docs](https://docs.ceph.com/docs/master/rados/operations/placement-groups/#a-preselection-of-pg-num)
provide detailed information about how to tune these parameters: `osd_pool_default_pg_num` and `osd_pool_default_pgp_num`.
provide detailed information about how to tune these parameters.
Nautilus [introduced the PG auto-scaler mgr module](https://ceph.com/rados/new-in-nautilus-pg-merging-and-autotuning/)
capable of automatically managing PG and PGP values for pools. Please see