From owner-freebsd-current@freebsd.org Fri Sep 28 05:03:00 2018 Return-Path: Delivered-To: freebsd-current@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 A2B5E10A4B4A for ; Fri, 28 Sep 2018 05:03:00 +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 DA352851DE for ; Fri, 28 Sep 2018 05:02:59 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from unknown (HELO leader.local) ([118.211.106.138]) by ipmail06.adl6.internode.on.net with ESMTP; 28 Sep 2018 14:32:50 +0930 Subject: Re: 12.0-ALPHA5 - ZFS default ARC max apparently forcing system to run out of memory To: Rebecca Cran , FreeBSD Current References: From: Shane Ambler Message-ID: <98b09476-ccd3-7449-0a52-3b0069b435b9@ShaneWare.Biz> Date: Fri, 28 Sep 2018 14:32:44 +0930 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-AU Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Sep 2018 05:03:00 -0000 On 28/9/18 7:31 am, Rebecca Cran wrote: > I'm running 12.0-ALPHA5 on a laptop which has 32GB RAM and 2GB swap. > I've found it running out of memory when building ports via synth: I > think I've also seen it when running a buildworld. Johannes on > FreeBSDDesktop suggested it might be related to ZFS, and setting > vfs.zfs.arc_max to 8GB *does* appear to have resolved the problem. > > > Shortly after running out of memory (with |"swap_pager_getswapspace(32): > failed" messages)|, the first few lines of 'top' were: I believe the default arc settings are wrong, arc_max defaults to 1G less than ram, with arc being wired this collides with other ram that may be wired, by default the kernel is allowed to wire 30% of ram which is in addition of any arc allocation. So arc should remain less than 70% of ram. I submitted bug 229764 with this. Also consider any bhyve usage, the -S option will wire guest ram, which one of the bhyve tools enables as default. -- FreeBSD - the place to B...Software Developing Shane Ambler