【ceph】scrub&deep-scrub优化

简介

检测底层对象是否一致,开启scrub和deep-scrub后性能会降低很多,因为在做scrub的时候,ceph会对这个chunk进行加锁,这个也就是为什么有slow request,读锁和写锁都会进行。

日志

# cat ceph-osd.1.log
2018-12-17 21:31:10.034620 7fb1a5e49700 0 log_channel(cluster) log [DBG] : 2.2 deep-scrub starts
2018-12-17 21:31:10.043290 7fb1a5e49700 0 log_channel(cluster) log [DBG] : 2.2 deep-scrub ok
2018-12-17 21:31:10.740480 7fb1a664a700 0 log_channel(cluster) log [DBG] : 1.6 scrub starts
2018-12-17 21:31:10.766357 7fb1a664a700 0 log_channel(cluster) log [DBG] : 1.6 scrub ok

优化

osd scrub begin hour = 0
osd scrub end hour = 7
osd scrub chunk min = 1
osd scrub chunk max = 1
osd scrub sleep = 3
osd deep scrub interval = 2419200

注:
测试以上参数优化后IO降低了40%左右

参考

https://ceph.com/planet/关于scrub的详细分析和建议/

你可能感兴趣的:(【ceph】scrub&deep-scrub优化)