Cache性能分析
Cache是提升性能、改善用户体验的关键模块。在分析Cache性能时,需要关注Cache配置对系统写性能的影响。
Cache的写策略为回写,每一个写I/O到达Cache就返回给主机写入成功响应,然后通过Cache对数据进行重新排序和合并,再统一写入到硬盘。
在业务运行过程中,当出现电池故障、系统单控、控制器高温、LUN Fault页面超标等原因时可能会触发LUN健康状态为写保护,此时写I/O请求无法写入硬盘,但是可以读取硬盘中存储的数据。开启写保护时,硬盘内的数据不会被修改,有效保护硬盘数据。
可以根据DeviceManager管理界面或者CLI命令查看LUN属性得到当前的LUN的健康状态及Cache的写策略。
- 通过DeviceManager管理界面查看:
- 通过执行show lun general命令查看:
admin:/>show lun general lun_id=0 ID : 0 Name : lun_CD_1GB_1 Pool ID : 0 Capacity : 1.000GB Subscribed Capacity : 0.000B Protection Capacity : 0.000B Sector Size : 512.000B Health Status : Normal Running Status : Online Type : Thin IO Priority : Low WWN : 6002d52100eb42b40109934300000000 Exposed To Initiator : No Data Distributing : -- Write Policy : Write Back Running Write Policy : Write Back Prefetch Policy : None Read Cache Policy : -- Write Cache Policy : -- Cache Partition ID : -- Prefetch Value : -- Owner Controller : -- Work Controller : -- Snapshot ID(s) : 285 LUN Copy ID(s) : -- Remote Replication ID(s) : -- Split Clone ID(s) : -- Relocation Policy : -- Initial Distribute Policy : -- SmartQoS Policy ID : -- Protection Duration(days) : -- Has Protected For(h) : -- Estimated Data To Move To Tier0 : -- Estimated Data To Move To Tier1 : -- Estimated Data To Move To Tier2 : -- Is Add To Lun Group : Yes Smart Cache Partition ID : -- DIF Switch : No Remote LUN WWN : -- Disk Location : Internal LUN Migration : -- Progress(%) : -- Smart Cache Cached Size : -- Smart Cache Hit Rage(%) : -- Mirror Type : -- Thresholds Percent(%) : 90 Thresholds Switch : Off Usage Type : Internal HyperMetro ID(s) : -- Dedup Enabled : -- Compression Enabled : -- Workload Type Name : Default Is Clone : No LUN Clone ID(s) : -- Snapshot Schedule ID : -- Description : HyperCopy ID(s) : -- HyperCDP Schedule ID : -- LUN consistency group ID : -- Clone ID(s) : -- LUN protection group ID(s) : -- Function Type : Lun NGUID : 7100eb42b4010993002d524300000000
- “Health Status”表示LUN的健康状态。
- “Write Policy”表示Cache写策略。
- “Running Write Policy”表示当前Cache写策略。
当出现LUN健康状态为写保护时,此时应该及时排查触发原因,如电池故障、系统单控、控制器高温、LUN Fault页面超标等。具体导致LUN转写保护的场景及处理策略请参见《基础存储业务配置指南》中“规划LUN策略”章节。