Linux network optimization

Source: Internet
Author: User
After the Linux system is installed, the default TCPmemory parameter is set to 128 kB. when too many processes communicate over the network, exceptions may occur. You can use the command to expand memory usage: www.2cto.com # sysctl-wnet.core.rmem_max16777216 # sysctl-wnet.core.wmem_m...

After the Linux system is installed, the default TCP memory parameter is set to 128 kB. when too many processes communicate over the network, exceptions may occur.
You can use the command to expand the memory usage: www.2cto.com
# Sysctl-w net. core. rmem_max = 16777216
# Sysctl-w net. core. wmem_max = 16777216
# Change to 16 MB
It is best to modify the/etc/sysctl. conf file at the same time to ensure the normal operation of the system:
# These ensure that TIME_WAIT ports either get reused or closed fast.
Net. ipv4.tcp _ fin_timeout = 1
Net. ipv4.tcp _ tw_recycle = 1
# TCP memory
Net. core. rmem_max = 16777216
Net. core. rmem_default = 16777216
Net. core. netdev_max_backlog = 262144
Net. core. somaxconn = 262144

From: Black nest

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.