I use Ubuntu for gaming. In competitive gaming every millisecond matters.
I know that many people who use Windows use something called Leatrix Latency Fix which is basically a script that modify TCPAckFrequency. This reduce the online gaming latency by increasing the frequency of TCP acknowledgements sent to the game server.
On Mac OS X you can get this effect by running
sudo sysctl -w net.inet.tcp.delayed_ack=0
.
I've heard that the Linux kernel have a very advanced IP stack and can use many different TCP congestion avoidance algorithm. I don't know if that has anything to do with TCP acknowledge frequency. I also heard that the Linux kernel auto-adjusts TCP/IP settings for optimal performance.
Is there anything I can do to reduce TCP/IP latency?
Well you should make sure everything else outside your computer is behaving nicely.
Run a
traceroute
to the gaming server. Where does latency grow? Is it normal or is it happening in places where it shouldn't?For example, a hop from New York to London will add latency. Fifty or so milliseconds to the first hop after your router probably means faulty equipment in your last mile; doublecheck with your neighbours.
How much latency do you have to your router? Switching from wifi to wired connectivity may not always be possible, but it might just shave five or so milliseconds.
Is your computer good enough for the game? Sometimes game will have suboptimal performace under Wine, and well, if a game can't process packets in a round trip time (your latency to the game server as measured through
ping
ortraceroute
doubled) then the bottleneck is actually not the network.Does your ping even matter? Most real time games require interpolation to run smoothly. This means you're actually playing "in the past." For example, Source games have every player running 0.1 seconds in the past, which means all players with latency in the double digits actually are playing on a even field. Personally I play at 160 ping on TF2 servers in US and don't really have too much trouble with it. Read more here. Read here about the Unreal networking stack.
My father was a big fan of TCP Doctor or some such program in Windows because he swore that his internet was sooo much faster with it. Personally, I never saw a difference. But, he did ask me how he could do it in Linux. He was so disappointed he couldn't use the program. So, I did my research. You are correct, Linux actively adjusts the TCP receive window and many other TCP aspects automagically. Unless you're having real problems, I'd leave it as it is.
However, if you feel you must tweak it here is a decent-looking reference (but keep in mind, all these files they talk about are automatically managed and adjusted by the kernel unless you modify them at run-time): http://www.speedguide.net/articles/linux-tweaking-121