Re: FreeBSD 5.2.1, postgresql 7.4.5 and shared memory settings

From: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
To: Rick Apichairuk <rapichai(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: FreeBSD 5.2.1, postgresql 7.4.5 and shared memory settings
Date: 2005-01-30 21:50:29
Message-ID: 20050130215029.GP64304@decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

On Sun, Jan 30, 2005 at 04:26:29PM -0500, Rick Apichairuk wrote:
> Is the shared_buffers per process? The reason I ask is the formula
> given on http://www.postgresql.org/docs/7.4/static/kernel-resources.html
> for calculating how much SHMMAX you need is:
>
> SHMMAX = 250 kB + 8.2 kB * shared_buffers + 14.2 kB * max_connections
> up to infinity

No, it is system-wide. shared_buffers is used for a number of things,
but any excess is used by PostgreSQL to buffer data it reads. Before 8.0
the consensus was that (unlike most databases) it's better to let the OS
cache the data instead of PostgreSQL. 8.0 has a much more advanced cache
management algorithm, so it might now be better to let PostgreSQL be
your primary cache, but AFAIK no testing has been done to show that's
the case.
--
Jim C. Nasby, Database Consultant decibel(at)decibel(dot)org
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Chris 2005-01-30 21:55:35 Re: FreeBSD 5.2.1, postgresql 7.4.5 and shared memory settings
Previous Message Rick Apichairuk 2005-01-30 21:26:29 Re: FreeBSD 5.2.1, postgresql 7.4.5 and shared memory settings

Browse pgsql-general by date

  From Date Subject
Next Message Chris 2005-01-30 21:55:35 Re: FreeBSD 5.2.1, postgresql 7.4.5 and shared memory settings
Previous Message Marc G. Fournier 2005-01-30 21:49:54 Re: [GENERAL] MySQL worm attacks Windows servers