Link to home
Start Free TrialLog in
Avatar of jerzyb
jerzyb

asked on

tcp latency

I am sending very small packets (less than 100 bytes) over a TCP/IP link with a 10msecs round-trip delay. When I send several packets in a row (consecutive C-language socket writes), the first 2 or 3 get sent immediately (checked using the sniffer) but the remaining ones get delayed by another 10msecs (looks like the transmitter is waiting for an ACK from the receiver).

Nagle is turned off on both sides, I played with TCP_QUICKACK on the receiver with no luck; my RedHat Linux /proc/sys/net/ipv4/tcp_window_scaling == 1; have plenty of bandwiidth (100MBS).

What should I change/disable on TCP to be able to pump multiple packets at once? I want it real-time and dont care about bandwidth efficiencies (or UDP is the only way out ?)

thanks, JBB
Avatar of jerzyb
jerzyb

ASKER

correction: round-trip latency on this link is 20msecs (not 10msecs), JBB
SOLUTION
Avatar of TobiasHolm
TobiasHolm
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of noci
noci

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I forgot to add this:

And maybe more important, without breaking other links because of messing arround with global parameters.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jerzyb

ASKER

12:46:59.731414 IP transmitter.1234 > receiverXXX.5678: P 2160:2232(72) ack 505 win 6432 <nop,nop,timestamp 679945577 2705004849>
        0x0070:  3520 2038 352e 3035 3537 315d            5..85.05571]
12:46:59.731439 IP transmitter.1234 > receiverXXX.5678: P 2232:2304(72) ack 505 win 6432 <nop,nop,timestamp 679945577 2705004849>
        0x0070:  3520 2038 352e 3030 3531 305d            5..85.00510]
12:46:59.743377 IP transmitter.1234 > receiverXXX.5678: P 2304:2376(72) ack 505 win 6432 <nop,nop,timestamp 679945589 2705004849>
        0x0070:  3520 2038 352e 3030 3531 305d            5..85.00510]
12:46:59.748843 IP receiverXXX.5678 > transmitter.1234: . ack 2232 win 63568 <nop,nop,timestamp 2705004938 679945577>
        0x0000:  4500 0034 83a2 4000 3e06 a1f3 0a0c 010c  E..4..@.>.......
        0x0010:  0a0c 020b 8c9d 13fa dddb 8bae 6c9a 5617  ............l.V.
        0x0020:  8010 f850 91b4 0000 0101 080a a13b 198a  ...P.........;..
        0x0030:  2887 2569                                (.%i
12:46:59.748853 IP transmitter.1234 > receiverXXX.5678: P 2376:3600(1224) ack 505 win 6432 <nop,nop,timestamp 679945595 2705004938>
        0x04f0:  3520 2038 352e 3030 3531 305d            5..85.00510]
12:46:59.748856 IP receiverXXX.5678 > transmitter.1234: . ack 2304 win 63568 <nop,nop,timestamp 2705004938 679945577>
        0x0000:  4500 0034 83a3 4000 3e06 a1f2 0a0c 010c  E..4..@.>.......
        0x0010:  0a0c 020b 8c9d 13fa dddb 8bae 6c9a 565f  ............l.V_
        0x0020:  8010 f850 916c 0000 0101 080a a13b 198a  ...P.l.......;..
        0x0030:  2887 2569                                (.%i

the dump above shows just the last line of the transmitted packets (so you can see the hex size) and the full contents of the receiver packets.

the application sends 2 sets of messages:
2 messages at 12:46:59.731406 (application timestamp)
and about 31 messages between 12:46:59.743372 and 12:46:59.746957 (evenly spaced out in time).

As you can see the 1st 2 messages are sent right away but the rest wait for the ack from the receiver at 12:46:59.748843.

thanks,
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jerzyb

ASKER

Can't follow up with this problem: just not enough time. Thanks for all advice.

JBB
Avatar of jerzyb

ASKER

Have to close this question. No follow up.