From nobody Wed Nov 9 23:07:40 2022 X-Original-To: freebsd-arm@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 4N70y72ylJz4dWwL for ; Wed, 9 Nov 2022 23:08:31 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4N70xy4wPHz3H0V; Wed, 9 Nov 2022 23:08:20 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of freebsd-rwg@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd-rwg@gndrsh.dnsmgr.net; dmarc=none Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 2A9N7etK003383; Wed, 9 Nov 2022 15:07:40 -0800 (PST) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 2A9N7eDW003382; Wed, 9 Nov 2022 15:07:40 -0800 (PST) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <202211092307.2A9N7eDW003382@gndrsh.dnsmgr.net> Subject: Re: adding swap when expanding root filesystem In-Reply-To: To: Gordon Bergling Date: Wed, 9 Nov 2022 15:07:40 -0800 (PST) CC: Mike Karels , freebsd-arm@FreeBSD.org, jmg@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Spamd-Bar: - X-Spamd-Result: default: False [-1.86 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-0.76)[-0.760]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; R_SPF_NA(0.00)[no SPF record]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-arm@FreeBSD.org]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; DMARC_NA(0.00)[dnsmgr.net]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4N70xy4wPHz3H0V X-ThisMailContainsUnwantedMimeParts: N -- Start of PGP signed section. > Hi Mike, > > On Mon, Nov 07, 2022 at 10:10:38AM -0600, Mike Karels wrote: > > This question is not really arm-specific, but I couldn't think of a better > > mailing list for it. > > > > There are peridic issues reported on small systems like Raspberry Pi > > where people are running buildworld or poudriere and running out of > > memory. As the user gets no control over the disk layout when installing, > > there is no option to add swap space on the install image. I have added > > swap space on a USB disk, but this is often not an option. It occurred > > to me that it might be reasonable to add swap space before expanding > > the root filesystem if there is sufficient space. I have a prototype, > > and wondered if this is a good thing to do. Granted, this will often > > create swap on microSD, which is not optimal, but probably better than > > nothing. > > > > The current prototype creates a swap partition which is 1/10 of the disk > > if the disk is at least 15 GB and the initial root partition is no more > > than 1/3 of the disk, but only up to 1.5x of physical memory. I would > > probably enable this by default, but provide a way to disable it via a > > kenv variable and/or a variable in /etc/rc.conf. > > > > Thoughts? > > > > Mike > > That would be very welcomed addition. I personally ofter run into problems > when I try get a crash dump from my RPi4, since no dumpdev can be set > without a separate swap partion. An USB stick worked for I while, but it > just went dead at some point. +1 please. > > And the genet(4) driver doesn't support netdump(4). > > --Gordon -- End of PGP section, PGP failed! -- Rod Grimes rgrimes@freebsd.org