I could not find anything on the net to disable Nagle's Algorithm from the command line in Linux. Solaris does have a mechanism to enable/disable it from the command line.
Please let me know if there is any way of doing it on Linux.
I could not find anything on the net to disable Nagle's Algorithm from the command line in Linux. Solaris does have a mechanism to enable/disable it from the command line.
Please let me know if there is any way of doing it on Linux.
It's done per socket, not from the command line, using setsockopt()
to set the TCP_NODELAY flag. I am aware of no method for doing this globally, though it wouldn't surprise me if there was a file under /proc/sys/net to do this...
For redhat Linux, you can look at /proc/sys/net/ipv4/tcp_delack_min option. For other distributions, you may need to recompile kernel.
You can also set the environment variable SETTCPNODELAY to any value to disable Nagle's algorithm.
Or set ACK timeout lower and stop TCP_RTS. The timeout is 2ms. It's the ping time to the next rj45 interface or next machine. Do not set the timeout too low, as you may get packet loss ;-). TCP.fin has a higher timeout.
echo 0.2 > /proc/sys/net/ipv4/tcp_ack_timeout
echo 0.2 > /proc/sys/net/ipv4/tcp_syn_timeout
echo 0.2 > /proc/sys/net/ipv4/tcp_synack_timeout
echo 0 > /proc/sys/net/ipv4/tcp_rst_timeout
echo 0.2.5 > /proc/sys/net/ipv4/tcp_fin_timeout
echo 0.2 > /proc/sys/net/ipv4/tcp_urg_timeout
echo 0.2 > /proc/sys/net/ipv4/tcp_psh_timeout
echo 10000 > /proc/sys/net/ipv4/tcp_syn_retries
echo 10000 > /proc/sys/net/ipv4/tcp_synack_retries
echo 0 > /proc/sys/net/ipv4/tcp_rst_retries
echo 10000 > /proc/sys/net/ipv4/tcp_psh_retries
echo 10000 > /proc/sys/net/ipv4/tcp_urg_retries
echo 10000 > /proc/sys/net/ipv4/tcp_ack_retries
echo 10000 > /proc/sys/net/ipv4/tcp_fin_retries
echo 0 > /proc/sys/net/ipv4/tcp_timestamps
And maybe:
echo 1 > /proc/sys/net/ipv4/tcp_dsack