簡(jiǎn)介
部署好對(duì)象存儲(chǔ)網(wǎng)關(guān),用cosbench對(duì)radosgw進(jìn)行壓測(cè)發(fā)現(xiàn)讀寫(xiě)吞吐量比較低,后來(lái)發(fā)現(xiàn)需要對(duì)radosgw自帶的civetweb進(jìn)行參數(shù)優(yōu)化,如:線程數(shù)、線程池大小、rados操作數(shù)等等,配置完畢后發(fā)現(xiàn)cpu使用率上升,網(wǎng)絡(luò)連接數(shù)上升,每秒處理數(shù)也提升,具體配置如下,每臺(tái)網(wǎng)關(guān)都要配置,并且重啟。
配置
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 ceph-radosgw@rgw.ceph-object-01.service
參考
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