大网数据广告活动
服务器运维问答

ifconfig apparently showing wrong RX/TX values for InfiniBand HCA

· 52CE 我爱测

Recently, I executed a watch -n 1 ipconfig on one of our Linux cluster computing nodes while it was running a 48-process MPI run, disributed over several nodes. Oddly, while Ethernet packets seem to be counted correctly (a few kb…

问题原文

原帖链接 · andreee · CC BY-SA 3.0

Recently, I executed a watch -n 1 ipconfig on one of our Linux cluster computing nodes while it was running a 48-process MPI run, disributed over several nodes. Oddly, while Ethernet packets seem to be counted correctly (a few kb/s due to the SSH session), it looks like the IB adapter stays idle (no change in RX/TX packets and bytes).

MPI over IB is definitely working on our cluster (we did several checks and anyway people would have noticed if not) and even more strangely, if I ping the InfiniBand-HCA from another node, suddenly packets are counted.

Admittedly my knowledge about IB is quite limited, but I know that one of the key aspects for improved performance with InfiniBand is due to the bypassing of the (kernel) network stack by implementing it directly into hardware (or so I thought - please correct me if I'm wrong!).

My explanation would be that the kernel isn't able to properly intercept the traffic due to missing information in the respective layer as the packets don't reach the kernel - does this sound reasonable? However, I'm not sure what is happening in the ICMP case then. Maybe data sent over IPoIB does trigger the respective kernel routines for packet counting while "IB-native" protocols (verbs, RDMA) do not?

Unfortunately I could not find any information on that matter in the internet.

已采纳解答

原帖链接 · Thomas · CC BY-SA 3.0

You are correct with your assumptions. When running MPI over Infiniband, you normally want to bypass the network stack and use RDMA/Verbs interface to have full performance. All communication sent over this interface will not be accounted on the IPoIB interface ib0 e.g.

To monitor the traffic the Infiniband card is doing, you can see in /sys/class/infiniband/mlx4_0/ports/1/counters/ for counters. Unfortunately those are only 32bit counters which fill up very quickly in Infiniband, so you should have installed perfquery which can collect the performance counters in your fabric with 64bit counters.

To do a simple query with perfquery locally on a node and get the 64bit counters you could issue the command as follows.

perfquery -x 

You can also get the performance counters of a remote machine by adding the LID of the remove Infiniband device.

perfquery -x -a 2

Where -a says all ports of LID 2.

Please note that the PortXmitData and PortRcvData are per lane numbers and you have to multiply them normally by 4 to get actual Bytes. You also can add a -r to reset the counters to your perfquery which makes it easier to calculate the per second figures.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-03-31)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。