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

[-- Attachment #1 --]
* peter.edwards@openet-telecom.com <peter.edwards@openet-telecom.com> [030514 15:23]:

> >For some time now, gpg has been having issues on my -CURRENT system 
> >with being unable to mlock() the ~8k buffer it uses to hold the 
> >decrypted secret key.  A ktrace shows that it's being returned an 
> >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:
> 
> > if (vm_page_max_wired == 0)
> > 	vm_page_max_wired = cnt.v_free_count / 3;
> 
> This is pretty much a third of what you see at boot time (and in
> /var/log/messages or dmesg) for "avail memory = "

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

--Mike


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

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

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