out of socket memory相关tcp参数
2013-04-26 00:49
344 查看
out of socket memory调整
主要是调整TCP缓冲区
Increasing the TCP send and receive buffers will increase the performance a lot if (and only if) you have a lot of large files to send.
增加TCP 发送和接收缓冲区对性能有很大的提高,在你有大文件发送的情况下
net.ipv4.tcp_wmem = 4096 65536 524288
net.core.wmem_max = 1048576
If you have a lot of large file uploads, increasing the receive buffers will help.
如果你有大文件上传,增大接收缓冲区对给你带来帮助
net.ipv4.tcp_rmem = 4096 87380 524288
net.core.rmem_max = 1048576
# These ensure that TIME_WAIT ports either get reused or closed fast.
以下参数确保TIME_WAIT 快速关闭
net.ipv4.tcp_fin_timeout = 1 ##打开fin_wait 快速关闭参数
net.ipv4.tcp_tw_recycle = 1 ##快速回收fin_wait参数
设置内核TCP的相关参数
# TCP memory
net.core.rmem_max = 16777216 ##内核最大接收缓冲 16M
net.core.rmem_default = 16777216 ##内核黙认接收缓冲 16M
net.core.netdev_max_backlog = 262144 ##2M
net.core.somaxconn = 262144 ##2M
net.ipv4.tcp_syncookies = 1 ##打开SYN_COOKIE
net.ipv4.tcp_max_orphans = 262144 ##2M
net.ipv4.tcp_max_syn_backlog = 262144 ##SYN 队列大小 2M
net.ipv4.tcp_synack_retries = 2 ##SYN_ACK重试时间 2秒
net.ipv4.tcp_syn_retries = 2 ## SYN 重试时间 2秒
# you shouldn't be using conntrack on a heavily loaded server anyway, but these are
# suitably high for our uses, insuring that if conntrack gets turned on, the box doesn’t die
如果用到IPTABLES 同样在增长ip_conntrack 的大小,这个是iptables 所管理的状态数目
net.ipv4.ip_conntrack_max = 1048576
net.ipv4.netfilter.ip_conntrack_max = 1048576
原文:
http://hi.baidu.com/lewutian/item/b7fe3cc56f966345a8ba94c2
主要是调整TCP缓冲区
Increasing the TCP send and receive buffers will increase the performance a lot if (and only if) you have a lot of large files to send.
增加TCP 发送和接收缓冲区对性能有很大的提高,在你有大文件发送的情况下
net.ipv4.tcp_wmem = 4096 65536 524288
net.core.wmem_max = 1048576
If you have a lot of large file uploads, increasing the receive buffers will help.
如果你有大文件上传,增大接收缓冲区对给你带来帮助
net.ipv4.tcp_rmem = 4096 87380 524288
net.core.rmem_max = 1048576
# These ensure that TIME_WAIT ports either get reused or closed fast.
以下参数确保TIME_WAIT 快速关闭
net.ipv4.tcp_fin_timeout = 1 ##打开fin_wait 快速关闭参数
net.ipv4.tcp_tw_recycle = 1 ##快速回收fin_wait参数
设置内核TCP的相关参数
# TCP memory
net.core.rmem_max = 16777216 ##内核最大接收缓冲 16M
net.core.rmem_default = 16777216 ##内核黙认接收缓冲 16M
net.core.netdev_max_backlog = 262144 ##2M
net.core.somaxconn = 262144 ##2M
net.ipv4.tcp_syncookies = 1 ##打开SYN_COOKIE
net.ipv4.tcp_max_orphans = 262144 ##2M
net.ipv4.tcp_max_syn_backlog = 262144 ##SYN 队列大小 2M
net.ipv4.tcp_synack_retries = 2 ##SYN_ACK重试时间 2秒
net.ipv4.tcp_syn_retries = 2 ## SYN 重试时间 2秒
# you shouldn't be using conntrack on a heavily loaded server anyway, but these are
# suitably high for our uses, insuring that if conntrack gets turned on, the box doesn’t die
如果用到IPTABLES 同样在增长ip_conntrack 的大小,这个是iptables 所管理的状态数目
net.ipv4.ip_conntrack_max = 1048576
net.ipv4.netfilter.ip_conntrack_max = 1048576
原文:
http://hi.baidu.com/lewutian/item/b7fe3cc56f966345a8ba94c2
相关文章推荐
- TcpSocketLink OutOfMemory,java.lang.OutOfMemoryError: unable to create new native thread 问题解决过程小记
- TCP/IP Run Out of Memory
- 内存不足导致的java.lang.OutOfMemoryError: java heap space引出java工程启动参数设置
- JVM启动参数与java.lang.OutOfMemoryError
- 关于 Out of Socket memory 的解释
- Java OutOfMemory Error引发的JVM参数实测--Xms和Xmx参数篇
- JVM的参数设置与OutOfMemoryError异常关系
- java中的OutOfMemory设置jvm启动参数
- linux下JVM参数-XX:+HeapDumpOnOutOfMemoryError 设置
- 解决Out of socket memory问题
- OutOfMemoryError相关问题
- Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: PermGen space
- linux服务器内核报错,printk: 58 messages suppressed和Out of socket memory
- Linux: CentOS and Out of socket memory
- idea报 Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: PermGen space
- eclipse启动参数 java.lang.OutOfMemoryError: Java heap space
- Summary_异常- Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: PermGen space
- Tomcat内存溢出java.lang.OutOfMemoryError解决方法与参数说明
- jrockit之-XXexitOnOutOfMemory参数
- Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: PermGen space