From nobody Tue Apr 19 06:52:00 2022 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3342811E709D for ; Tue, 19 Apr 2022 06:52:12 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: from puchar.net (puchar.net [194.1.144.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4KjDxk3DBSz3mgK for ; Tue, 19 Apr 2022 06:52:10 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: Received: from 127.0.0.1 (localhost [127.0.0.1]) by puchar.net (8.15.2/8.16.1) with ESMTPS id 23J6q1iM095295 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 19 Apr 2022 08:52:01 +0200 (CEST) (envelope-from wojtek@puchar.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=puchar.net; s=default; t=1650351121; bh=rVWs1OCyddY/PvEFNdvHXfugZn5ov5YON0XCfeP1kC4=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=UI1iFCgl4fbSl/XT4Z7aXclh9kJHWBPAZkEIfaMN0Bvo3pBz7rXoqU21vxyMmcWOW Q67iqCG4B86RE5V/goM/sx43hxJ8C5ipiLDXY493/h2iXe1hd2GuiTDwtKFN4NBZqB 1l2G0x2OqqzM/eqgS7WJpUaocp+q+2oyavYSYLJc= Received: from wojtek.intra (localhost [127.0.0.1]) by wojtek.intra (8.16.1/8.16.1) with ESMTP id 23J6q0bA050828; Tue, 19 Apr 2022 08:52:00 +0200 (CEST) (envelope-from wojtek@puchar.net) Received: from localhost (wojtek@localhost) by wojtek.intra (8.16.1/8.16.1/Submit) with ESMTP id 23J6q0B9050825; Tue, 19 Apr 2022 08:52:00 +0200 (CEST) (envelope-from wojtek@puchar.net) X-Authentication-Warning: wojtek.intra: wojtek owned process doing -bs Date: Tue, 19 Apr 2022 08:52:00 +0200 (CEST) From: Wojciech Puchar To: Michael Wayne cc: FreeBSD Hackers Subject: Re: Can not build kernel on 1GB VM In-Reply-To: <20220415174953.GE13678@post.wayne47.com> Message-ID: <5db061cf-1e23-7cfb-fea-4573f379ae5d@puchar.net> References: <20220415174953.GE13678@post.wayne47.com> List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Rspamd-Queue-Id: 4KjDxk3DBSz3mgK X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=puchar.net header.s=default header.b=UI1iFCgl; dmarc=none; spf=pass (mx1.freebsd.org: domain of wojtek@puchar.net designates 194.1.144.90 as permitted sender) smtp.mailfrom=wojtek@puchar.net X-Spamd-Result: default: False [-3.50 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[puchar.net:s=default]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; DMARC_NA(0.00)[puchar.net]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[puchar.net:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-hackers]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:43476, ipnet:194.1.144.0/24, country:PL]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N try sysctl -w vm.overcommit=1 On Fri, 15 Apr 2022, Michael Wayne wrote: > I have a VM with 1GB RAM running FreeBSD 12.1-RELEASE-p3 > > I'm trying to upgrade the machine to 12.3 and having swap failures. > > This machine runs bird to advertise BGP, ssh and not much else so > the small amount of RAM is (usually) fine. > > For a long time, there was a 1 GB swap file which handled the > occasional time when excess memory got used. > > Machine needs a custom kernel for BGP, the conf file consists of: > include GENERIC > ident ROUTING > options TCP_SIGNATURE > > > Today, while building the 12.3 kernel with: > cd /usr/src > sudo make toolchain > sudo make buildkernel KERNCONF=ROUTING > the machine ran out of swap. with a bunch of messages like: > Apr 15 12:11:26 g1 kernel: swap_pager: indefinite wait buffer: bufobj: 0, blkno: 240593, size: 4096 > Apr 15 12:11:35 g1 kernel: swap_pager: indefinite wait buffer: bufobj: 0, blkno: 236224, size: 16384 > Apr 15 12:11:37 g1 kernel: swap_pager: indefinite wait buffer: bufobj: 0, blkno: 245, size: 12288 > Apr 15 12:11:46 g1 kernel: swap_pager: indefinite wait buffer: bufobj: 0, blkno: 240593, size: 4096 > Apr 15 12:11:55 g1 kernel: swap_pager: indefinite wait buffer: bufobj: 0, blkno: 236224, size: 16384 > Apr 15 12:11:57 g1 kernel: swap_pager: indefinite wait buffer: bufobj: 0, blkno: 245, size: 12288 > > Thinking it was a sawp space issue, I increased the swap to 4 GB and > tried again with the same results. Boot gave the kern.maxswzone message, > I ignored it as I had planned to change as soon as I completed the build. > > So I pulled up top in a console window and watched swap during the > build. About 400 MB of RAM was free and about 3 MB of swap was > used when the machine started linking the kernel: > ctfmerge -L VERSION -g -o kernel.full ... > While this command was running, I saw swap usage go to ~5MB (so > just over 1%), then started seeing processes being killed due to > out of swap space. > > So, how to proceed? > >