Tuning for PostGreSQL Database

Tom Samplonius tom at sdf.com
Fri Jul 25 23:48:39 PDT 2003

On Fri, 25 Jul 2003, Terry Lambert wrote:

> Christopher Weimann wrote:
> > So I have conflicting documentation.
> > 
> > I have machine with 4Gig of ram.  What is the maximum
> > value of SHMMAX on FreeBSD?
> Ideally, you would use memory mapped files for this, and not System V
> shared memory, so that the OS could implement swapping policies as it
> saw fit, and could actually swap the data, if nevcessary, instead of
> it sucking up huge amounts of wired memory.

  PostgreSQL is from the good old days of RDMSes when the they would
System V shared memory for everything, and store databases on raw devices
in an effort to utilize as little of the OS as possible, in effort to be
fast and reliable.

  But it does give PostgreSQL the advantage of working with large tables
and databases.  Mmapping a file over 4GB in size would likely exhaust the
VM on a x86.  Or, is it possible to map 4+GB with PAE?

> In any case, POSIX deprecated SysV shared memory years ago, and
> recommends that all code utilize shm_open instead, these days, if
> you insist on using an interface that sucks up huge amounts of
> wired pages and KVA space.
> -- Terry


More information about the freebsd-performance mailing list