Oracle Linux Kernel Parameter Modification

Source: Internet
Author: User

Instance:

Kernel. core_uses_pid = 1
Kernel. shmall = 2097152
Kernel. shmmax = 2147483648
Kernel. shmmni = 4096
Kernel. sem = 250 32000 100 128
Fs. file-max = 65536
Net. ipv4.ip _ local_port_range = 9000 65000
Net. core. rmem_default = 4194304
Net. core. rmem_max = 4194304
Net. core. wmem_default = 262144
Net. core. wmem_max = 262144
 
Ore_uses_pid can control whether pid is added as an extension to the file name of the generated core file. If it is added, the file content is 1; otherwise, it is 0.
 
When the server memory is 4 GB
 
Modify the/etc/sysctl. conf file (ROOT account)
 
Kernel. shmmax = 2147483648
// Formula: 2G * 1024*1024*1024 = 2147483648 (bytes)
// Indicates the maximum shared memory. If it is small, it can be determined based on the actual situation. Generally, it is half of the physical memory and can be larger (in bytes)
 
Kernel. shmmni = 4096
// The shmmni Kernel Parameter is the maximum number of shared memory segments (note that this parameter is not shmmin, yes
 
Shmmni, shmmin indicates the minimum memory segment size ). The shmmni default value is 4096, which is generally enough.
 
Kernel. shmall = 1048576
// The kernel. shmall parameter controls the number of pages in the shared memory. The size of the Linux Shared Memory Page is 4 kb, and the size of the shared memory segment is an integer multiple of the size of the shared memory page. Formula: 4G * 1024*1024/4 K = 1048576 (PAGE) view memory page size method # getconf PAGESIZE
 
// Kernel. shmall: indicates the total amount of available shared memory. The unit is page. On the 32-bit system, the previous page is 4 kb, that is, 4096 bytes.
 
Kernel. sem = 250 32000 100 128
// The four parameters are SEMMSL in sequence: each user has the maximum number of semaphores, SEMMNS: the maximum number of system semaphores, SEMOPM: the number of calls to the semopm system each time, and SEMMNI: the maximum number of system worker sets. The four parameters are fixed content sizes.
 
Fs. file-max = 65536
// In linux, if too enabled file opened is reported, you need to increase the number of files allowed to be opened by the system. File-max fixed size 65536
 
Net. ipv4.ip _ local_port_range = 1024 65000
// Ip_local_port_range indicates the port range, which is the specified content.
 
 
Kernel. sem: indicates the set semaphore. The content of these four parameters is fixed.
 
Net. core. rmem_default: the default value of the buffer size of the received socket (in bytes ).
 
Net. core. rmem_max: Maximum buffer size of the received socket (in bytes)
 
Net. core. wmem_default: the default value of the buffer size of the sending socket (in bytes ).
 
Net. core. wmem_max: Maximum buffer size of the sending socket (in bytes)
 
Run/sbin/sysctl-p to make the kernel take effect.
 
Verification parameters (executed by the root account ):
#/Sbin/sysctl-a | grep shm
#/Sbin/sysctl-a | grep sem
#/Sbin/sysctl-a | grep file-max
#/Sbin/sysctl-a | grep ip_local_port_range

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.