Blog Archive

Saturday, November 15, 2008

Network stack overhead (tcp/udp delays)

server: echoes data back
client: sends a packet with a timestamp to the server, reads the data back, notes the difference.

freebsd=2x opteron 285 (2.6ghz)
ubuntu=1 pentium 4 @ 3ghz
linux2 = quad core 3.2ghz xeon
windows=2xs xeon 9775 (3.2ghz) (has GhostWall and possibly other running programas)
windows2=2x xeon 5472 (3ghz) (no firewall, a cleaner machine)

TCP

All numbers in microseconds (min/max/avg)
windows->localhost: 43 / 244 / 68
windows2->localhost: 33 / 72 / 48
freebsd->localhost: 22 / 35 / 27
ubuntu->localhost: 31 / 106 / 44
linux2->localhost: 34 / 77 / 35
(max is all over the place from 69us to 94us)
freebsd->ubuntu: min 64 / 128 92

notes: windows code is asynchronous. unix code is blocking (does one read/one write).

UDP:

Windows->localhost: 33 / 332 / 52
Windows2->localhost: 19 / 75 / 32
FreeBsd->localhost: 16 / 18 / 17
Ubuntu->localhost: 24 / 126 / 32
linux2->localhost: 28 / 70 / 29

Conclusions:

1. FreeBsd is the shizzle
2. Linux is not.
3. Windows has the largest variance of all (*what* is there to do for 100 microseconds??)