我一直在硬件卸载 (HWOL) Conntrack 环境中进行负载测试,并且遇到了一个问题,在测试后,VM 上的所有连接都已终止,但 conntrack 表仍然保留处于 ESTABLISHED 状态的流。
以下是 conntrack 表的片段:
root@test02:/# conntrack -L | grep ESTA | head -n 10
tcp 6 85390 ESTABLISHED src=10.168.68.115 dst=10.168.66.221 sport=9172 dport=8080 src=10.168.66.221 dst=10.168.68.115 sport=8080 dport=9172 [ASSURED] zone=15 use=1
tcp 6 86092 ESTABLISHED src=10.168.68.118 dst=10.168.66.14 sport=35885 dport=8080 src=10.168.66.14 dst=10.168.68.118 sport=8080 dport=35885 [ASSURED] zone=2 use=1
tcp 6 85561 ESTABLISHED src=10.168.68.218 dst=10.168.66.221 sport=24124 dport=8080 src=10.168.66.221 dst=10.168.68.218 sport=8080 dport=24124 [ASSURED] zone=15 use=1
tcp 6 85721 ESTABLISHED src=10.168.68.153 dst=10.168.66.151 sport=40994 dport=8080 src=10.168.66.151 dst=10.168.68.153 sport=8080 dport=40994 [ASSURED] zone=13 use=1
tcp 6 85879 ESTABLISHED src=10.168.68.148 dst=10.168.66.151 sport=60456 dport=8080 src=10.168.66.151 dst=10.168.68.148 sport=8080 dport=60456 [ASSURED] zone=13 use=1
tcp 6 85397 ESTABLISHED src=10.168.68.143 dst=10.168.66.252 sport=8089 dport=8080 src=10.168.66.252 dst=10.168.68.143 sport=8080 dport=8089 [ASSURED] zone=11 use=1
tcp 6 85687 ESTABLISHED src=10.168.68.195 dst=10.168.66.19 sport=5139 dport=8080 src=10.168.66.19 dst=10.168.68.195 sport=8080 dport=5139 [ASSURED] zone=8 use=1
tcp 6 85786 ESTABLISHED src=10.168.68.170 dst=10.168.66.223 sport=36659 dport=8080 src=10.168.66.223 dst=10.168.68.170 sport=8080 dport=36659 [ASSURED] zone=12 use=1
tcp 6 85591 ESTABLISHED src=10.168.68.150 dst=10.168.66.204 sport=45455 dport=8080 src=10.168.66.204 dst=10.168.68.150 sport=8080 dport=45455 [ASSURED] zone=7 use=1
tcp 6 86087 ESTABLISHED src=10.168.68.215 dst=10.168.66.97 sport=14570 dport=8080 src=10.168.66.97 dst=10.168.68.215 sport=8080 dport=14570 [ASSURED] zone=6 use=1
root@test02:/# conntrack -L | grep -v HW_OFF | awk '{print $4}' | sort | uniq -c
conntrack v1.4.6 (conntrack-tools): 103694 flow entries have been shown.
2 CLOSE_WAIT
103589 ESTABLISHED
2 src=10.168.66.151
2 src=10.168.66.204
1 src=10.168.66.221
1 src=10.168.66.252
2 src=10.168.66.97
58 SYN_SENT
17 TIME_WAIT
当前 netfilter conntrack 表大小设置为 1048576,在负载测试期间,conntrack 表大小不超过 800K。
以下是我的设置细节:
硬件
- 服务器:戴尔R7615
- 处理器:AMD Epyc 9654P
- 内存:384GB
- NUMA: 1
- 网卡:Connect-X 6LX
软件版本
- 操作系统:Ubuntu 22.04.2 LTS
- 内核:5.15
- Openstack版本:Yoga
- 俄亥俄河谷:22.03
- OVS:2.17.5
- MLNX OFED 驱动程序:5.8-2.0.3
- 固件:26.35.1012(DEL0000000031)
关于如何解决此问题的任何见解或建议都将不胜感激。
谢谢。