In our REHL server, latency between application send and tcpdump log is always very large for large messages, about 200 milliseconds (see below 697572-488690=208882 microseconds), whereas latency for small messages is very small, just a few microseconds.
I think none of the TCP timers can explain the 200ms delay. This kind of latency is usually because of the Nagle's algorithm for small messages, which is not the case here since the high latency is only for large messages.
With a large message:
IBM MQ trace logs extracts:
12:13:12.488685 4172.1 RSESS:000001 ----{ ccxSend
12:13:12.488688 4172.1 RSESS:000001 -----{ cciTcpSend
12:13:12.488690 4172.1 RSESS:000001 ------{ send
12:13:12.488697 4172.1 RSESS:000001 ------} send rc=OK
12:13:12.488711 4172.1 RSESS:000001 Sending 1138 bytes
[large message]
12:13:12.488714 4172.1 RSESS:000001 RetCode (OK)
12:13:12.488716 4172.1 RSESS:000001 -----} cciTcpSend rc=OK
tcpdump extracts:
12:13:05.884715 IP (tos 0x0, ttl 49, id 60415, offset 0, flags [DF], proto: TCP (6), length: 68) otherHost.otherPort > ourHost.ourPort: P, cksum 0x7673 (correct), 2893948259:2893948287(28) ack 1576932354 win 1024 ....
12:13:05.884718 IP (tos 0x0, ttl 64, id 60352, offset 0, flags [DF], proto: TCP (6), length: 40) ourHost.ourPort > otherHost.otherPort: ., cksum 0xcd9c (correct), ack 2893948287 win 5768
12:13:12.697572 IP (tos 0x0, ttl 64, id 60353, offset 0, flags [DF], proto: TCP (6), length: 1064) ourHost.ourPort > otherHost.otherPort: P, cksum 0x0059 (incorrect (-> 0x6a5a), 1576932354:1576933378(1024) ack 2893948287 win 5768
[first packet of large message]
12:13:12.708367 IP (tos 0x0, ttl 49, id 61060, offset 0, flags [DF], proto: TCP (6), length: 40) otherHost.otherPort > ourHost.ourPort: ., cksum 0xe024 (correct), ack 1576933378 win 0
12:13:12.708865 IP (tos 0x0, ttl 49, id 61061, offset 0, flags [DF], proto: TCP (6), length: 40) otherHost.otherPort > ourHost.ourPort: ., cksum 0xdc24 (correct), ack 1576933378 win 1024
12:13:12.708869 IP (tos 0x0, ttl 64, id 60354, offset 0, flags [DF], proto: TCP (6), length: 154) ourHost.ourPort > otherHost.otherPort: P, cksum 0xfcca (incorrect (-> 0xa1fb), 1576933378:1576933492(114) ack 2893948287 win 5768
[second packet of large message]
12:13:12.716154 IP (tos 0x0, ttl 49, id 61062, offset 0, flags [DF], proto: TCP (6), length: 40) otherHost.otherPort > ourHost.ourPort: ., cksum 0xdc24 (correct), ack 1576933492 win 910
12:13:12.717202 IP (tos 0x0, ttl 49, id 61063, offset 0, flags [DF], proto: TCP (6), length: 68) otherHost.otherPort > ourHost.ourPort: P, cksum 0x71e5 (correct), 2893948287:2893948315(28) ack 1576933492 win 1024
12:13:12.717209 IP (tos 0x0, ttl 64, id 60355, offset 0, flags [DF], proto: TCP (6), length: 40) ourHost.ourPort > otherHost.otherPort: ., cksum 0xc90e (correct), ack 2893948315 win 5768
With a small message (less context in extracts):
15:15:33.133940 4215.1 RSESS:000001 ------{ send
15:15:33.133954 4215.1 RSESS:000001 ------} send rc=OK
...
15:15:33.133966 4215.1 RSESS:000001 Sending 512 bytes
[small message]
15:15:33.133969 4215.1 RSESS:000001 RetCode (OK)
tcpdump:
15:15:33.133949 IP (tos 0x0, ttl 64, id 37357, offset 0, flags [DF], proto: TCP (6), length: 552) ourHost.ourPort > otherHost.otherPort: P, cksum 0xfe58 (incorrect (-> 0x2dd8), 1566021015:1566021527(512) ack 2491002247 win 5768
[small message]
System and drivers versions:
Linux 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
# /usr/sbin/ethtool -i bond0
driver: bonding
version: 3.2.4
firmware-version: 2
$ cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.2.4 (January 28, 2008)
Bonding Mode: fault-tolerance (active-backup)
Currently Active Slave: eth2
# /usr/sbin/ethtool -i eth2
driver: e1000e
version: 1.2.10-NAPI
firmware-version: 5.12-2
Next steps?
Without finding the root cause for this issue, I am thinking of:
- just trying to upgrade bonding or e1000e drivers. By the way, in order to check if any bonding bug could be involved, does anybody know where the bonding driver versions and release notes are?
- asking the other side to set a bigger TCP window since there is no issue when only one packet has to be sent for a message. In addition, that would decrease latency by 10 milliseconds, the time between first and second packet for a large message.
Does anybody has any other idea? Is there any way to get trace logs for bonding or e1000e drivers?