How to fix 'too many PGs' luminous

how did i fix it in 12.2.4 luminous
too many PGs per OSD (380 > max 200) may lead you to many blocking requests

first you need to set


mon_max_pg_per_osd = 800  # < depends on you amount of PGs
osd max pg per osd hard ratio = 10 # < default is 2, try to set at least 5. It will be
mon allow pool delete = true # without it you can't remove a pool 

#restart all MONs and OSDs, one by one

#check the value {$id} <- replace it with your mon/osd id

ceph --admin-daemon /var/run/ceph/ceph-mon.{$id}.asok config get  mon_max_pg_per_osd
ceph --admin-daemon /var/run/ceph/ceph-osd.{$id}.asok config get osd_max_pg_per_osd_hard_ratio

#now look at here

rados lspools
ceph osd pool get pg_num

in my case by default pg_num was 128 or something like that (my cluster is 4 years old, it was a lot of upgrades a lot of changes)
you can reduse it like that


ceph osd pool create 8
rados cppool
ceph osd pool delete --yes-i-really-really-mean-it
ceph osd pool rename
ceph osd pool application enable rgw

if it wasn't enough, try to find another pool you can cut

this is it, i hope it will help someone