The amount of shared memory that can be allocated system-wide. Without that being enabled, Linux will cache files both in the system buffer cache and in SGA. That double caching is unnecessary and will deprive the server of RAM resources. The following section provides a closer look by outlining some of the important Oracle parameters for performance. Remember that although swap is slower than RAM, the system is intelligent enough to move data which is less likely to be needed to swap, thus freeing up more RAM for data in higher demand.
In this way, adding swap, a slower resource, can increase performance. If you find your current swap allocation is lower than the Oracle recommendation, you need to increase the size of the swap partition or create a new partition on a different disk. This is covered in detail in Chapter 5. Semaphores Semaphores act as flags for shared memory. Semaphores are either set on or off. When an Oracle process accesses the SGA in shared memory, it checks for a semaphore for that portion of memory.
If it finds a semaphore set on for that portion of memory, indicating another process is already using that portion, the process will sleep and check again later. If there is no semaphore set on for that portion of memory, it sets one on and proceeds with its operation. When it is done, it switches that semaphore back to off. Oracle specifies semaphore values for semmsl, semmns, semopm and semmni as , , and , respectively. These can be found in the output of the sysctl command in this same order.
The number of semaphores per set semmns: The total number of semaphores available semopm: The number of operations which can be made per semaphore call semmni: The maximum number of shared memory segments available in the system The Oracle recommended values is a good starting point for these parameters, but when running multiple Oracle databases on a system, semmsl and semmns may need to be increased to accommodate the additional instances. If there is already a line for kernel.
The line should look like this: Comments can be added by starting a line with a character. Shared Memory Settings The parameters shmall, shmmax, and shmmni determine how much shared memory is available for Oracle to use. These parameters are set in memory pages, not in bytes, so the usable sizes are the value multiplied by the page size, typically bytes.
The total amount of shared memory in pages which can be allocated on the system shmmax: The maximum size of a shared memory segment in pages shmmni: The maximum number of shared memory segments available on the system Given that the SGA for a database must be kept in shared memory, the value of shmmax needs to be as big as the largest SGA.
The value for shmall needs to be bigger than the sum of all your databases. The value for shmmni needs to be at least as high as the number of databases that are intended to be put on the system, but in practice is generally much higher Oracle recommends The quick install guide includes directions on checking these parameters.
Other System Settings A few additional settings are needed for Oracle. These are not directly related to the system memory, but are included in this section for completeness. This controls the number of network connections which can be allocated at once. Represent the default and maximum size of the network send buffer Under most circumstances, the Oracle recommended values should be used for these parameters.