canonical / canonical/microcloud
Set the Ceph OSD PGs based on actual cluster size
- Dominant language
- Go
- Stars
- 532
- Forks
- 83
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 36
Description
When MicroCloud creates the `remote` and `remote-fs` storage pools, LXD by default sets `ceph.osd.pg_num=32` as the default value for the number of placement groups.
However the [upstream guide](https://docs.ceph.com/en/latest/rados/operations/placement-groups/#choosing-the-number-of-pgs) is using the following formula to compute the right value:

Meaning the default of `32` only seems to be valid when running a Ceph cluster with a single OSD and replication factor 3 (1*100/3=33, rounded to nearest power of 2: 32).
Instead we should pick a number which accommodates the number of actual OSDs deployed when forming the cluster with MicroCloud.
Contributor guide
Assessment
This issue has not been assessed yet.