We just finished debugging a really interesting bandwidth problem on intercontinental WAN links aggregated by Aruba switches. According to tcpdump captures, using a rate limiter of any speed on a port of a ProCurve 3500 switch will cause the switch to randomly reorder TCP packets sent through it!
The switch is on the latest firmware version, and there are no errata that I can find regarding this peculiarity. Reordering the packets causes the TCP fast retransmit to kick in every few dozen segments, so intercontinental TCP connections are only able to reach maybe ~100Kbps on a good day even with the rate limiter set at 100Mbps for that link.
Testing with UDP flows indicates the switch is functioning as intended in terms of actual bandwidth limits for raw data streams. The switch only starts reordering packets above some minimum threshold bandwidth, in our tests this was somewhere around 4Mbps. Clearing the rate limit without changing anything else allows full-speed TCP transfers over the high latency links and a far lower (more typical) number of TCP fast retransmits.
Tests were done with iperf3 and extensive use of the -b flag was made in order to keep the test data flows well below the configured rate limits. This was done to avoid dragging in the additional oddities of rate limiter behavior during actual congestion on the limited port.
Has anyone else seen this? Is this kind of behavior normal for switches in this class? We prefer the port rate-limited architecture for various reasons; these switches are used to interface with consumer systems with tiered data rates and IP filters / ACLs, but obviously if they are reordering packets they will need to be replaced.
Any assistance appreciated!
EDIT:
Once it became clear the switch was causing the bandwidth problems, two separate hosts were connected directly to two ports on the switch, and iperf3 and tcpdump were used on both hosts to check the data flows across the switch. What was consistently seen was a "block" of several packets being delayed / moved out of order, but not enough where the fast retransmit would have kicked in yet. Basically the following:
HOST A (receiver) HOST B (sender)
SEQ 1 < < SEQ 1
SEQ 2 < < SEQ 2
SEQ 3 < < SEQ 3
ACK 1 > > ACK 1
ACK 2 > > ACK 2
SEQ 4 < < SEQ 4
ACK 3 > > ACK 3
ACK 4 > > ACK 4
... now the interesting part ...
SEQ 7 < < SEQ 5
ACK 5 > < SEQ 6
SEQ 8 < < SEQ 7
ACK 5 > < SEQ 8
SEQ 5 < < SEQ 9
SEQ 6 < > ACK 5
Notice how a couple of packets are moved earlier in the transmissions sequence from the receiver's perspective; also note how the received sequence numbers jump backward before the fast retransmit should have kicked in. I omitted the rest of the sequence for clarity, since once the sender starts processing the multiple ACK packets fast retransmit kicks in anyway and things look pretty normal in the recovery path.
Configuration is bog standard. Switch reset to factory defaults, rate limit applied to one of the test ports as follows
config
int 28 rate-limit all out kbps 100000
int 28 rate-limit all in kbps 100000
write mem
That's enough to cause the drops. Both hosts are GbE on short known-good cables, and undoing the rate-limit configuration (no int 28 ...) immediately restores performance and stops the retransmits.
EDIT2:
New dumps captured, there may be a slight amount of time skew between hosts still even with NTP active but I'm not sure how to factor that in.
Problem starts with sequence number 10515814 -- notice the 10515814 data packet is received before three ACKs for 10515814 have even left the receiving host. Unless I'm misunderstanding something, this means fast retransmit hasn't even had a chance to kick in, showing reordering versus straight drop?
Switch config on the receiving host's port was rate limited to 100Mbps, the transmitting hosts's port was unlimited. iperf3 was run with a 40Mbps transmission limit (chosen empirically because it's easier to find the reordering in the dumps under these conditions, same thing happens with 10Mbps and 4Mpbs respectively).
RECEIVER:
21:24:07.302170 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10494094:10501334, ack 1, win 229, options [nop,nop,TS val 1242980393 ecr 1549151364], length 7240
21:24:07.302182 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10501334:10502782, ack 1, win 229, options [nop,nop,TS val 1242980393 ecr 1549151364], length 1448
21:24:07.302188 IP 192.168.1.2.5201 > 192.168.1.1.59538: Flags [.], ack 10501334, win 13522, options [nop,nop,TS val 1549151365 ecr 1242980393], length 0
21:24:07.302343 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10502782:10507126, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 4344
21:24:07.302358 IP 192.168.1.2.5201 > 192.168.1.1.59538: Flags [.], ack 10507126, win 13522, options [nop,nop,TS val 1549151365 ecr 1242980393], length 0
21:24:07.302375 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10507126:10510022, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 2896
21:24:07.302388 IP 192.168.1.2.5201 > 192.168.1.1.59538: Flags [.], ack 10510022, win 13522, options [nop,nop,TS val 1549151365 ecr 1242980394], length 0
21:24:07.302553 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10510022:10515814, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 5792
21:24:07.302568 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10517262:10518710, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 1448
21:24:07.302575 IP 192.168.1.2.5201 > 192.168.1.1.59538: Flags [.], ack 10515814, win 13478, options [nop,nop,TS val 1549151365 ecr 1242980394,nop,nop,sack 1 {10517262:10518710}], length 0
21:24:07.302727 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10518710:10520158, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 1448
21:24:07.302734 IP 192.168.1.2.5201 > 192.168.1.1.59538: Flags [.], ack 10515814, win 13504, options [nop,nop,TS val 1549151365 ecr 1242980394,nop,nop,sack 1 {10517262:10520158}], length 0
21:24:07.302876 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10515814:10517262, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 1448
21:24:07.302883 IP 192.168.1.2.5201 > 192.168.1.1.59538: Flags [.], ack 10520158, win 13496, options [nop,nop,TS val 1549151365 ecr 1242980394], length 0
21:24:07.303094 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10520158:10523054, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 2896
21:24:07.303101 IP 192.168.1.2.5201 > 192.168.1.1.59538: Flags [.], ack 10523054, win 13504, options [nop,nop,TS val 1549151366 ecr 1242980394], length 0
21:24:07.303256 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10523054:10524502, ack 1, win 229, options [nop,nop,TS val 1242980395 ecr 1549151366], length 1448
21:24:07.344514 IP 192.168.1.2.5201 > 192.168.1.1.59538: Flags [.], ack 10524502, win 13522, options [nop,nop,TS val 1549151407 ecr 1242980395], length 0
21:24:07.344674 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10527398:10530294, ack 1, win 229, options [nop,nop,TS val 1242980436 ecr 1549151407], length 2896
21:24:07.344679 IP 192.168.1.2.5201 > 192.168.1.1.59538: Flags [.], ack 10524502, win 13522, options [nop,nop,TS val 1549151407 ecr 1242980395,nop,nop,sack 1 {10527398:10530294}], length 0
21:24:07.344870 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10524502:10527398, ack 1, win 229, options [nop,nop,TS val 1242980436 ecr 1549151407], length 2896
TRANSMITTER:
21:24:07.313522 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10510022:10511470, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 1448
21:24:07.313525 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10511470:10512918, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 1448
21:24:07.313527 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10512918:10514366, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 1448
21:24:07.313533 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10514366:10515814, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 1448
21:24:07.313537 IP 192.168.1.2.5201 > 192.168.1.1.59538: Flags [.], ack 10510022, win 13522, options [nop,nop,TS val 1549151365 ecr 1242980394], length 0
21:24:07.313545 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10515814:10517262, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 1448
21:24:07.313548 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10517262:10518710, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 1448
21:24:07.313728 IP 192.168.1.2.5201 > 192.168.1.1.59538: Flags [.], ack 10515814, win 13478, options [nop,nop,TS val 1549151365 ecr 1242980394,nop,nop,sack 1 {10517262:10518710}], length 0
21:24:07.313741 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10518710:10520158, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 1448
21:24:07.313744 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10520158:10521606, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 1448
21:24:07.313747 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10521606:10523054, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 1448
21:24:07.313753 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10523054:10524502, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 1448
21:24:07.313756 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10524502:10525950, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 1448
21:24:07.313885 IP 192.168.1.2.5201 > 192.168.1.1.59538: Flags [.], ack 10515814, win 13504, options [nop,nop,TS val 1549151365 ecr 1242980394,nop,nop,sack 1 {10517262:10520158}], length 0
21:24:07.313896 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10515814:10517262, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 1448
21:24:07.314085 IP 192.168.1.2.5201 > 192.168.1.1.59538: Flags [.], ack 10520158, win 13496, options [nop,nop,TS val 1549151365 ecr 1242980394], length 0
21:24:07.314096 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10520158:10521606, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 1448
21:24:07.314099 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10521606:10523054, ack 1, win 229, options [nop,nop,TS val 1242980394 ecr 1549151365], length 1448
21:24:07.314263 IP 192.168.1.2.5201 > 192.168.1.1.59538: Flags [.], ack 10523054, win 13504, options [nop,nop,TS val 1549151366 ecr 1242980394], length 0
21:24:07.314273 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10523054:10524502, ack 1, win 229, options [nop,nop,TS val 1242980395 ecr 1549151366], length 1448
21:24:07.314276 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10524502:10525950, ack 1, win 229, options [nop,nop,TS val 1242980395 ecr 1549151366], length 1448
21:24:07.314281 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10525950:10527398, ack 1, win 229, options [nop,nop,TS val 1242980395 ecr 1549151366], length 1448
21:24:07.355648 IP 192.168.1.2.5201 > 192.168.1.1.59538: Flags [.], ack 10524502, win 13522, options [nop,nop,TS val 1549151407 ecr 1242980395], length 0
21:24:07.355661 IP 192.168.1.1.59538 > 192.168.1.2.5201: Flags [.], seq 10527398:10528846, ack 1, win 229, options [nop,nop,TS val 1242980436 ecr 1549151407], length 1448
EDIT3:
Switch configuration. As stated, quite basic:
Running configuration:
; J8693A Configuration Editor; Created on release #K.15.16.0019m
; Ver #0f:01.80.00.00.34.00.00.00.00.74.fc.7f.ff.3f.ef:62
hostname "TEST"
module 1 type j86yya
module 2 type j86xxa
no timesync
no telnet-server
no web-management
interface 28
rate-limit all in kbps 100000
rate-limit all out kbps 100000
exit
snmp-server community "public" unrestricted
vlan 1
name "DEFAULT_VLAN"
untagged 1-48
ip address dhcp-bootp
exit
no tftp client
no tftp server
no autorun
no dhcp config-file-update
no dhcp image-file-update