From nobody Tue Nov 08 09:28:00 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 4N62pN5VxHz4hCCb for ; Tue, 8 Nov 2022 09:28:28 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com [IPv6:2607:f8b0:4864:20::b2a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N62pN0QFdz4D9Q; Tue, 8 Nov 2022 09:28:28 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=GxCiV3A4; spf=pass (mx1.freebsd.org: domain of archimedes.gaviola@gmail.com designates 2607:f8b0:4864:20::b2a as permitted sender) smtp.mailfrom=archimedes.gaviola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-yb1-xb2a.google.com with SMTP id 131so12297919ybl.3; Tue, 08 Nov 2022 01:28:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=cwmtjd/D01Ql/7h4FF9rK557odyry5foUwGNBlgK0ko=; b=GxCiV3A41Qpqdx+lDt1n9+tRIPrgwmaDaFQwaJySrkMo28qe4MfnDLAylQKLxL19Pb L553ALot8jw83rjPT9tEyi4RcXMmf5AqZLjJ49LaPauRIx+tBDC628sltaI6ezX7nX92 O/nIqWBrziZF7V7YcZwzKn4NppcUMMVbI1ilP9q6N6esZnDhxrjw8Yc6oJ09vUTV2Spn LlPw139gaMscx1/ROVVFAWtNXJrjWCc4zb6Xc5Ml4ViiAk3WNbYpAcbNw+ddigwtm7ec kLVLqNYAG6MrN/SZjy6cVORJwtQm2xgTudS1Gghuvc9tuQR+xAB3AHEvzN0g9ImXsnVq Co4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cwmtjd/D01Ql/7h4FF9rK557odyry5foUwGNBlgK0ko=; b=Do90T+hJnUSXHj3l4RojPsi3pTyl6ZCGVnCVH6PYcksNhFoyGCI1L1thBN57fcyCzn SKD/uGW5hpCgtTRb7xqD4+dckzyKzZICFE2WR8+25lUQCUgLVDKH3jKHRh5ewspQR6xL uoV4emvHoPflnVAK7/3Q0/dzrM4IN7cpydrvA3RUZkcKtu9rQgjp+8zmVudfWBRPAK20 Oz34f9vID0gFpbmbb3GESFc8vjB0+eNgTRjrkq3jK9EIASjVSPBWlfmCVZ9alPhGMZCL Bq7Fs+ow4Dbd2qca2ietEpadSXMCdoAqf6UAb3toiTVO8G2PDZPL6ZNjDmSBh35y+f0B z+1g== X-Gm-Message-State: ACrzQf3r7wtrzYwfHW1KuxNFzozaJzdL4JGdvU0tZzfenmNKXH6GicyN G2tFP+9p+UpmPJWcu3UmOglKypROROt/41oQqFqMib0i X-Google-Smtp-Source: AMsMyM5S+5/1f3Y88gllD3PV9zZe+w2w/wG/ncoZj00OdNjPamxWsgQcrxiUyIkvjn+MT174zmI1+5AWVNY7SSHAiQ0= X-Received: by 2002:a25:fb07:0:b0:6d1:a9c:3580 with SMTP id j7-20020a25fb07000000b006d10a9c3580mr28742076ybe.191.1667899706535; Tue, 08 Nov 2022 01:28:26 -0800 (PST) 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 References: <202211071610.2A7GAcHl090048@mail.karels.net> In-Reply-To: <202211071610.2A7GAcHl090048@mail.karels.net> From: Archimedes Gaviola Date: Tue, 8 Nov 2022 17:28:00 +0800 Message-ID: Subject: Re: adding swap when expanding root filesystem To: mike@karels.net Cc: freebsd-arm@freebsd.org, jmg@freebsd.org Content-Type: multipart/alternative; boundary="00000000000087735b05ecf229a8" X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.93 / 15.00]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.99)[-0.989]; NEURAL_HAM_MEDIUM(-0.95)[-0.947]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::b2a:from]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; TAGGED_FROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; FREEMAIL_FROM(0.00)[gmail.com]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4N62pN0QFdz4D9Q X-ThisMailContainsUnwantedMimeParts: N --00000000000087735b05ecf229a8 Content-Type: text/plain; charset="UTF-8" On Tue, Nov 8, 2022 at 12:10 AM 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 > Hi Mike, That's a pleasant to have as my current scenario belongs to this concern using RPi 3B/4B as build machines. Thanks and best regards, Archimedes --00000000000087735b05ecf229a8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Nov 8, 2022 at 12:10 AM Mike = Karels <mike@karels.net> 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.=C2=A0 As the user gets no control over the disk layout when install= ing,
there is no option to add swap space on the install image.=C2=A0 I have add= ed
swap space on a USB disk, but this is often not an option.=C2=A0 It occurre= d
to me that it might be reasonable to add swap space before expanding
the root filesystem if there is sufficient space.=C2=A0 I have a prototype,=
and wondered if this is a good thing to do.=C2=A0 Granted, this will often<= br> 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.=C2=A0 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?

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Mike

Hi Mike,

That's a pleasa= nt to have as my current scenario belongs to this concern using RPi 3B/4B a= s build machines.

Thanks and best regards,
Archimedes
--00000000000087735b05ecf229a8--