How can I change the TCP/IP tuning parameters?
2010-01-16 11:14
435 查看
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:
/proc/sys/net/core/rmem_max
– Maximum TCP Receive Window.
/proc/sys/net/core/wmem_max
– Maximum TCP Send Window.
/proc/sys/net/ipv4/tcp_timestamps
– Timestamp ( RFC 1323) add 12 bytes to the TCP headers.
/proc/sys/net/ipv4/tcp_sack
– TCP selective acknowledgments.
/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.
mem_default
= Default Receive Window.
rmem_max
= Maximum Receive Window.
wmem_default
= Default Send Window.
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:
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.
contributed by Kaustabh Chaudhari
Red Hat’s customer service and support teams
receive technical support questions from users all over the world. Red
Hat technicians add the questions and answers to Red Hat Knowledgebase
on a daily basis. Access to Red Hat Knowledgebase
is free. Every month, Red Hat Magazine offers a preview into the Red
Hat Knowledgebase by highlighting some of the most recent entries.
This entry was posted by The editorial team
on Thursday, January 25th, 2007 at 2:00 am and is filed under tips and tricks
.
You can follow any responses to this entry through the RSS 2.0
feed.
Both comments and pings are currently closed.
原文地址: http://magazine.redhat.com/2007/01/25/how-can-i-change-the-tcpip-tuning-parameters/
directory. For example, here is a list of the most important tuning
parameters, along with a short description of their meaning:
/proc/sys/net/core/rmem_max
– Maximum TCP Receive Window.
/proc/sys/net/core/wmem_max
– Maximum TCP Send Window.
/proc/sys/net/ipv4/tcp_timestamps
– Timestamp ( RFC 1323) add 12 bytes to the TCP headers.
/proc/sys/net/ipv4/tcp_sack
– TCP selective acknowledgments.
/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.
mem_default
= Default Receive Window.
rmem_max
= Maximum Receive Window.
wmem_default
= Default Send Window.
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
contributed by Kaustabh Chaudhari
Red Hat’s customer service and support teams
receive technical support questions from users all over the world. Red
Hat technicians add the questions and answers to Red Hat Knowledgebase
on a daily basis. Access to Red Hat Knowledgebase
is free. Every month, Red Hat Magazine offers a preview into the Red
Hat Knowledgebase by highlighting some of the most recent entries.
This entry was posted by The editorial team
on Thursday, January 25th, 2007 at 2:00 am and is filed under tips and tricks
.
You can follow any responses to this entry through the RSS 2.0
feed.
Both comments and pings are currently closed.
原文地址: http://magazine.redhat.com/2007/01/25/how-can-i-change-the-tcpip-tuning-parameters/
相关文章推荐
- How can I get my public IP address from the command line, if I am behind a router?
- How To Query And Change The Oracle Hidden Parameters In Oracle 10g and 11g (文档 ID 315631.1)
- 怎样控制Qt标题栏(How can I handle events in the titlebar and change its color etc ? )
- How much memory is consumed by the Linux kernel per TCP/IP network connection?
- How can I protect derived classes from breaking when I change the internal parts of the base class?
- [转]、How TCP IP works,How does the Internet Work,How the DNS works
- how can i change the back color on mouse out to the color specified in gridview
- 怎样控制Qt标题栏(How can I handle events in the titlebar and change its color etc ? )
- 怎样控制Qt标题栏(How can I handle events in the titlebar and change its color etc ? )
- How to disable the Media Sensing feature for TCP/IP in Windows
- The TCP/IP parameters for tweaking
- LiveZilla管理员密码忘记了如何恢复?How can I change the administrator password
- How to change the network IP addresses of SQL Server failover cluster instances-[From MS]
- 20080331 - How many processes can listen on a single TCPIP port
- How can i change the title?
- How do I set or change the PATH system variable?
- how change the title of the dialog box?
- 23 How can you reverse the effects of an ALTER DISKGROUP … DROP DISK command if it has not yet compl
- How to Change the Hostname of a Linux System
- 关于mysql报错:Can't start server: Bind on TCP/IP port: Permission denied