shmmax sizing recommendations

From: Don Seiler <don_at_seiler.us>
Date: Wed, 18 Nov 2009 08:56:29 -0600
Message-ID: <94e86aed0911180656l2a1cbb6exf749eaa854c7b11_at_mail.gmail.com>



While troubleshooting an ORA-04030 issue, Oracle Support also took notice that we had shmmax a bit out of whack.  Whether or not this would contribute to the 04030, I'll not get into right now.  This is Oracle 11.1.0.7 64-bit on OEL 5.3. The server has 64gb of physical RAM. It hosts 3 RDBMS instances and 1 ASM instance, with a sum total SGA sizes of ~42 gb and HugePages configured for 44gb. The largest instance has an SGA of just under 30gb.

OSS first suggested setting shmmax to "RAM times 0.5 but not greater then 4GB-1" and then pointed me to Doc Id 567506.1:

  • BEGIN QUOTE === Oracle Global Customer Support officially recommends a " maximum" for SHMMAX of just less than 4Gb, or 4294967295.

The maximum size of a shared memory segment is limited by the size of the available user address space. On 64-bit systems, this is a theoretical 2^64bytes. So the "theoretical limit" for SHMMAX is the amount of physical RAM that you have.  However, to actually attempt to use such a value could potentially lead to a situation where no system memory is available for anything else.  Therefore a more realistic "physical limit" for SHMMAX would probably be "physical RAM - 2Gb".

In an Oracle RDBMS application, this "physical limit" still leaves inadequate system memory for other necessary functions. Therefore, the common "Oracle maximum" for SHMMAX that you will often see is "1/2 of physical RAM". Many Oracle customers chose a higher fraction, at their discretion.

One last data point for 64-bit Linux systems: A SHMMAX value of 4Gb or greater will lead to coredump limitations. If a customer is willing to forfeit complete and successful core file generation under any and all circumstances, then a SHMMAX value of 4Gb or greater is fine. It is for this reason that Oracle Global Customer Support officially recommends a " maximum" for SHMMAX of just less than 4Gb, or 4294967295.
=== END QUOTE === I'm wondering what the masters out in the field think. Would you advise setting SHMMAX to fit the largest SGA? Is there any known performance hit by having more, smaller segments for an instance rather than 1 large one?

--

Don Seiler
http://seilerwerks.wordpress.com
ultimate: http://www.mufc.us
--

http://www.freelists.org/webpage/oracle-l Received on Wed Nov 18 2009 - 08:56:29 CST

Original text of this message