TCP Performance advice needed [long!]

Ragnar Lonn raglon at packetfront.com
Wed Feb 15 01:12:42 PST 2006


Ivan Voras wrote:

> I understand this bottleneck, and know (at least in theory :) ) how it 
> could be solved, but my problems are not directly related to that:
>
> - For small (but consistent in size) packet sizes, I get randomly 
> varying round-trip times, and much lower packets-per-second ratio then 
> with big packets (consistent in size) with the exact same lock-step 
> protocol. Packet generation and processing are not CPU intensive.
>
> - When using big packets (actually, when switching back and forth from 
> small packets to big packets), the PPS performance starts low and 
> climbs to "normal" levels, and I'd like to avoid this. This is a local 
> network with 0 errors.


My guess would be that it's an effect of how TCP works. The slow start, 
for instance (but
I saw you had tried setting TCP_NODELAY). Maybe you should experiement 
with UDP
as the transport protocol instead. Of course, it requires more work if 
you need
reliable and in-order delivery. But if you want low roundtrip times, use 
UDP. There isn't
an online action game today that uses TCP, because it's not suited for 
applications which
need fast response times.

Cheers,

  /Ragnar


More information about the freebsd-net mailing list