Subject: Re: Locking shared memory in RAM
To: Jaromir Dolecek <>
From: Daniel Carosone <>
List: tech-kern
Date: 11/07/2004 08:06:27
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Nov 06, 2004 at 09:32:59PM +0100, Jaromir Dolecek wrote:
> D'Arcy J.M. Cain wrote:
> > The PostgreSQL performance tuning page says this:
> >=20
> > "You might also want to configure your kernel to lock shared memory into
> > RAM and prevent it from being paged out to swap. Use the sysctl setting
> > kern.ipc.shm_use_phys."
> >=20
> > This value doesn't appear in NetBSD and I can't find anything that looks
> > like it does the same thing.  Does NetBSD have some sort of control for
> > locking shared memory (SYSV) into RAM?
> No, AFAIK.=20

Not a sysctl or similar, but you should be able to mlock() the
address-range of the SHM segment, I guess.

In any case, making such a knob global seems a bit to coarse.


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.6 (NetBSD)