svn commit: r229663 -
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Martin Matuska
mm at FreeBSD.org
Sat Feb 25 09:56:26 UTC 2012
As of our current code arc_meta_limit is not enforced at all, because
dnlc_reduce_cache() does nothing.
This way the meta cache usually outgrows its limit which should be 1/4
of arc by default.
Users in mailinglists report performance penalties due to this problem.
We could learn from Brian Behlendorf's zfsonlinux and implement
something similiar.
In his first attempt:
https://github.com/behlendorf/zfs/commit/6a8f9b6bf0de3e3d09fcfa32e129c978e7641a8f
He added a arc_kmem_reap_now() if metadata is outside the arc_meta_limit.
Then he introduced arc_adjust_meta() which looks promising, we might be
interested in doing something like that:
https://github.com/behlendorf/zfs/commit/ab26409db753bb087842ab6f1af943f3386c764f#L53R2004
On 5.1.2012 23:16, Pawel Jakub Dawidek wrote:
> Author: pjd
> Date: Thu Jan 5 22:16:41 2012
> New Revision: 229663
> URL: http://svn.freebsd.org/changeset/base/229663
>
> Log:
> - Allow to change vfs.zfs.arc_meta_limit at runtime.
> - Change vfs.zfs.arc_meta_used from CTLFLAG_RDTUN to CTLFLAG_RD, as it is
> not a tunable.
>
> MFC after: 3 days
>
> Modified:
> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
>
> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
> ==============================================================================
> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Jan 5 22:14:49 2012 (r229662)
> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Jan 5 22:16:41 2012 (r229663)
> @@ -464,10 +464,10 @@ static uint64_t arc_loaned_bytes;
> static uint64_t arc_meta_used;
> static uint64_t arc_meta_limit;
> static uint64_t arc_meta_max = 0;
> -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_used, CTLFLAG_RDTUN,
> - &arc_meta_used, 0, "ARC metadata used");
> -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_limit, CTLFLAG_RDTUN,
> - &arc_meta_limit, 0, "ARC metadata limit");
> +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_used, CTLFLAG_RD, &arc_meta_used, 0,
> + "ARC metadata used");
> +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_limit, CTLFLAG_RW, &arc_meta_limit, 0,
> + "ARC metadata limit");
>
> typedef struct l2arc_buf_hdr l2arc_buf_hdr_t;
>
--
Martin Matuska
FreeBSD committer
http://blog.vx.sk
More information about the zfs-devel
mailing list