前端端口性能分析
前端端口负责对主机I/O进行处理,通过分析影响前端端口性能的各种因素,从而发现存储系统可能存在的性能瓶颈。
查看前端端口信息
在分析前端端口性能之前,需要确认接口模块的位置、端口的连接数量、工作状态、速率等信息。
可以通过DeviceManager存储系统管理工具进行查看,也可以通过CLI命令行的方式进行查看。
- 通过DeviceManager存储系统管理工具查看前端端口信息。
- 通过CLI命令show port general进行查看。
admin:/>show port general physical_type=FC ID Health Status Running Status Type Working Rate(Mbps) ---------- ------------- -------------- --------- ------------------ CTE0.A5.P0 Normal Link Up Host Port 8000 CTE0.A5.P1 Normal Link Down Host Port -- CTE0.A5.P2 Normal Link Down Host Port -- CTE0.A5.P3 Normal Link Down Host Port -- CTE0.B5.P0 Normal Link Up Host Port 8000 CTE0.B5.P1 Normal Link Down Host Port -- CTE0.B5.P2 Normal Link Down Host Port -- CTE0.B5.P3 Normal Link Down Host Port -- WWN Role Working Mode Configured Mode Enabled Max Speed(Mbps) ---------------- ----------- ------------ --------------- ------- --------------- 2408112233xxxxxx INI and TGT FC-AL Auto-Adapt Yes 8000 2408112233xxxxxx INI and TGT -- Auto-Adapt Yes 8000 240a112233xxxxxx INI and TGT -- Auto-Adapt Yes 8000 240b112233xxxxxx INI and TGT -- Auto-Adapt Yes 8000 2418112233xxxxxx INI and TGT FC-AL Auto-Adapt Yes 8000 2419112233xxxxxx INI and TGT -- Auto-Adapt Yes 8000 241a112233xxxxxx INI and TGT -- Auto-Adapt Yes 8000 241b112233xxxxxx INI and TGT -- Auto-Adapt Yes 8000
对前端端口接口模块的位置、端口的连接数量、工作状态、速率等信息进行确认后,建议用户对以下三点进行排查。
- 双控所连接的前端端口数量应尽量保证相等,连接的端口应尽量均匀分布在多张前端接口模块上,以使得控制器间和前端接口模块间负载均衡。例如控制器A和控制器B各部署了两个8Gb FC接口模块,各控制器与交换机有4根光纤相连接,此时应该每个FC接口模块各连两根光纤。
- 确认DeviceManager管理软件或CLI显示的前端端口的工作速率与实际规格相符,确保不降级。当发生降级时,需要对网络、交换机、端口光模块等进行故障排查,并更换故障的部件。
- 确认显示的工作模式与实际的组网连接方式相符。其中“P2P”为通过交换机连接,“FC-AL”为直接连接。
查看前端端口并发压力
当需要测试存储的最大性能时,前提条件务必保证主机侧提供足够的并发压力。当主机侧并发任务数量足够大,而性能值(IOPS/带宽)并不高时,可能是主机压力没有传递到存储前端来,也有可能是存储性能达到了瓶颈。
除了通过对比时延的定界方法,也可以通过以下两种方法排查存储前端并发情况来辅助分析。
- 方法一:通过公式进行计算
适用于压力固定的场景,例如利用IOmeter、Vdbench等测试工具进行恒定压力的性能测试。在进行测试时,并发数一般情况下是固定的,通过公式:IOPS=并发数*1000/时延(单位:ms),在可观察到IOPS和时延时,可以反推并发数,了解前端并发压力。例如IOPS为3546,时延为6.77ms,则并发数=3546*6.77/1000=24。
- 方法二:通过CLI命令得到近似的前端并发数
适用于压力变化的场景。通过show controller io io_type=frontEnd controller_id=XX命令可以查询指定控制器的前端I/O并发数,多次执行此命令,取稳定值可以近似表示下发到控制器的前端并发数。“XX”表示控制器ID。
admin:/>show controller io io_type=frontEnd controller_id=0A Controller Id : 0A Front End IO : 0 Front End Limit : 17408
当时延很低时,通过show controller io命令获得的并发数可能不准确,此时可采用方法一进行分析。
查询前端并发压力不足时,建议加大主机侧的并发压力,并观察前端并发压力是否有所提升。如果查询前端并发压力并未改善,请定位主机侧问题。
查看前端端口是否有误码
在出现频繁的性能波动和异常跌落时,怀疑前端端口或链路有异常,此时需要查看前端端口是否有误码。
用户可以通过DeviceManager管理界面、CLI命令或者巡检报告排查前端端口是否出现误码。
不同版本查看到的前端端口的误码信息存在差异,请以实际界面为准。
- 通过DeviceManager管理界面查看前端端口(FC/iSCSI)的误码信息。
- 可以通过show port bit_error命令查看前端端口的误码信息。
admin:/>show port bit_error ETH port: ID Error Packets Lost Packets Over Flowed Packets Start Time --------------- ------------- ------------ ------------------- ----------------------------- CTE0.L1.IOM1.P0 0 0 0 2015-08-14/23:02:16 UTC+08:00 CTE0.L1.IOM1.P1 0 0 0 2015-08-14/23:02:16 UTC+08:00 CTE0.L1.IOM1.P2 0 0 0 2015-08-14/23:01:58 UTC+08:00 CTE0.L1.IOM1.P3 0 0 0 2015-08-14/23:01:58 UTC+08:00 CTE0.L2.IOM1.P0 0 0 0 2015-08-14/23:01:58 UTC+08:00 CTE0.L2.IOM1.P1 0 0 0 2015-08-14/23:01:58 UTC+08:00 CTE0.L2.IOM1.P2 0 0 0 2015-08-14/23:01:58 UTC+08:00 CTE0.L2.IOM1.P3 0 0 0 2015-08-14/23:01:58 UTC+08:00 CTE0.L3.IOM1.P0 0 0 0 2015-08-14/23:02:16 UTC+08:00 CTE0.L3.IOM1.P1 0 0 0 2015-08-14/23:02:16 UTC+08:00 FC port: ID Lost Signals Link Errors Codes Lost Synchronizations Failed Connections Start Time --------------- ------------ ----------------- --------------------- ------------------ ----------------------------- CTE0.R3.IOM0.P0 0 0 0 0 2015-08-14/22:58:02 UTC+08:00 CTE0.R3.IOM0.P1 0 5 0 0 2015-08-14/22:58:02 UTC+08:00 CTE0.R3.IOM0.P2 0 5 0 0 2015-08-14/22:58:02 UTC+08:00 CTE0.R3.IOM0.P3 0 4 0 0 2015-08-14/22:58:02 UTC+08:00 CTE0.R1.IOM1.P0 0 5 0 0 2015-08-14/22:58:16 UTC+08:00 CTE0.R1.IOM1.P1 0 1 0 0 2015-08-14/22:58:16 UTC+08:00 CTE0.R1.IOM1.P2 0 1 0 0 2015-08-14/22:58:16 UTC+08:00 CTE0.R1.IOM1.P3 0 0 0 0 2015-08-14/22:58:16 UTC+08:00 SAS port: ID Invalid Dword Consist Errors Loss Of DWORD PHY Reset Errors Start Time ------------ ------------- -------------- ------------- ---------------- ----------------------------- CTE0.R5.P0 61 52 2 25 2015-08-14/23:04:02 UTC+08:00 CTE0.R5.P1 0 0 0 0 2015-08-14/23:04:03 UTC+08:00 CTE0.R5.P2 0 0 0 0 2015-08-14/23:04:03 UTC+08:00 CTE0.R5.P3 0 0 0 0 2015-08-14/23:04:04 UTC+08:00 CTE0.R5.P4 0 0 0 0 2015-08-14/23:04:05 UTC+08:00 CTE0.R5.P5 0 0 0 0 2015-08-14/23:04:06 UTC+08:00 CTE0.R5.P6 0 0 0 0 2015-08-14/23:04:06 UTC+08:00 CTE0.R5.P7 0 0 0 0 2015-08-14/23:04:07 UTC+08:00 CTE0.R5.P8 0 0 0 0 2015-08-14/23:04:08 UTC+08:00 CTE0.R5.P9 0 0 0 0 2015-08-14/23:04:08 UTC+08:00 CTE0.R5.P10 0 0 0 0 2015-08-14/23:04:09 UTC+08:00 CTE0.R5.P11 0 0 0 0 2015-08-14/23:04:10 UTC+08:00 CTE0.L5.P0 42 43 1 6 2015-08-14/23:04:12 UTC+08:00 CTE0.L5.P1 0 0 0 0 2015-08-14/23:04:13 UTC+08:00 CTE0.L5.P2 0 0 0 0 2015-08-14/23:04:14 UTC+08:00 CTE0.L5.P3 0 0 0 0 2015-08-14/23:04:15 UTC+08:00 CTE0.L5.P4 0 0 0 0 2015-08-14/23:04:15 UTC+08:00 CTE0.L5.P5 0 0 0 0 2015-08-14/23:04:16 UTC+08:00 CTE0.L5.P6 0 0 0 0 2015-08-14/23:04:17 UTC+08:00 CTE0.L5.P7 0 0 0 0 2015-08-14/23:04:17 UTC+08:00 CTE0.L5.P8 0 0 0 0 2015-08-14/23:04:18 UTC+08:00 CTE0.L5.P9 0 0 0 0 2015-08-14/23:04:25 UTC+08:00 CTE0.L5.P10 0 0 0 0 2015-08-14/23:04:27 UTC+08:00 CTE0.L5.P11 0 0 0 0 2015-08-14/23:04:28 UTC+08:00 DAE000.A.PRI 0 0 0 0 2015-08-14/23:00:03 UTC+08:00 DAE000.A.EXP 0 0 0 0 2015-08-14/23:00:03 UTC+08:00 DAE000.B.PRI 0 0 0 0 2015-08-14/23:04:29 UTC+08:00 DAE000.B.EXP 0 0 0 0 2015-08-14/23:04:29 UTC+08:00 DAE001.A.PRI 2253 2256 3 5 2015-08-14/23:00:12 UTC+08:00 DAE001.A.EXP 0 0 0 0 2015-08-14/22:59:46 UTC+08:00 DAE001.B.PRI 65 66 2 4 2015-08-14/23:00:01 UTC+08:00 DAE001.B.EXP 0 0 0 0 2015-08-14/23:00:01 UTC+08:00 DAE002.A.PRI 35 35 2 5 2015-08-14/23:00:02 UTC+08:00 DAE002.A.EXP 0 0 0 0 2015-08-14/23:00:02 UTC+08:00 DAE002.B.PRI 77 79 2 5 2015-08-14/22:59:46 UTC+08:00 DAE002.B.EXP 0 0 0 0 2015-08-14/23:00:02 UTC+08:00 FCoE port: ID Error Packets Lost Packets Over Flowed Packets Start Time --------------- ------------- ------------ ------------------- ----------------------------- CTE0.L3.IOM1.P0 0 0 0 2015-08-14/23:02:16 UTC+08:00 CTE0.L3.IOM1.P1 0 0 0 2015-08-14/23:02:16 UTC+08:00
如果前端端口出现误码持续增加,则说明前端端口或者链路存在性能问题。此时建议用户更换光纤或光模块。
前端端口性能指标
前端端口主要关注的性能指标包括:平均读I/O响应时间、平均写I/O响应时间、平均I/O大小、IOPS、带宽。
用户可以通过DeviceManager管理界面、SystemReporter性能监控工具或者CLI命令查看前端端口的各项性能指标。
不同版本查看到的前端端口性能指标存在差异,请以实际界面为准。
- 通过DeviceManager管理界面进行查看,操作入口:“监控 > 性能监控 > 前端端口”。
- 通过SystemReporter性能监控工具进行查看,操作入口:“监控 > 实时监控 > 前端端口”。
- 通过CLI命令show performance port进行查看。
admin:/>show performance port port_id=CTE0.A5.P0 0.Max. Bandwidth(MB/s) 1.Usage Ratio(%) 2.Queue Length 3.Bandwidth(MB/s) / Block Bandwidth(MB/s) 4.Throughput(IOPS)(IO/s) 5.Read Bandwidth(MB/s) 6.Average Read I/O Size(KB) 7.Read Throughput(IOPS)(IO/s) 8.Write Bandwidth(MB/s) 9.Average Write I/O Size(KB) 10.Write Throughput(IOPS)(IO/s) 11.Service Time(Excluding Queue Time)(ms) 12.Read I/O Granularity Distribution: [0K,1K)(%) 13.Read I/O Granularity Distribution: [1K,2K)(%) 14.Read I/O Granularity Distribution: [2K,4K)(%) 15.Read I/O Granularity Distribution: [4K,8K)(%) 16.Read I/O Granularity Distribution: [8K,16K)(%) 17.Read I/O Granularity Distribution: [16K,32K)(%) 18.Read I/O Granularity Distribution: [32K,64K)(%) 19.Read I/O Granularity Distribution: [64K,128K)(%) 20.Read I/O Granularity Distribution: [128K,256K)(%) 21.Read I/O Granularity Distribution: [256K,512K)(%) 22.Read I/O Granularity Distribution: >= 512K(%) 23.Write I/O Granularity Distribution: [0K,1K)(%) 24.Write I/O Granularity Distribution: [1K,2K)(%) 25.Write I/O Granularity Distribution: [2K,4K)(%) 26.Write I/O Granularity Distribution: [4K,8K)(%) 27.Write I/O Granularity Distribution: [8K,16K)(%) 28.Write I/O Granularity Distribution: [16K,32K)(%) 29.Write I/O Granularity Distribution: [32K,64K)(%) 30.Write I/O Granularity Distribution: [64K,128K)(%) 31.Write I/O Granularity Distribution: [128K,256K)(%) 32.Write I/O Granularity Distribution: [256K,512K)(%) 33.Write I/O Granularity Distribution: >= 512K(%) 34.Average IO Size 35.% Read 36.% Write 37.Max IOPS(IO/s) 38.Average I/O Latency(us) 39.Max. I/O Latency(us) 40.Average Read I/O Latency(us) 41.Average Write I/O Latency(us) 42.Request Queue Usage(%) 43.Receiving bandwidth for replication (MB/s) 44.Sending bandwidth for replication (MB/s) 45.The cumulative count of I/Os 46.The cumulative count of data transferred in Kbytes 47.The cumulative elapsed I/O time(ms) 48.The cumulative count of all reads 49.The cumulative count of all writes Input item(s) number seperated by comma:
通过查看前端端口的各项性能指标,用户可以对前端端口性能指标进行分析,初步定位可能的出现的性能问题。
- 平均读写时延:定位性能问题时,首先需要将统计到的前端端口平均时延与主机侧看到的时延进行比较,查看是否有存在较大差异,定界问题是否有可能出现在存储侧。另外,还可以通过比较前端端口时延与后端硬盘域和硬盘的时延差异,初步判断I/O特性。例如读业务的场景,如果前端端口时延远小于后端,则可能是顺序读I/O或存在较高命中,如果前端端口时延与后端接近,则说明可能是随机读I/O。
统计的I/O前端时延不包括存储与主机交互和链路传输的时延。
- 平均I/O大小:表示阵列收到的I/O的平均大小。如果I/O大小与主机下发的I/O大小不一致,则说明在主机侧或HBA驱动进行了I/O拆分或合并。
- IOPS和带宽:需要比较各个前端端口的IOPS和带宽的差异,从而判断各个端口所连接的主机下发的业务压力差异,并判断前端压力是否均衡。特别需要注意前端端口的带宽是否接近链路的理论极限带宽,导致前端带宽成为性能瓶颈。