Linux operating system tuning parameters have specific meaning

Source: Internet
Author: User
Tags contains delete key file system message queue linux

All TCP/IP tuning parameters are located in the/proc/sys/net/directory. For example, here are some of the most important tuning parameters, followed by their meanings:

1,/proc/sys/net/core/rmem_max-the largest TCP data receive buffer

2,/proc/sys/net/core/wmem_max-the largest TCP data send buffer

3,/proc/sys/net/ipv4/tcp_timestamps-time stamp (please refer to RFC 1323) TCP header increased by 12 bytes

4,/proc/sys/net/ipv4/tcp_sack-have a choice of response

5,/proc/sys/net/ipv4/tcp_window_scaling-support for a larger TCP window. If the TCP window is greater than 65535 (64K), you must set this value to 1

6, rmem_default-The default receive window size

7, the maximum size of the rmem_max-receive window

8, wmem_default-The default Send window size

9. Maximum size of wmem_max-send window

All content under the/proc directory is temporary, so any modifications will be lost after restarting the system.

It is recommended that you automatically modify TCP/IP parameters when the system starts:

Add the following code to the/etc/rc.local file and save the file, and the following TCP/IP parameters are automatically modified when the system reboots:

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

TCP/IP parameters are all interpreted, the TCP window size is set to 256960, TCP timestamp is blocked (12 bytes are removed from the header of each packet), the larger TCP window is supported, and TCP has a selective response.

The above values are determined based on the interconnection and maximum bandwidth/latency rates.

This article URL address: http://www.bianceng.cn/OS/Linux/201410/45430.htm

Note: The value in the above example can actually be applied, but it contains only a subset of the parameters.

Another method: Use/etc/sysctl.conf to configure the parameter to the value you set when the system starts:

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

----------------------------------------------------------------


/proc/sys/fs/super-max

This file specifies the maximum number of Super block handlers. Any file system you mount requires a super block, so if you mount a large number of file systems, you may run out of super block handlers.

Default setting: 256

/proc/sys/fs/super-nr

This file displays the number of super blocks currently allocated. The file is read-only and is used only for display information.

/proc/sys/kernel

/proc/sys/kernel/acct

The file has three configurable values that control when the process accounting begins, based on the amount of free space on the file system that contains the log (in percentage):

Stop process Accounting If free space is below this percentage value

Start process Accounting If free space is higher than this percentage value

Check the frequency of two values above (in seconds)

To change a value for this file, you should echo a string of digits separated by a space.

Default setting: 2 4 30

If there is less than 2% free space on the file system that contains the log, these values cause the accounting to stop and, if there is 4% or more free space, start accounting again. Do one check every 30 seconds.

/proc/sys/kernel/ctrl-alt-del

The file has a binary value that controls how the system reacts when it receives the Ctrl+alt+delete key combination. These two values represent:

A value of 0 (0) indicates that the capture ctrl+alt+delete is captured and sent to the INIT program. This allows the system to shut down and reboot perfectly as if you were typing the shutdown command.

One (1) value indicates that Ctrl+alt+delete is not captured and will perform a dirty shutdown as if the power supply is turned off directly.

Default setting: 0

/proc/sys/kernel/domainname

This file allows you to configure the network domain name. It has no default value, may have already set the domain name, may not have the setting.

/proc/sys/kernel/hostname

This file allows you to configure the network host name. It has no default value and may have set the hostname, perhaps without setting it.

/proc/sys/kernel/msgmax

This file specifies the maximum length of messages that are sent from one process to another. Message passing between processes occurs in the kernel's memory and is not exchanged to disk, so if you increase this value, the amount of memory used by the operating system increases.

Default setting: 8192

/proc/sys/kernel/msgmnb

This file specifies the maximum number of bytes in a message queue.

Default setting: 16384

/proc/sys/kernel/msgmni

This file specifies the maximum number of message queue identities.

Default setting: 16

/proc/sys/kernel/panic

This file represents the time (in seconds) that the kernel waits before rebooting if "kernel Critical error (Kernel panic)" occurs. A 0 (0) Second setting disables reboot when a kernel critical error occurs.

Default setting: 0

/proc/sys/kernel/printk

The file has four numeric values that define where to send it, based on the importance of logging messages. For more information about different log levels, read the Syslog (2) online help page. The four values for this file are:

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.