The most complete sysctl.conf optimization scheme in China

Source: Internet
Author: User

###############################

Net.inet.ip.sourceroute=0

Net.inet.ip.accept_sourceroute=0

#############################

With source routing, an attacker could attempt to reach an internal IP address, including an address in RFC1918, so

Not accepting source routing packets can prevent your internal network from being probed.

#################################

Net.inet.tcp.drop_synfin=1

###################################

Security parameters, when the kernel is compiled with the options Tcp_drop_synfin can be used to prevent certain OS detection.

##################################

kern.maxvnodes=8446

################ #http://www.bsdlover.cn#########

Vnode is an internal expression of a file or directory. Therefore, increasing the number of vnode that can be exploited by the operating system will reduce disk I/O.

Generally, this is done by the operating system itself and does not need to be modified. But at some point disk I/O can become a bottleneck,

The vnode of the system is insufficient, this configuration should be increased. You need to consider the number of inactive and free memory at this time.

To view the number of Vnode currently in use:

# sysctl Vfs.numvnodes

vfs.numvnodes:91349

To view the maximum number of Vnode available:

# sysctl Kern.maxvnodes

kern.maxvnodes:100000

Increasing the Kern.maxvnodes value by 1,000 may be a good idea if the current amount of vnode is close to the maximum value.

You should continue to see the value of vfs.numvnodes, if it climbs again to the nearest maximum,

Still need to continue to improve kern.maxvnodes. The amount of memory shown in top (1) should vary significantly,

More memory will be in active (active) state.

####################################

kern.maxproc:964

################ #http://www.bsdlover.cn#########

Maximum Number of processes

####################################

kern.maxprocperuid:867

################ #http://www.bsdlover.cn#########

Maximum processes allowed per userid

####################################

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.