svn commit: r326619 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Andriy Gapon avg at FreeBSD.org
Tue Dec 19 12:57:28 UTC 2017


On 13/12/2017 20:52, Peter Jeremy wrote:
> On 2017-Dec-06 10:01:02 +0000, Baptiste Daroussin <bapt at 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


More information about the svn-src-all mailing list