Re: Linx and kernel config shmmax

From: Gaja Krishna Vaidyanatha <>
Date: Sat, 8 Jan 2011 17:00:25 -0800 (PST)
Message-ID: <>

Hi Jon,

Happy New Year! I did a round of testing 10 - 12 years ago on Solaris, HP-UX and Digital Unix (man I miss my Dec Alpha 8200 series...:( ) and did not find ANY differences in OS or Oracle performance when configuring the OS with varying values of SHMMAX(1GB, 4GB, 8GB and 16GB if memory serves me right). Too many mind altering beverages in 10 years to keep those memory cells alive ;)...digging deep from my archives ;)

I do remember that the same workload was run on all settings and the workload was traced. Trace output did not show any significant difference in any of the elapsed times of the SQL. At the OS level, a sar -u output did not show any significant increase in numbers under the %sys column for lower values of SHMMAX. Nor did we observe any major increase in any virtual memory statistics in the vmstat output. But way back then, the systems I played with had about 16GB (may be 32GB on Digital Unix) of memory.

Might be interesting to find out whether your 64GB Linux system today demonstrates any significant increase in %sys, when you run the same workload with a 1GB vs. say 32GB SHMMAX with a 32GB SGA. Assuming that technology (OS memory management and Oracle Buffer Cache Management) has only positively progressed in the last 10 years, I would probably speculate that smaller SHMMAX values will not have a significant negative impact on performance. But a test is worth a thousand speculations. A few key factors to keep in mind for your tests:

  1. Ensure that the SGA+PGA memory settings are reasonable and do not push the OS in memory starvation mode.
  2. Lock the SGA in memory to quieten the paging daemon to eliminate any unnecessary paging.
  3. Do not use Automatic SGA management just to keep the comparison clean for your initial test runs. Turn this on in your later tests and see whether it is a factor.
  4. Enable direct I/O to ensure that the OS does not allocate a large filesystem buffer cache and muddy the waters.

Keep us posted,



Gaja Krishna Vaidyanatha,
Founder/Principal, DBPerfMan Inc.,
Phone - 001-(650)-743-6060
Co-author:Oracle Insights:Tales of the Oak Table - Co-author:Oracle Performance Tuning 101 -

Sent: Thu, January 6, 2011 9:25:59 PM
Subject: Linx and kernel config shmmax

Is there any advantage or disadvantage to having really large or many smaller shared memory segments ?  

Lets say I have a 64gb machine, and I set up shmmax to support at least 64gb, maybe even more. My db does not use anything close to 64g of memory. Is there any drawbacks to this behavior?  

What if I have a really large db, but I force it to use many smaller 4g or 8gb segments to make up the entire sga ? We did some very limited internal testing on this and could not come up with a firm opinion on which is better.

Received on Sat Jan 08 2011 - 19:00:25 CST

Original text of this message