An outofmemory error is reported when the database is started due to improper shmall parameter settings.

Source: Internet
Author: User
Shmall is the size of all available shared memory, measured in pages. You can use getconfPAGESIZE to obtain the size of each page, generally, the 4096-byte shmmax is the maximum size of shared memory that can be used by a single segment. ip addresses can be used.

Shmall is the size of all available shared memory, measured in pages. You can use getconfPAGESIZE to obtain the size of each page, generally, the 4096-byte shmmax is the maximum size of shared memory that can be used by a single segment. ip addresses can be used.

Shmall is the size of all available shared memory. The unit is page. You can use getconf PAGESIZE to obtain the size of each page, generally 4096 bytes.
Shmmax is the maximum shared memory size allowed for a single segment
You can use ipcs-l to view the values set by shmall and shmmax. You can see the actual usage of ipcs-u.

Oracle @ fly007: ~> Ipcs-l ------ Shared Memory Limits -------- max number of segments = 4096max seg size (kbytes) = 4194304 // shmmax is 4 Gmax total shared memory (kbytes) = 8388608 // shmall is 8 Gmin seg size (bytes) = 1 ------ Semaphore Limits -------- max number of arrays = 128max semaphores per array = 250max semaphores system wide = 32000max ops per semop call = 100 semaphore max value = 32767 ------ Messages: Limits ------ -- Max queues system wide = 16max size of message (bytes) = 65536 default max size of queue (bytes) = 65536oracle @ fly007: ~> Ipcs-u ------ Shared Memory Status -------- segments allocated 3 pages allocated 3 pages resident 3 pages swapped 0 Swap performance: 0 attempts0 successes ------ Semaphore Status -------- used arrays = 4 allocated semaphores = 488 ------ Messages: Status -------- allocated queues = 0 used headers = 0

The following are examples of shmall and shmmax parameters.

Environment Introduction:

OS: suse 11 sp1 64bit database version: oracle 11g R1 64bit host memory: 94G

1, the host memory 94G, change the database sga_target to 40G, restart the database to take effect of this parameter, during the startup process reported ORA-27102: out of memory error:

SQL> alter system set sga_target = 40G scope = spfile; System altered. SQL> shutdown immediateDatabase closed. database dismounted. ORACLE instance shut down. SQL> startupORA-27102: out of memoryLinux-x86_64 Error: 28: No space left on device

2. The current shmall and shmmax parameters are set as follows:

Fly007 :~ # Cat/etc/sysctl. conf | grep-E 'shmall | shmmax 'kernel. shmall = 4192134kernel. shmmax = 50708928512

3. shmmax is the maximum size of shared memory that can be used in a single segment. The unit is byte. Generally, shmmax> sga_target is the size, so that the entire sga is in a shared memory segment. This is a recommended practice, the shmmax we set here is half of the physical memory, that is, 47 GB, greater than sga_target = 40 Gb. this parameter is set correctly.

Fly007 :~ # Cat/etc/sysctl. conf | grep shmmaxkernel. shmmax = 50708928512fly007 :~ # Echo "50708928512/1024/1024/1024" | bc47

4. shmall indicates the size of all the shared memory that can be used. Note that the unit is a page. Use the getconf PAGESIZE command to get the size of each page as 4096 bytes, that is, 4194304*4096/1024/1024/1024 = 16 GB.

Fly007 :~ # Getconf PAGESIZE4096fly007 :~ # Cat/etc/sysctl. conf | grep shmallkernel. shmall = 4192134fly007 :~ # Echo "4194304*4096/1024/1024/1024" | bc16

5. the shared memory size is 16 GB <40 Gb. Therefore, an error is returned when the database is started. The shmall parameter can be set as follows: shmall = shmmax/4096 = 50708928512/4096 = 12380109
6. Set the shmall parameter to 12380109. This setting takes effect and starts the database normally.

Fly007 :~ # Cat/etc/sysctl. conf | grep shmallkernel. shmall = 12380109109fly007 :~ # Sysctl-pfly007 :~ # Su-oracleoracle @ fly007: ~> Sqlplus/nologSQL * Plus: Release 11.1.0.7.0-Production on Wed Dec 25 23:45:04 2013 Copyright (c) 1982,200 8, Oracle. all rights reserved. SQL> conn/as sysdbaConnected to an idle instance. SQL> startupORACLE instance started. total System Global Area 4.8103E + 10 bytesFixed Size2170704 bytesVariable Size1.9998E + 10 bytesDatabase Buffers2.8052E + 10 bytesRedo Buffers50548736 bytesDatabase mounted. database opened. SQL>

The following content about shmall and shmmax comes from: + and + SHMALL

Using ing SHMMAX and SHMALL for Oracle in Linux

======
SHMMAX and SHMALL are two key shared memory parameters that directly impact's the way by which Oracle creates an SGA. shared memory is nothing but part of Unix IPC System (Inter Process Communication) maintained by kernel where multiple processes share a single chunk of memory to communicate with each other.
While trying to create an SGA during a database startup, Oracle chooses from one of the 3 memory management models a) one-segment or B) contiguous-multi segment or c) non-contiguous multi segment. adoption of any of these models is dependent on the size of SGA and values defined for the shared memory parameters in the linux kernel, most importantly SHMMAX.

SHMMAX and SHMALL-

SHMMAX is the maximum size of a single shared memory segment set in "bytes ".

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.