This is a very basic step by step description of how to improve the performance networking (TCP & UDP) on Linux 2.4+ for high-bandwidth applications. These settings are especially important for GigE links. Jump to Quick Step or All The Steps.
Assumptions
This howto assumes that the machine being tuned is involved in supporting high-bandwidth applications. Making these modifications on a machine that supports multiple users and/or multiple connections is not recommended - it may cause the machine to deny connections because of a lack of memory allocation.
The Steps
1. Make sure that you have root privleges.
2. Type: sysctl -p | grep mem
This will display your current buffer settings. Save These! You may want to roll-back these changes
3. Type: sysctl -w net.core.rmem_max=8388608
This sets the max OS receive buffer size for all types of connections.
4. Type: sysctl -w net.core.wmem_max=8388608
This sets the max OS send buffer size for all types of connections.
5. Type: sysctl -w net.core.rmem_default=65536
This sets the default OS receive buffer size for all types of connections.
6. Type: sysctl -w net.core.wmem_default=65536
This sets the default OS send buffer size for all types of connections.
7. Type: sysctl -w net.ipv4.tcp_mem='8388608 8388608 8388608'
TCP Autotuning setting. "The tcp_mem variable defines how the TCP stack should behave when it comes to memory usage. ... The first value specified in the tcp_mem variable tells the kernel the low threshold. Below this point, the TCP stack do not bother at all about putting any pressure on the memory usage by different TCP sockets. ... The second value tells the kernel at which point to start pressuring memory usage down. ... The final value tells the kernel how many memory pages it may use maximally. If this value is reached, TCP streams and packets start getting dropped until we reach a lower memory usage again. This value includes all TCP sockets currently in use."
8. Type: sysctl -w net.ipv4.tcp_rmem='4096 87380 8388608'
TCP Autotuning setting. "The first value tells the kernel the minimum receive buffer for each TCP connection, and this buffer is always allocated to a TCP socket, even under high pressure on the system. ... The second value specified tells the kernel the default receive buffer allocated for each TCP socket. This value overrides the /proc/sys/net/core/rmem_default value used by other protocols. ... The third and last value specified in this variable specifies the maximum receive buffer that can be allocated for a TCP socket."
9. Type: sysctl -w net.ipv4.tcp_wmem='4096 65536 8388608'
TCP Autotuning setting. "This variable takes 3 different values which holds information on how much TCP sendbuffer memory space each TCP socket has to use. Every TCP socket has this much buffer space to use before the buffer is filled up. Each of the three values are used under different conditions. ... The first value in this variable tells the minimum TCP send buffer space available for a single TCP socket. ... The second value in the variable tells us the default buffer space allowed for a single TCP socket to use. ... The third value tells the kernel the maximum TCP send buffer space."
10. Type:sysctl -w net.ipv4.route.flush=1
This will enusre that immediatly subsequent connections use these values.
Quick Step
Cut and paste the following into a linux shell with root privleges:
sysctl -w net.core.rmem_max=8388608
sysctl -w net.core.wmem_max=8388608
sysctl -w net.core.rmem_default=65536
sysctl -w net.core.wmem_default=65536
sysctl -w net.ipv4.tcp_rmem='4096 87380 8388608'
sysctl -w net.ipv4.tcp_wmem='4096 65536 8388608'
sysctl -w net.ipv4.tcp_mem='8388608 8388608 8388608'
sysctl -w net.ipv4.route.flush=1
References
All of this information comes directly from these very reliable sources:
* Pittsburgh Super Computing Center TCP Tuning Guide
* Summary of Buffer Sizes for Various Os's
* Ipsysctl tutorial 1.0.3
Feedback
Please send me some feedback on how this worked for you. I'd be happy to help you figure it out on yours. I've used these or similar settings for a number of high-bandwidth applications with great results.
相关推荐
《SQL Server 2008查询性能优化》(SQL Server 2008 Query Performance Tuning Distilled)扫描版[PDF] 个人感觉不错,对Sqlserver优化很有帮助,主要都是我们经常犯的错,值得借鉴:如:低性能的查询、索引、死锁等等...
3. ** fine-tuning**:预训练的BERT模型可以在下游任务上进行微调,如问答、情感分析、命名实体识别等,只需添加特定任务的输出层,并用目标数据集进行训练。 4. **Hugging Face Model Hub**:这是一个社区驱动的...
《SQL Server 2008查询性能优化》(SQL Server 2008 Query Performance Tuning Distilled)扫描版[PDF] 个人感觉不错,对Sqlserver优化很有帮助,主要都是我们经常犯的错,值得借鉴:如:低性能的查询、索引、死锁等等...
《SQL Server 2008查询性能优化》(SQL Server 2008 Query Performance Tuning Distilled)扫描版[PDF] 个人感觉不错,对Sqlserver优化很有帮助,主要都是我们经常犯的错,值得借鉴:如:低性能的查询、索引、死锁等等...
《SQL Server 2008查询性能优化》(SQL Server 2008 Query Performance Tuning Distilled)扫描版[PDF] 个人感觉不错,对Sqlserver优化很有帮助,主要都是我们经常犯的错,值得借鉴:如:低性能的查询、索引、死锁等等...
Output buffering is a mechanism for controlling how much output data ; (excluding headers and cookies) PHP should keep internally before pushing that ; data to the client. If your application's ...
- 参考资料: [Oracle Database Performance Tuning Guide](https://docs.oracle.com/cd/B19306_01/perftune.102/b14299/toc.htm) 13. **SI_INFORMTN_SCHEMA** - 用户名: `SI_INFORMTN_SCHEMA` - 密码: 默认为空...
ChatGPT强大的性能让人爱不释手,ChatGPT... Exploring the State of Instruction Tuning on Open Resources 论文链接: https://arxiv.org/pdf/2306.04751.pdf 项目链接: https://github.com/allenai/open-instruct
- Peter Flynn的XML FAQ、Lisa Rein’s finetuning XML FAQs、Dave Pawson’s XSL FAQ、jGuru’s XML FAQ以及Ronald Bourret’s XML Namespaces FAQ都是处理XML问题的宝贵资源,涵盖了XSLT、XPath、命名空间等各个...
选手需根据给定的数据构建标签和用户行为序列特征来训练模型。 #2021爱奇艺用户存留预测 ...提分点:特征衍生、nullimportance特征筛选法、调整网络参数和结构、finetuning、交叉验证、伪标签、vote融合。
TS-4807-Easily Tuning Your Real-Time Application.pdf和TS-6989-Building Real-Time Systems for the Real World.pdf探讨了如何优化实时应用的性能。这些文档可能涵盖了实时调度、内存管理、中断处理和确定性通信...
export one to one by Tom 10. oracle sql http://zuse.esnig.cifom.ch/database/doc_oracle/Oracle920_Linux/ server.920/a96540/toc.htm 11. oracle rac ...
根据提供的文件信息,我们可以深入探讨Oracle PL/SQL性能调优中的关键知识点,这些知识点主要集中在“编码实践”和“系统配置”两个方面。 ### 一、编码实践 #### 数值数据类型的选择 在PL/SQL中,数值数据类型的...
# TCP/IP Tuning知识点详解 ## 一、TCP/IP调优概述 ### 1.1 TCP/IP调优的重要性 在高带宽广域网络中,TCP/IP协议的性能调优对于实现高效的数据传输至关重要。随着网络技术的发展和应用需求的增长,优化TCP/IP参数...
OGC Player的非官方扩展。 此扩展名适用于匈牙利游戏网站。 Az OGCJátékosoldalaihozkészültnem hivatalos Chromebővítmény。 Funkciók:-Smiley gombok(hozzászólásoknál,普里瓦üzeneteknél,...
DPDK技术峰会,PPT讲稿分享 ,演讲者中兴通讯架构师,PPT名称:Network Performance Tuning, Lesson Learned – Fangliang Lou @ ZTE 该文档讨论了利用Intel和DPDK技术使无线工作负载达到明显性能提升的性能优化...
<M> Connection tracking timeout tuning via Netlink <*> Netfilter Xtables support (required for ip_tables) *** Xtables combined modules *** (有很多项,在下面!) <*> "conntrack" connection ...
天气-快速拨号-Gmail收件箱-屏幕保护程序-Google Calendar Sync隐私权政策:https://coolstart.com/privacy-policy使用条款:https://coolstart.com/terms-of-use如何卸载:https://coolstart.com/how-to-uninstall ...
How to Make Perl Do CGI H G Understanding CGI Calling a Script from a Form H Getting Information to the Script H Processing QUERY_STRING into Useful Chunks H Using Regular Expressions tr/// and s...