Link to home
Start Free TrialLog in
Avatar of wren2000
wren2000

asked on

Solaris 2.6 SHMMAX setting for Oracle 8.0.5

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?

Thanks!

Avatar of sbenyo
sbenyo

Hi,

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:
db_block_size
db_buffers
share_pool_size

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.



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.
ASKER CERTIFIED SOLUTION
Avatar of tbcox
tbcox

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial