1821245 Members
2683 Online
109632 Solutions
New Discussion юеВ

SHMMAX kernel parameter

 
sheevm
Regular Advisor

SHMMAX kernel parameter

Hi,

I am working on setting up the Oracle 10g server. HP-UX 11i v2 (rp4440). In the Oracle guide this parameter calls for available physical memory.

The box has 8GB memory installed. Do I set up this SHMMAX to 8GB or lower?

Can someone who has done this for Oracle help me?

Thanks
Raji
be good and do good
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: SHMMAX kernel parameter

Hi Raji:

Well I certainly wouldn't set this to the size of your physical memory. 'shmmax' is the maximum size of a single shared memory segment. No application would/should attempt to acquisition ('shmget()') shared memory that represented the whole physical memory limit in one pass (assuming that it even could). I'd choose a value of perhaps 4-6GB at most.

Regards!

...JRF...

A. Clay Stephenson
Acclaimed Contributor

Re: SHMMAX kernel parameter

This is not the global maximum shared memory amount but rather the per-process maximum shared memory size limit. You should meet with your DBA's and determine what is the maximum size needed by their largest Oracle instance and set SHMMAX accordingly. Note that even if set to a realtively small value (1GB), you could still exhaust all the physical memory by running multiple instances. If you begin to see significant pageout (swapping) rates then you know there are too big big SGA's on your box. Setting this value high does no harm and consumes no memory directly but a large value easily leads to abuse by a single process.
If it ain't broke, I can fix that.
Ivan Ferreira
Honored Contributor

Re: SHMMAX kernel parameter

I work in the Tru64 Unix environment, and the Systen configuration and performance tunning guide, recommends for oracle:

2GB-8M (2139095040) Recommended.

4GB-16M (4278190080) As maximum shared memory if oracle is the only application on the system.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Hein van den Heuvel
Honored Contributor

Re: SHMMAX kernel parameter

Clay wrote: "This is not the global maximum shared memory amount but rather the per-process maximum shared memory size limit"

I believe that to be incorrect.
It is the maximum size of a single segment, but an application is free to allocated multiple segments, and indeed Oracle has the smarts to do so.

I have only actually tried this on Tru64 and Linux, but on both systems Oracle happiply allocates a 4GB SGA as 1-4GB chunk or as 4*1GB chunks. I would be very surprised if Oracle would not work the same way on Hpux.
The 'cost' of doing multiple segments is minimal, but to void makign Oracle jump through hoops why not set it to the absolute max which really is the phsyical memory size. It make no sense to map a share memory segment larger then physical memory.

hth,
Hein.

"shmmax defines the system-wide maximum allowable shared memory segment size in bytes. Any shmget() system call that requests a segment larger than this limit returns an error (see HP-UX Reference entry shmget(2))."

http://docs.hp.com/en/B2355-90847docs/B2355-90847docs.pdf