Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 May 2003 15:39:58 -0400
From:      Michael Edenfield <kutulu@kutulu.org>
To:        peter.edwards@openet-telecom.com
Cc:        current@freebsd.org
Subject:   Re: vm_page_max_wired and gpg...
Message-ID:  <20030514193958.GA12881@basement.kutulu.org>
In-Reply-To: <3E82B245000009F1@mail.openet-telecom.com>
References:  <20030513182738.GA17766@basement.kutulu.org> <3E82B245000009F1@mail.openet-telecom.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--2oS5YaxWCcQjTEyO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* peter.edwards@openet-telecom.com <peter.edwards@openet-telecom.com> [0305=
14 15:23]:

> >For some time now, gpg has been having issues on my -CURRENT system=20
> >with being unable to mlock() the ~8k buffer it uses to hold the=20
> >decrypted secret key.  A ktrace shows that it's being returned an=20
> >EAGAIN from mlock(), which my peeking around has shown could be:
> >
> >1) I hit the RLIMIT_MLOCK limit on memory locking, or
> >2) I hit the system-wide "wired pages" limit.

> The kernel has a "max wired pages" limit, that's set when the swapper
> starts up to be one third of physical memory. You can see this in
> src/sys/vm_pageout.c, on about line 1414:
>=20
> > if (vm_page_max_wired =3D=3D 0)
> > 	vm_page_max_wired =3D cnt.v_free_count / 3;
>=20
> This is pretty much a third of what you see at boot time (and in
> /var/log/messages or dmesg) for "avail memory =3D "

Duh, I looked right at this code and somehow it didn't hit me.  It=20
makes sense, I've got roughly 22M out of 64M wired at any given time,=20
which is right at the 1/3 limit.  Now it's just a matter of finding=20
out what else I'm running that's locking down pages and stop it.

--Mike


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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQE+wpuNCczNhKRsh48RApcEAKCeFdb2O5hUl8R8L3Wnyh9QuhBwRgCaAlFU
GWKQbENzP/NZjKElOzQxEHc=
=EdNC
-----END PGP SIGNATURE-----

--2oS5YaxWCcQjTEyO--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030514193958.GA12881>