Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Solaris 2.6 SHMMAX setting for Oracle 8.0.5

Posted on 2000-04-20
Medium Priority
Last Modified: 2013-12-05
Server Platform: Sun Solaris 2.6
Oracle version: 7.3.4
Other Install: Context Cartridge 2.3.4
Physical Memory: .5 GB
Swap Space: 1 GB

We have run into an issue with the default SHMMAX settings suggested by Oracle documentation. Oracle documentation suggested that we have a 4GB SHMMAX setting, but when we used that setting, it seemed that swap space was being taken for the SGA.

It has been suggested to us that we use an SHMMAX setting that is the same as physical memory. In our case, it would be .5 GB.

My question is for those who have dealt with this situation...
Is it better to set the SHMMAX setting to the amount of physical memory? If so, then why does Oracle documentation state it differently? May we experience problems because the SHMMAX is set so low?


Question by:wren2000
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 2736730

Shmmax defines the maximum size a shared segment can be.

shmmax is used by the kernel every time a share memory is being allocated (ask by applications).
If the share memory asked for is larger than shmmax allocation fails.

Setting shmmax to its maximum value does not effect the kernel size -- no kernel resources get allocated based on shmmax, so this can be tuned to its maximum value of 4 GB (0xffffffff).

In Solaris 2.6 shmmax can get as high as 4GB and this is because of the 32-bit limit of the kernel.
In the kernel shmmax is defined as:

set shmsys:shminfo_shmmax=0xffffffff /* hexidecimal */
set shmsys:shminfo_shmmax=4294967295 /* decimal */

That's exactly what Oracle recommend.
Oracle tries to allocate shared memory for the SGA. setting shmmax to the highest limit only ensures that Oracle's request for shared memory will not fail.

But, there may be other programs using shared memory segments causing the SGA not be able to use one contigous segment.
Use ipcs -a to determine shared memory usage on your system, and see if there is high usage of shared segments.
If so, check what's running on the system apart from Oracle that uses your shared memory.

As for swapping, how did you check that the SGA is being swapped ?
In this case you should also check the init.ora parameters:

These parameters (with some other which are not that important) determine the SGA size.
You have to tune these parameters so that you system will not be too large for your system, and still will be enough for the database.


Expert Comment

ID: 2742790
You have to make you share memory as large as the larges SGA plus some (15 to 20% is a good estimate). Don't set the shared memory max  to more than .5 GB. And make you your SGA less than or equal to 1/2 the memory, 256Mb. Your swapping problem will probably go away. If it does not  then you should try to further reduce the SGA and consider using MTS.

Accepted Solution

tbcox earned 300 total points
ID: 2746435

 Content Type:  TEXT/PLAIN
Creation Date:  09-AUG-1995
Last Revision Date:  28-MAR-2000
Language:  USAENG

Problem Description:
This entry lists shared memory requirements for Unix systems.
Problem Explanation:
Oracle uses shared memory and semaphores to communicate between processes and
the SGA (System Global Area).  There are certain requirements for shared
memory and the semaphores.  When the Oracle instance comes up, it allocates a
certain portion of the main memory to create the SGA. If the shared memory or
the semaphores are not set properly, then it gives an error related to shared
memory or semaphores.  
The following are the recommended values for shared memory and semaphores for
running a SMALL size Oracle database.  These values are set at the Unix kernel


Solution Description:
The shared memory feature of the UNIX operating system is required by Oracle.  
The System Global Area (SGA) resides in shared memory; therefore, shared
memory must be available to each Oracle process to address the entire SGA.
      Definitions of Shared Memory and Semaphore Parameters
SHMMAX = The maximum size(in bytes) of a single shared memory segment.
SHMMIN = The minimum size(in bytes) of a single shared memory segment.
SHMMNI = The number of shared memory identifiers.
SHMSEG = The maximum number of shared memory segments that can be attached by
       a process.
SEMMNS = The number of semaphores in the system.
SEMMNI = The number of semaphore set identifiers in the system; determines the
       number of semaphore sets that can be created at any one time.
SEMMSL = The maximum number of sempahores that can be in one semaphore set.
       It should be same size as maximum number of Oracle processes
       (The PROCESSES parameter in the init.ora file).
      Recommended Semaphore and Shared Memory Parameters
Operating System        Shared Memory Parameters                 Semaphore
----------------        ------------------------                 ---------
Sun OS                  SHMSIZE = 32768                          SEMMNS = 200
                        SHMMNI = 50                              SEMMNI = 50
Solaris                 SHMMAX = 8388608                         SEMMNS = 200
                        SHMSEG = 20                              SEMMSL = 50
                  SHMMNI=100                         SEMMNI = 70
      Setting the Shared Memory and Semaphore Parameters
The values of the shared memory and semaphore parameters must be set in the
kernel configuration file of your operating system (OS).  The location of that
file is port-specific. See PRE 1010913.6 for its name and location on your
To check your current shared memory and semaphore configuration you can use
the command:
      % sysdef | more
Example on HP-UX (relevant sections only):
Semaphore Related Parameters
 maximum value for semaphores(semaem)= 16384
 Semaphore  map(semmap)= 4098
 number of semaphore identifiers(semmni) = 4096
 total number of semaphores in the system(semmns) = 8192
 number of semaphore undo structures(semmnu) = 1536
 semaphore undo entries per process(semume) = 512
 semaphore maximum value(semvmx) = 32767
Shared Memory Related Parameters
 maximum shared memory segment size in bytes(shmmax) = 536870912
 minimum shared memory segment size in bytes(shmmin) = 1
 maximum shared memory segments in system (shmmni) = 512
 maximum shared memory segments per process(shmseg) = 512
NOTE:  The SHMMAX is quite large on this system as there are 8 instances
running on this system.
To make changes in shared memory or semaphore parameters:
      1. Shut down any running Oracle instances
      2. Locate the kernel configuration file for your OS
      3. Make the necessary changes using the system utilities or your
         favorite editor.  System utilities include:
            OS      Utility
            ---      -------
            HP-UX      SAMS
            SCO      SYSADMSH
            AIX      SMIT
            Solaris      ADMINTOOL
      4. Reconfigure the kernel.  
      5. Reboot your machine.  
      6. Restart your Oracle instances
Example, using Solaris 2.3/2.4 parameters and commands:
      1. Log into SQLDBA and type:  
            SQLDBA> shutdown
            SQLDBA> exit
      2. Log in as the superuser (root) and:
            # cd /etc/system
      3. Add the following lines to the /etc/system file:  
                set shmsys:shminfo_shmmax=8388608  
                set shmsys:shminfo_shmmin=1  
                set shmsys:shminfo_shmmni=100  
                set shmsys:shminfo_shmseg=20  
                set semsys:seminfo_semmns=200  
                set semsys:seminfo_semmni=70  
      4. Reconfigure the kernel:
            # touch /reconfigure
      5. Reboot the machine:
            #init 6  
      6. Log into SQLDBA and type:
            SQLDBA> startup
            SQLDBA> exit
      Oracle, Shared Memory, and SGA Size  
There are Oracle init<SID>.ora parameters which can be modified to influence
the size of the SGA.  These settings of these parameters, in conjunction with
OS shared memory and semaphore parameters, can influence both system and
Oracle performance.
For more information on configuring the SGA, see PRE 1008866.6
For more information on memory and performance, see PRE's 1012819.6 and


 Copyright (c) 1995,1999 Oracle Corporation. All Rights Reserved. Legal Notices and Terms of Use.


Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question