摘要:对ceph OSD磁盘,做好定期的性能数据采集和通电时长管理,长期的数据积累对磁盘的性能与生命周期管理会有一定帮助,同时也能确保整个集群性能的稳定。
磁盘碎片管理
查看磁盘碎片
# xfs_db -c frag -r /dev/sdb1actual 981, ideal 964, fragmentation factor 1.73%
整理碎片
# xfs_fsr /dev/sdb1
OSD磁盘性能
root@demo:~# ceph --admin-daemon /var/run/ceph/ceph-osd.0.asok perf dump{ "WBThrottle": { "bytes_dirtied": 0, "bytes_wb": 0, "ios_dirtied": 0, "ios_wb": 0, "inodes_dirtied": 0, "inodes_wb": 0 }, "filestore": { "journal_queue_max_ops": 300, "journal_queue_ops": 0, "journal_ops": 3210, "journal_queue_max_bytes": 33554432, "journal_queue_bytes": 0, "journal_bytes": 5007708, "journal_latency": { "avgcount": 3210, "sum": 9.786657669 }, "journal_wr": 2643, "journal_wr_bytes": { "avgcount": 2643, "sum": 13221888 }, "journal_full": 0, "committing": 0, "commitcycle": 270, "commitcycle_interval": { "avgcount": 270, "sum": 1352.249982669 }, "commitcycle_latency": { "avgcount": 270, "sum": 2.088010691 }, "op_queue_max_ops": 50, "op_queue_ops": 0, "ops": 3210, "op_queue_max_bytes": 104857600, "op_queue_bytes": 0, "bytes": 4962768, "apply_latency": { "avgcount": 3210, "sum": 34.241022045 }, "queue_transaction_latency_avg": { "avgcount": 3210, "sum": 0.431766161 } },......}
root@demo:~# ceph osd perfosd fs_commit_latency(ms) fs_apply_latency(ms) 0 3 10 1 3 12 2 3 13
通电时长
# smartctl -A /dev/sdasmartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.8.0-44-generic] (local build)Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.netCurrent Drive Temperature: 27 CDrive Trip Temperature: 65 CElements in grown defect list: 0Vendor (Seagate) cache information Blocks sent to initiator = 0Vendor (Seagate/Hitachi) factory information number of hours powered up = 53413.70 number of minutes until next internal SMART test = 7