Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > Configuration > Issue <<  233 of 608 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 9736
Last update: 12-20-06
Issue:
How can I change the TCP/IP tuning parameters?
Resolution:

All TCP/IP tuning parameters are located under the /proc/sys/net/ directory. For example, here is a list of the most important tuning parameters, along with a short description of their meaning:

  1. /proc/sys/net/core/rmem_max - Maximum TCP Receive Window.
  2. /proc/sys/net/core/wmem_max - Maximum TCP Send Window.
  3. /proc/sys/net/ipv4/tcp_timestamps - Timestamp ( RFC 1323) add 12 bytes to the TCP headers.
  4. /proc/sys/net/ipv4/tcp_sack - TCP selective acknowledgments.
  5. /proc/sys/net/ipv4/tcp_window_scaling - support for large TCP Windows (RFC 1323). Needs to be set to 1 if the Max TCP Window is over 65535.
  6. mem_default = Default Receive Window.
  7. rmem_max = Maximum Receive Window.
  8. wmem_default = Default Send Window.
  9. wmem_max = Maximum Send Window.

Everything under /proc is volatile, so any changes made are lost after a reboot.

Applying TCP/IP Parameters at System Boot:

Place the following code in /etc/rc.local so that they get applied on the system while booting:

echo 256960 > /proc/sys/net/core/rmem_default
echo 256960 > /proc/sys/net/core/rmem_max
echo 256960 > /proc/sys/net/core/wmem_default
echo 256960 > /proc/sys/net/core/wmem_max

echo 0 > /proc/sys/net/ipv4/tcp_timestamps
echo 1 > /proc/sys/net/ipv4/tcp_sack
echo 1 > /proc/sys/net/ipv4/tcp_window_scaling

The TCP/IP parameters are self-explanatory. It is setting up the TCP Window to 256960, disabling timestamps (to avoid 12 byte headers overhead), and enabling tcp window scaling and selective acknowledgments.

Change the values above as desired, depending on the internet connection and maximum bandwidth/latency.

Note:Above values can be used but are just a part of example.

Another method to reapply the values upon boot is to include the following in the /etc/sysctl.conf file.

net.core.rmem_default = 256960
net.core.rmem_max = 256960
net.core.wmem_default = 256960
net.core.wmem_max = 256960

net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_sack =1
net.ipv4.tcp_window_scaling = 1


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > Configuration > Issue <<   233  of  608  >>