Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Jan 2013 11:18:53 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Andriy Gapon <avg@FreeBSD.org>
Cc:        freebsd-arch@FreeBSD.org
Subject:   Re: axe vm.max_wired [Was: Allow small amount of memory be mlock()'ed by unprivileged process?]
Message-ID:  <20130131091853.GI2522@kib.kiev.ua>
In-Reply-To: <51098977.4000603@FreeBSD.org>
References:  <861umkurt8.fsf@ds4.des.no> <CAJ-VmokY%2Bpgcq999NHShbq-3rK3=oeWT2WY7NmTvVdXOHZJhdg@mail.gmail.com> <CAF6rxgmDW21aPJ5Mp6Tbk1z02ivw4UPhSaNEX%2BWiu7O0v13skA@mail.gmail.com> <20120517055425.GA802@infradead.org> <4FC762DD.90101@FreeBSD.org> <4FC81D9C.2080801@FreeBSD.org> <4FC8E29F.2010806@shatow.net> <4FC95A10.7000806@freebsd.org> <4FC9F94B.8060708@FreeBSD.org> <51098977.4000603@FreeBSD.org>

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

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

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 kern=
el 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.  B=
y default
> > the limit is set to 1/3 of available pages.
>=20
> I would like to propose to axe vm.max_wired limit.
> It is not good when too many pages are wired, but...
>=20
> This limit is quite arbitrary (why 1/3).
> It's no good for ZFS systems where e.g. 90% of memory can be normally wir=
ed by
> ZFS in kernel.
>=20
> So this limit should be either axed or perhaps replaced with some much hi=
gher
> limit like e.g. v_page_count - 2 * v_free_target or some such number "clo=
se" to
> v_page_count.
>=20

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 ?

--puRvKymbJtNrbugC
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iQIcBAEBAgAGBQJRCjb9AAoJEJDCuSvBvK1BcREP/A+ujR05ARhoSg+ogHAQmi1X
EZl/OngRKYd3SW/WeJV9eCFyPWDVIpnBm+nV4MBn8yVSUM2JCUb5DfPKQoAUUR/6
BV68ruyJrY05sgdbV4LpBHvvp5mT3D3W+eVzsKDad6QNIaCrrHXxrwtUR2G6GlHz
n2WXi9h3qQpcCzhicUUNeBs8cjyWp3I8Nz4n52s8d2A1k8ndmtgs6x3bz+Gw7QrI
S1xiwEnnKdCUQohKCegjBIyKNDBPWqNEPvPjULoidTBKwlo1uS/91gwSCyCYBN6i
KYO3pDfxCU20whMNeVnDdoJ/CN597zZRl7kZIDOPq05kcgOJzrkdC7KpGt0iJ4KK
o2q3srY+cPkBL/l5OzqlWhgit1Uc324GhRCPjskhz03S4NsI25I/YMVkzJ+KaxyH
BYqJj1ItZcQDJgNEbmI80NiYr0kaJzdltgPiSvlIHBKsLWnCBCYrHQV9Mi8/MsEG
uBcVFZWB2NU3RkNv16n7wxxtbsZWDzcW6mThTwHhgZ2QPqL7GnJRDlwcgLwZpznL
QOR1PcppPXUhfsLQxXHAeHvlNl2M3e4s93W0xMyhSN00I5eEEfPNIrW9x0Gss8II
C6Aq1D42IvjQH1NmvRwNzEz3CKqrqUlijoisIiyHsl5+Mt/YQGCX9PEQvELlpS9X
gRDu8rDZNGc3PiVRhcxM
=AqzY
-----END PGP SIGNATURE-----

--puRvKymbJtNrbugC--



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