From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 10:30:22 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19B41FBF; Mon, 20 Jan 2014 10:30:22 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id AEA0A191C; Mon, 20 Jan 2014 10:30:20 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA04353; Mon, 20 Jan 2014 12:30:18 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1W5C7V-000Cop-SJ; Mon, 20 Jan 2014 12:30:17 +0200 Message-ID: <52DCFA81.9070307@FreeBSD.org> Date: Mon, 20 Jan 2014 12:29:21 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Jeff Roberson , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r254544 - head/sys/vm References: <201308192354.r7JNsPD1007503@svn.freebsd.org> In-Reply-To: <201308192354.r7JNsPD1007503@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2014 10:30:22 -0000 on 20/08/2013 02:54 Jeff Roberson said the following: > Author: jeff > Date: Mon Aug 19 23:54:24 2013 > New Revision: 254544 > URL: http://svnweb.freebsd.org/changeset/base/254544 > > Log: > - Increase the active lru refresh interval to 10 minutes. This has been > shown to negatively impact some workloads and the goal is only to > eliminate worst case behaviors for very long periods of paging > inactivity. Eventually we should determine a more complex scaling > factor for this feature. > - Rate limit low memory callback handlers to limit thrashing. Set the > default to 10 seconds. I wonder if an impact of this rate limiting change on ZFS ARC behavior has been evaluated... > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/sys/vm/vm_pageout.c > > Modified: head/sys/vm/vm_pageout.c > ============================================================================== > --- head/sys/vm/vm_pageout.c Mon Aug 19 23:02:39 2013 (r254543) > +++ head/sys/vm/vm_pageout.c Mon Aug 19 23:54:24 2013 (r254544) > @@ -159,6 +159,8 @@ static int vm_max_launder = 32; > static int vm_pageout_update_period; > static int defer_swap_pageouts; > static int disable_swap_pageouts; > +static int lowmem_period = 10; > +static int lowmem_ticks; > > #if defined(NO_SWAPPING) > static int vm_swap_enabled = 0; > @@ -179,6 +181,9 @@ SYSCTL_INT(_vm, OID_AUTO, pageout_update > CTLFLAG_RW, &vm_pageout_update_period, 0, > "Maximum active LRU update period"); > > +SYSCTL_INT(_vm, OID_AUTO, lowmem_period, CTLFLAG_RW, &lowmem_period, 0, > + "Low memory callback period"); > + > #if defined(NO_SWAPPING) > SYSCTL_INT(_vm, VM_SWAPPING_ENABLED, swap_enabled, > CTLFLAG_RD, &vm_swap_enabled, 0, "Enable entire process swapout"); > @@ -901,9 +906,10 @@ vm_pageout_scan(struct vm_domain *vmd, i > > /* > * If we need to reclaim memory ask kernel caches to return > - * some. > + * some. We rate limit to avoid thrashing. > */ > - if (pass > 0) { > + if (vmd == &vm_dom[0] && pass > 0 && > + lowmem_ticks + (lowmem_period * hz) < ticks) { > /* > * Decrease registered cache sizes. > */ > @@ -913,6 +919,7 @@ vm_pageout_scan(struct vm_domain *vmd, i > * drained above. > */ > uma_reclaim(); > + lowmem_ticks = ticks; > } > > /* > @@ -1680,10 +1687,11 @@ vm_pageout(void) > > /* > * Set interval in seconds for active scan. We want to visit each > - * page at least once a minute. > + * page at least once every ten minutes. This is to prevent worst > + * case paging behaviors with stale active LRU. > */ > if (vm_pageout_update_period == 0) > - vm_pageout_update_period = 60; > + vm_pageout_update_period = 600; > > /* XXX does not really belong here */ > if (vm_page_max_wired == 0) > -- Andriy Gapon