make lightweight pool pg_num configurable

This commit is contained in:
Edward Hope-Morley 2015-11-19 20:18:10 +00:00
parent ff529e93a6
commit a0360fbcf7
2 changed files with 16 additions and 1 deletions

View File

@ -107,3 +107,17 @@ options:
it stores within RGW pools. Note that once the RGW pools have been
created, changing this value will not have any effect (although it can be
changed in ceph by manually configuring your ceph cluster).
rgw-lightweight-pool-pg-num:
type: int
default: 64
description: |
When the Rados Gatway is installed it, by default, creates pools with
pg_num 8 which, in the majority of cases is suboptimal. A few rgw pools
tend to carry more data than others e.g. .rgw.buckets tends to be larger
than most. So, for pools with greater requirements than others the charm
will apply the optimal value i.e. corresponding to the number of OSDs
up+in the cluster at the time the pool is created. For others it will use
this value which can be altered depending on how big you cluster is. Note
that once a pool has been created, changes to this setting will be
ignored.

View File

@ -265,7 +265,8 @@ def get_create_rgw_pools_rq():
'.users.email'
'.users.swift'
'.users.uid']
pg_num = config('rgw-lightweight-pool-pg-num')
for pool in light:
rq.add_op_create_pool(name=pool, replica_count=replicas, pg_num=100)
rq.add_op_create_pool(name=pool, replica_count=replicas, pg_num=pg_num)
return rq