Linux core parameters Shmmax, shmall, shmni

Source: Internet
Author: User

Core parameter adjustment in Linux

Kernel. shmmax

Shmmax is one of the most important parameters in core parameters. It is used to define the maximum value of a single shared memory segment. The shmmax setting should be large enough to accommodate the entire SGA in a shared memory segment, setting too low may lead to the creation of multiple shared memory segments, which may lead to a reduction in system performance.

Oralce recommends that a large shared memory segment can accommodate the entire SGA, so that there will be no potential for performance degradation at any time.

We recommend that you set shmmax to a 32-bit maximum value (settingshmmax to the 32-bit number limit) in 32-bit Linux, that is, 4 GB, so the physical memory is 1-4 GB, you can directly set shmmax to the maximum physical memory. SGA must set the 32-bit Linux physical memory to 4 GB in a shared memory segment.

Set shmmax> = SGA (Note whether the 32-bit system supports SGA up to 1.7 GB ). In a 64-bit Linux system, set shmmax to a value greater than SGA_MAX_SIZE.

Ipcs-sa can see the number of shared memory segments

Kernel. shmall

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. The maximum size of a shared memory segment is 16 GB, and the number of pages to be shared is 16 GB/4KB = 16777216KB/4KB = 4194304 (PAGE), that is, 64-bit system 16 GB physical memory, set kernel. shmall = 4194304 meets the requirements (almost twice the original 2097152 ). The shmmax parameter can be adjusted to 16 GB, And the SGA_MAX_SIZE and SGA_TARGET can be modified to 12 GB (the maximum SGA size is also 2 GB ~ 14 GB, and other memory usage such as PGA parameters and OS must be coordinated. It cannot be set to be too full, such as 16 GB)

Kernel. shmmni

The shmmni Kernel Parameter is the maximum number of shared memory segments (note that this parameter is not shmmin, shmmni, and shmmin indicates the minimum size of the memory segment ).

The shmmni default value is 4096.

Shmmax (bytes) = shmmni (page size, default 4 k) * shmall (number of pages)

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.