From owner-freebsd-questions@freebsd.org Mon Jun 25 03:06:12 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00B201020EEE for ; Mon, 25 Jun 2018 03:06:12 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ipmail06.adl6.internode.on.net (ipmail06.adl6.internode.on.net [150.101.137.145]) by mx1.freebsd.org (Postfix) with ESMTP id 2C72E8762E for ; Mon, 25 Jun 2018 03:06:10 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ppp121-45-31-130.bras1.adl4.internode.on.net (HELO leader.local) ([121.45.31.130]) by ipmail06.adl6.internode.on.net with ESMTP; 25 Jun 2018 12:36:02 +0930 Subject: Re: Limiting ZFS ARC Size? To: Bob Willcox Cc: questions list References: <20180618162419.GA41031@rancor.immure.com> <2f30e611-acaa-b4c4-cb2e-1c9a220a1af0@mansionfamily.plus.com> <20180624121814.GS8115@rancor.immure.com> From: Shane Ambler Message-ID: Date: Mon, 25 Jun 2018 12:36:00 +0930 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180624121814.GS8115@rancor.immure.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-AU Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 03:06:12 -0000 On 24/06/2018 21:48, Bob Willcox wrote: > On Sun, Jun 24, 2018 at 09:32:41AM +0100, james wrote: >> On 18/06/2018 17:24, Bob Willcox wrote: >>> to the point where my running processes (such as firefox) start page >>> thrashing. >> >> I thought ARC was supposed to give up memory if there is memory pressure >> that causes applications to page? > > That was what I was expecting as well. However ARC had consumed most of the > memory (about 25G, 30G was wired) and firefox was paging like crazy. I did > discover what program was causing ARC to grow seeming unbounded, it was vlc. > I have something over 64k audio tracks that I had pointed vlc to with shuffle > set. It must be recursively reading all of the files in the heirarchy and zfs > is cacheing a bunch of data as it goes. Create a zfs for your a/v files, then set its caching to metadata only. ARC use - - primarycache=all | none | metadata L2ARC use - - secondarycache=all | none | metadata Also have a look at https://reviews.freebsd.org/D7538 I am finding ARC releasing much quicker/easier with this patch. -- FreeBSD - the place to B...Software Developing Shane Ambler