[NSX] The low performance has been detected when customer is copying files through NSX environment from end-user's network.
NSX 환경을 통과하여, End-to-End로 NFS를 통한 파일 복사를 수행할 때, Throughput이 예상보다 적게 나오는 증상이 있어, 이에 대한 분석을 어떻게 진행하는지 살펴보겠습니다.
[Symptom]
다음과 같은 구성 환경에서 Source와 Destination이 NFS Protocol을 통해 파일을 주고 받을 때, Throughput이 10Mbps 정도만 나오는 증상
Source - Physical Switch - NSX Tier-0 Gateway(VRF) - NSX Tier-1 Gateway - NSX Tier-1 Gateway - Destination
[Troubleshooting Notes]
1. NSX 버전 확인
$ cat ./etc/nsx_issue version: 3.2.3.0.1.21787257 node-type: nsx-edge build-type: release export-type: unrestricted |
2. Edge Support Bundle을 통해 구성 검증 및 환경 파악
./edge/logical-routers { ... "name": "SR-VRF-####", ... "type": "VRF_SERVICE_ROUTER_TIER0", { ... "ptype": "uplink", ... "ipns": [ "<Uplink_IP_Address#2>" ], { ... "ptype": "uplink", ... "ipns": [ " <Uplink_IP_Address#1> " ], { ... "name": "DR-VRF -#### ", ... "type": "VRF_DISTRIBUTED_ROUTER_TIER0", "ports": [ { ... "ptype": "downlink", ... "ipns": [ "<Inter_Router_Address#1>" ], { ... "name": "SR-T1-1", ... "type": "SERVICE_ROUTER_TIER1", "ports": [ { ... "ptype": "service", "name": "t1-####", ... "ipns": [ "<Service_Int_IP_Address#1>" ], { ... "ptype": "uplink", ... "ipns": [ " <Inter_Router_Address#2> " ], { ... "name": "SR-T1-2", ... "type": "SERVICE_ROUTER_TIER1", "ports": [ { ... "ptype": "service", "name": "t1-####", ... "ipns": [ " <Service_Int_IP_Address#2>" ], |
위 정보를 토대로 대략적인 네트워크 구성을 다음과 같이 도식화
3. 문제 증상 테스트 시, 수집된 Packet을 확인해보면, Service Interface로 연결된 SR-T1-1에서 전송한 Packet이 SR-T1-2에서 보이지 않는 현상이 빈번하게 발생
아래 예시를 보면, NFS 관련된 Packet이 SR-T1-1에서 전달되었으나, 수신 측인 SR-T1-2에서는 보이지 않고,
이 후 재전송을 위해 보낸 Packet만 확인
SR-T1-1에서 수집된 Packet
<TIMESTAMP> <SRC_IP> <DST_IP> NFS <LENGTH> V3 READ Reply (Call In 713) Len: <LENGTH> <TIMESTAMP> <SRC_IP> <DST_IP> TCP <LENGTH> [TCP Fast Retransmission] <SRC_PORT> → <DST_PORT> [ACK] Seq=<SEQ_No> Ack=<ACK_No> Win=<WINDOW_SIZE> Len= <LENGTH> TSval=TSecr= |
SR-T1-2에서 수집된 Packet
<TIMESTAMP> <SRC_IP> <DST_IP> TCP <LENGTH> [TCP Fast Retransmission] <SRC_PORT> → <DST_PORT> [ACK] Seq= <SEQ_No> Ack= <ACK_No> Win= <WINDOW_SIZE> Len= <LENGTH> TSval=TSecr= |
4. SR-T1-2 측의 문제로 Isolation을 하고, SR-T1-2 확인 시, NIC의 Ring Buffer Size가 Default 값인 512로 되어 있고, Ring Buffer의 Out Of Buffer 현상으로 인핸 Packet Drop Count가 매우 높은 것을 확인
./edge/datapath-configuration $ grep "ring" datapath-configuration ... "rx_ring_size": 512, >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ... "tx_ring_size": 512 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ./edge/physical-ports-xstats $ less physical-ports-xstats | egrep -w "fp|rx_missed_errors|rx_out_of_buffer" "fp-eth0": { "rx_missed_errors": ####, "rx_out_of_buffer": #### , "fp-eth3": { "rx_missed_errors": #### , "rx_out_of_buffer": #### , "fp-eth2": { "rx_missed_errors": #### , "rx_out_of_buffer": #### , "fp-eth1": { "rx_missed_errors": #### , "rx_out_of_buffer": #### , |
5. Ring Buffer에서 Out Of Buffer가 나는 경우에는 Edge Node로 들어오고 나가는 Packet의 양을 Ring Buffer가 처리할 수 없는 순간에 Count가 증가
이에, Rx/Tx Ring Buffer Size를 1024 or 2048로 증설한 후 동일한 테스트 시도
※ Rx/Tx Ring Buffer는 512, 1024, 2048, 4096을 지원하며 순차적으로 증설 테스트가 필요
6. 고객사에서 Rx/Tx Ring Buffer를 2048로 증설한 후, 기존 Throughput 10Mbps에서 약 500Mbps로 향상됨을 확인
[Conclusion]
Ring Buffer가 512인 환경에서 다량의 Packet 처리 시, Out Of Buffer 현상으로 인해, TCP Retransmission이 과다하게 발생하면서 Network Throughput이 저하
이를 해결하기 위해 Ring Buffer Size를 2048로 조절 후, 예상되는 Network Throughput 관측