From owner-freebsd-current@freebsd.org Sun Sep 15 01:23:11 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E9B3AD68A7 for ; Sun, 15 Sep 2019 01:23:11 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46WBTC5666z3Dr2; Sun, 15 Sep 2019 01:23:11 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from mousie.catspoiler.org (unknown [76.212.85.177]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: truckman) by smtp.freebsd.org (Postfix) with ESMTPSA id 2C29D1C80A; Sun, 15 Sep 2019 01:23:11 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Date: Sat, 14 Sep 2019 18:23:09 -0700 (PDT) From: Don Lewis Subject: Re: spurious out of swap kills To: Mark Millard cc: FreeBSD Current In-Reply-To: <9A2342FC-D168-485A-9918-0109F9CD1646@yahoo.com> Message-ID: References: <9A2342FC-D168-485A-9918-0109F9CD1646@yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=us-ascii Content-Disposition: INLINE X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 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: Sun, 15 Sep 2019 01:23:12 -0000 On 13 Sep, Mark Millard wrote: > Don Lewis truckman at FreeBSD.org wrote on > Thu Sep 12 23:00:19 UTC 2019 : > > . . . >> Nevertheless, I see these errors, >> with rustc being the usual victim: >> >> Sep 11 23:21:43 zipper kernel: pid 16581 (rustc), jid 43, uid 65534, was killed: out of swap space >> Sep 12 02:48:23 zipper kernel: pid 1209 (rustc), jid 62, uid 65534, was killed: out of swap space > . . . > > Unfortunately, the wording of this type of message is a misnomer for > what drives the kills: it is actually driven by being unable to gain > more free memory but FreeBSD will not swap-out processes that stay > runnable (or are running), only ones that are waiting. Even a single > process that stays runnable and keeps lots of RAM in the active > category can lead to kills when swap is unused or little used. So the > kill-behavior is very workload dependent. > > Real "out of swap" conditions tend to also have messages > similar to: > > Aug 5 17:54:01 sentinel kernel: swap_pager_getswapspace(32): failed > > If you are not seeing such messages, then it is likely that > the mount of swap space still free is not the actual thing > driving the kills. > > Are you seeing "swap_pager_getswapspace(32): failed" messages? > > (It used to be that the system simply leaves the dirty pages in > memory when a swap_pager_getswapspace failed message is produced. > Of itself, it did not cause a kill. I do not know about now.) I'm only getting the "out of swap" error. Yes, it is misleading because there are still tens of GB of free swap.