How to Set kernel. shmmax in Linux

Source: Internet
Author: User

SHMMAX Available physical memory Defines the maximum allowable size of one shared memory segment. the SHMMAX setting shoshould be large enough to hold the entire SGA in one shared memory segment. A low setting can cause creation of multiple shared memory segments which may lead to performance degradation.

According to Oracle's explanation, SHMMAX should be larger than the SGA zone. Otherwise, it will lead to performance degradation!

Shmmax refers to the maximum size of a single shared memory segment. If shmmax is set to 1 GB, sga allocates 1.2 GB. When the instance is started, two shared memories are allocated to Oracle.

If the physical memory is 2 GB and Apache is still running on the DB Server, the memory set in shmmax will also be used by Apache, if the allocated two shared memory segments are 2*1 GB for Oracle, or if the allocation is stopped only when 1.2 GB meets SGA requirements, is a part of other memory allocated to Oracle PGA and Apache?

When installing oracle, you often need to modify the kernel file/etc/sysctl. conf and set this parameter.

Set oracle shared memory segments:

Modify the/etc/sysctl. conf file as root and add the following statement:

Kernel. shmmax = 2147483648
Kernel. shmmni = 4096
Kernel. shmall = 2097152
Kernel. sem = 250 32000 100 128
Fs. file-max = 65536
Net. ipv4.ip _ local_port_range = 1024 65000

Note:

The four parameters of sem are SEMMSL (each user has the maximum number of semaphores );
SEMMNS (maximum number of system semaphores );
SEMOPM (number of calls to the semopm system each time );
SEMMNI (the maximum number of hard data sets in the system ).
Shmmax maximum shared memory 2 GB
You can set the physical memory to 536870912 if it is small.
Shmmni minimum shared memory is 4096KB.
All Shmall memory sizes.

  • 1
  • 2
  • Next Page
[Content navigation]
Page 1st: how to set kernel. shmmax in Linux Page 2nd: how to set kernel. shmmax in Linux

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.