【ceph】对象存储网关优化

简介

部署好对象存储网关,用cosbench对radosgw进行压测发现读写吞吐量比较低,后来发现需要对radosgw自带的civetweb进行参数优化,如:线程数、线程池大小、rados操作数等等,配置完毕后发现cpu使用率上升,网络连接数上升,每秒处理数也提升,具体配置如下,每台网关都要配置,并且重启。

配置

cat /etc/ceph/ceph.conf
[client.rgw.ceph-object-01]
rgw_frontends = "civetweb port=7480 num_threads=2048"
rgw host = 0.0.0.0
rgw thread pool size = 10240
rgw op thread timeout = 600
rgw num rados handles = 1024
rgw num control oids = 100
rgw cache enabled = true
rgw cache lru size = 10000
rgw get obj max req size = 4 << 2000
rgw enable usage log = true
rgw usage log tick interval = 30
rgw usage log flush threshold = 1024
rgw usage max shards = 32
rgw usage max user shards = 1

重启

systemctl restart [email protected]

参考

http://docs.ceph.com/docs/mimic/rados/api/librados-intro/#step-2-configuring-a-cluster-handle
http://docs.ceph.com/docs/giant/radosgw/config-ref/
http://docs.ceph.com/docs/mimic/radosgw/frontends/
https://civetweb.github.io/civetweb/UserManual.html

你可能感兴趣的:(【ceph】对象存储网关优化)