Thread: SHMMAX value

SHMMAX value

From
"Thalis A. Kalfigopoulos"
Date:
This was asked repeatedly the past 2 weeks. With regard to "what is a sane value for shmmax in the kernel?" Oracle's
recommendationis to go for 0.5*physical_memory. So I gues that 0.25*physical_memory for Pg should be fine. 

cheers,
thalis


Re: SHMMAX value

From
Lamar Owen
Date:
On Wednesday 27 June 2001 12:47, Thalis A. Kalfigopoulos wrote:
> This was asked repeatedly the past 2 weeks. With regard to "what is a sane
> value for shmmax in the kernel?" Oracle's recommendation is to go for
> 0.5*physical_memory. So I gues that 0.25*physical_memory for Pg should be
> fine.

It is entirely dependent upon the load the machine is under, and what else is
running on the machine, as well as the size of the dataset.

For some servers and datasets the kernel default is 'sane' -- for others, it
is not.

I've run PostgreSQL for almost 4 years --- and I've yet to need to change
SHMMAX from the defaults.  But I am using AOLserver, which puts far less load
on a database server than other webservers or cther clients for the same
number of simultaneous connects.  And it is an Intranet system -- not heavily
loaded, either.

But, beyond that, the question has in fact been answered before.  See the
archives.  Or just use this formula:
SHMMAX>dataset-size for highest performance.  The idea is to get the whole
database in RAM.  Barring that, you want to get enough SHM to do the largest
sort/join you have entirely in RAM.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

Re: SHMMAX value

From
Bruce Momjian
Date:
> This was asked repeatedly the past 2 weeks. With regard to "what
> is a sane value for shmmax in the kernel?" Oracle's recommendation
> is to go for 0.5*physical_memory. So I gues that 0.25*physical_memory
> for Pg should be fine.

Read my article on hardware performance tuning:

    http://www.ca.postgresql.org/docs/hw_performance

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: SHMMAX value

From
Peter Eisentraut
Date:
Thalis A. Kalfigopoulos writes:

> This was asked repeatedly the past 2 weeks. With regard to "what is a
> sane value for shmmax in the kernel?" Oracle's recommendation is to go
> for 0.5*physical_memory. So I gues that 0.25*physical_memory for Pg
> should be fine.

The only reason that I can see not to set SHMMAX to infinity is that some
joe user could lock up all your available memory.  This problem is present
for any value, but depending on how your kernel handles shared memory when
physical memory is tight it might get worse when SHMMAX is close to the
total size of physical memory.

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter