3.4.2. 在简单配置中配置 Bucket Index Sharding
要在所有新存储桶上启用和配置 bucket 索引分片,请使用 rgw_override_bucket_index_max_shards 参数。将参数设置为:
-
0禁用存储桶索引分片。这是默认值。 -
值大于
0,以启用存储桶分片并设置分片的最大数量。
先决条件
- 阅读 bucket 分片限制。
流程
计算推荐的分片数量。要做到这一点,请使用以下公式:
number of objects expected in a bucket / 100,000请注意,分片的最大数量为 65521。
将
rgw_override_bucket_index_max_shards添加到 Ceph 配置文件:rgw_override_bucket_index_max_shards = value使用上一步中计算的推荐分片数量替换 value,例如:
rgw_override_bucket_index_max_shards = 10-
要为 Ceph 对象网关的所有实例配置 bucket 索引分片,请在
[global]部分下添加rgw_override_bucket_index_max_shards。 -
要仅为 Ceph 对象网关的特定实例配置 bucket 索引分片,请在实例下添加
rgw_override_bucket_index_max_shards。
-
要为 Ceph 对象网关的所有实例配置 bucket 索引分片,请在
重启 Ceph 对象网关:
$ sudo service radosgw restart id=rgw.hostname使用运行 Ceph 对象网关的节点的短 主机名替换 hostname。