High latency for linux network application

I am playing with linux network programming and I have written a small client / server application that bounces a small message between the client and the server process and measures round trip times. Consistently I see about 80ms for a round trip (this is after setting up the connection). It seems unusually high. The same computer running the same code will sync at less than 1ms in Vista.

Any ideas on where this difference comes from? The code is pretty simple, take on one end, connect to the other, and then just send / receive over the peer socket.

I'm just starting out on Linux, sorry if this is a stupid question.

+2


source to share


1 answer


If you are using TCP sockets, you can disable the Nagle algorithm (by setting the TCP_NODELAY socket option).



+6


source







All Articles