Chapter 9. Setting placement group auto-scaling
Allowing the cluster to automatically scale PGs based on cluster usage is the simplest approach to scaling PGs. Red Hat Ceph Storage takes the total available storage and the target number of PGs for the whole system, compares how much data is stored in each pool, and apportions the PGs accordingly. The command only makes changes to a pool whose current number of PGs (pg_num
) is more than three times off from the calculated or suggested PG number.
The target number of PGs per OSD is based on the mon_target_pg_per_osd
configurable. The default value is set to 100
.
Procedure
To adjust
mon_target_pg_per_osd
:Syntax
ceph config set global mon_target_pg_per_osd number
ceph config set global mon_target_pg_per_osd number
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:
[ceph: root@host01 /]# ceph config set global mon_target_pg_per_osd 150
[ceph: root@host01 /]# ceph config set global mon_target_pg_per_osd 150
Copy to Clipboard Copied! Toggle word wrap Toggle overflow