Subject: Re: Locking shared memory in RAM
To: Jaromir Dolecek <jdolecek@NetBSD.org>
From: Daniel Carosone <dan@geek.com.au>
List: tech-kern
Date: 11/07/2004 08:06:27
--VkqCAaSJIySsbD6j
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?
>=20
> 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.

--
Dan.

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iD8DBQFBjTzSEAVxvV4N66cRAnyUAJ4oVgoI1eYwpTNxI24r8kKmi5GYdACg2TSF
VzRO0aCrye++X0CsEYu89QM=
=gxUD
-----END PGP SIGNATURE-----

--VkqCAaSJIySsbD6j--