axe vm.max_wired [Was: Allow small amount of memory be mlock()'ed by unprivileged process?]

Konstantin Belousov kostikbel at gmail.com
Thu Jan 31 09:18:58 UTC 2013


On Wed, Jan 30, 2013 at 10:58:31PM +0200, Andriy Gapon wrote:
> on 02/06/2012 14:30 Andriy Gapon said the following:
> > o  There is also vm.max_wired sysctl (with no equivalent tunable), which
> > specifies number of _pages_ that can be wired system wide (by both kernel and
> > userland).  But note that the limit applies only to userland requests, the
> > kernel is allowed to wire new pages even when the limit is exceeded.  By default
> > the limit is set to 1/3 of available pages.
> 
> I would like to propose to axe vm.max_wired limit.
> It is not good when too many pages are wired, but...
> 
> This limit is quite arbitrary (why 1/3).
> It's no good for ZFS systems where e.g. 90% of memory can be normally wired by
> ZFS in kernel.
> 
> So this limit should be either axed or perhaps replaced with some much higher
> limit like e.g. v_page_count - 2 * v_free_target or some such number "close" to
> v_page_count.
> 

I dislike your proposal.

The limit is useful to prevent the system from entering live-lock.
ZFS-using machines should be tuned. Or finally the ZFS caches should
communicate the fact that the pages used are for caches and provide
easy way for the VM to request flush. This would be big project indeed.

E.g., could ZFS make an impression that zfs-cached pages are cached, to VM ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20130131/59d82f7a/attachment.sig>


More information about the freebsd-arch mailing list