Date: Tue, 19 Dec 2017 14:50:57 +0200 From: Andriy Gapon <avg@FreeBSD.org> To: Peter Jeremy <peter@rulingia.com> Cc: Baptiste Daroussin <bapt@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r326619 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <a5f9f5df-11e9-cf1e-e599-3a93e2866c50@FreeBSD.org> In-Reply-To: <20171213185214.GA12026@server.rulingia.com> References: <201712061001.vB6A12Ot032201@repo.freebsd.org> <20171213185214.GA12026@server.rulingia.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 13/12/2017 20:52, Peter Jeremy wrote: > On 2017-Dec-06 10:01:02 +0000, Baptiste Daroussin <bapt@FreeBSD.org> wrote: >> Author: bapt >> Date: Wed Dec 6 10:01:02 2017 >> New Revision: 326619 >> URL: https://svnweb.freebsd.org/changeset/base/326619 >> >> Log: >> MFC r325851: >> >> remove the poor emulation of the IllumOS needfree global variable to prevent >> the ARC reclaim thread running longer than needed. >> > > This change appears to break the backpressure mechanism that forces > ARC to release wired memory. Running FreeBSD/amd64 r326743, I found > that my system was thrashing badly with almost all memory (~31GB out > of 32GB) wired (including 19GB ARC, 7GB VBox guests). Running a tool > that just allocates and dirties a large amount of memory had no effect > on the ARC size. Reverting this change only restores normal behaviour > where ARC will shrink under pressure. > > My ZFS boot tunables are: > vfs.zfs.arc_max="24G" > vfs.zfs.arc_meta_limit="12G" > Peter, could you please try to monitor 'arc-needfree' DTrace probe during periods when you are trying to put a pressure on the memory? The probe's argument (signed) tells the ARC's idea of the memory availability / shortage. bapt wrote: >> @@ -6310,9 +6294,7 @@ arc_lowmem(void *arg __unused, int howto __unused) >> { >> >> mutex_enter(&arc_reclaim_lock); >> - /* XXX: Memory deficit should be passed as argument. */ >> - needfree = btoc(arc_c >> arc_shrink_shift); >> - DTRACE_PROBE(arc__needfree); >> + DTRACE_PROBE1(arc__needfree, int64_t, ((int64_t)freemem - zfs_arc_free_target) * PAGESIZE); >> cv_signal(&arc_reclaim_thread_cv); >> >> /* -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a5f9f5df-11e9-cf1e-e599-3a93e2866c50>