Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Aug 2022 19:07:33 +0100
From:      Nuno Teixeira <eduardo@freebsd.org>
To:        Mark Millard <marklmi@yahoo.com>
Cc:        FreeBSD Mailing List <freebsd-ports@freebsd.org>
Subject:   Re: Resolved: devel/llvm13 build: "ninja: build stopped: subcommand failed"
Message-ID:  <CAFDf7U%2BDbO0KFKnS4sx4AiXTsS_CPbKFyPTT-B0o1oZS9rWYAg@mail.gmail.com>
In-Reply-To: <3E3F8980-8214-45E9-9530-D78243A29D41@yahoo.com>
References:  <1D4C14BD-8955-4B86-9C99-3E58D7603122.ref@yahoo.com> <1D4C14BD-8955-4B86-9C99-3E58D7603122@yahoo.com> <CAFDf7UK-pAFXCrZZA9veASaa-wf9HKMdX52fxmcmDgRFiNOF7A@mail.gmail.com> <7CDC63F3-8B68-420E-8012-B1692667E293@yahoo.com> <CAFDf7UJmBNvfVo3SAenPUk1WkFgvpkqoM6=Riv6pwaovuNnAWg@mail.gmail.com> <21FC1F5E-240E-4A8C-A5D2-6B73494026C0@yahoo.com> <CAFDf7ULAPa-YcYezUDCAVP-cMijYLMpLM10z7Xom%2B1siXvn42g@mail.gmail.com> <3E3F8980-8214-45E9-9530-D78243A29D41@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000059ca1a05e6376417
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I will follow https://docs.freebsd.org/en/books/handbook/book/#disks-growin=
g
and resize actual swap, but before that I will have to make sure that
backups are ok in case of something goes wrong.

I've tooked a note about total swap <=3D60GB

Thanks

Mark Millard <marklmi@yahoo.com> escreveu no dia domingo, 14/08/2022 =C3=A0=
(s)
18:46:

> > On 2022-Aug-14, at 10:31, Nuno Teixeira <eduardo@freebsd.org> wrote:
> >
> > Ok, I will avoid a swap file.
> >
> > My actual config shows:
> > `swapinfo`:
> > ---
> > Device          1K-blocks     Used    Avail Capacity
> > /dev/nvd0p2       4194304     6036  4188268     0%
> > ---
> > and `cat /etc/fstab`:
> > ---
> > # Device                Mountpoint      FStype  Options         Dump
> Pass#
> > /dev/nvd0p1             /boot/efi       msdosfs rw              2      =
 2
> > /dev/nvd0p2             none    swap    sw              0       0
> > ---
> >
> > Any clues how do I do this?
>
> You can have more than one swap partition active, such that
> the total is the size that you want. (I do this to have
> various freebsd-swap partition sizes available for media
> that can be used to boot multiple systems with widely
> varying amounts of RAM: sometimes having, say, 3 partitions
> in use to get a desired total, for example.)
>
> So you could even plug in a new device and create a
> freebsd-swap type partition on it to add, say, 56 GiBytes
> of SWAP to what you already have.
>
> I've no clue about your other media that you might be
> able to use, partitioning on media, etc. and so can not
> be very specific for your context.
>
> > Mark Millard <marklmi@yahoo.com> escreveu no dia domingo, 14/08/2022
> =C3=A0(s) 18:21:
> > On 2022-Aug-14, at 10:15, Nuno Teixeira <eduardo@freebsd.org> wrote:
> >
> > > I use ZFS.
> > >
> > > I will follow your recomendations and use a swap of 64GB and then tes=
t
> it again.
>
> Note that I recommended up to 60 GB total SWAP, not 64 GB total
> SWAP. 64 GB total would produce warnings about potential
> mistuning for a 16 GiByte RAM machine. I avoid such
> configurations.
>
> > > In the meanwhile I will take a look at freebsd docs to see how do I
> increase swap, by adding a new swap file or resize actual one if possible=
.
> >
> > I recommend never using a swap file, only swap partition(s), in order
> > to avoid deadlocks and such:
> >
> > On 2017-Feb-13, at 7:20 PM, Konstantin Belousov <kostikbel at gmail.com=
>
> wrote
> > on the freebsd-arm list:
> >
> > . . .
> >
> > swapfile write requires the write request to come through the filesyste=
m
> > write path, which might require the filesystem to allocate more memory
> > and read some data. E.g. it is known that any ZFS write request
> > allocates memory, and that write request on large UFS file might requir=
e
> > allocating and reading an indirect block buffer to find the block numbe=
r
> > of the written block, if the indirect block was not yet read.
> >
> > As result, swapfile swapping is more prone to the trivial and unavoidab=
le
> > deadlocks where the pagedaemon thread, which produces free memory, need=
s
> > more free memory to make a progress.  Swap write on the raw partition
> over
> > simple partitioning scheme directly over HBA are usually safe, while e.=
g.
> > zfs over geli over umass is the worst construction.
> >
>
>
>
> =3D=3D=3D
> Mark Millard
> marklmi at yahoo.com
>
>

--=20
Nuno Teixeira
FreeBSD Committer (ports)

--00000000000059ca1a05e6376417
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>I will follow <a href=3D"https://docs.freebsd.org/en/=
books/handbook/book/#disks-growing">https://docs.freebsd.org/en/books/handb=
ook/book/#disks-growing</a> and resize actual swap, but before that I will =
have to make sure that backups are ok in case of something goes wrong.</div=
><div><br></div><div>I&#39;ve tooked a note about total swap &lt;=3D60GB</d=
iv><div><br></div><div>Thanks<br></div></div><br><div class=3D"gmail_quote"=
><div dir=3D"ltr" class=3D"gmail_attr">Mark Millard &lt;<a href=3D"mailto:m=
arklmi@yahoo.com">marklmi@yahoo.com</a>&gt; escreveu no dia domingo, 14/08/=
2022 =C3=A0(s) 18:46:<br></div><blockquote class=3D"gmail_quote" style=3D"m=
argin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left=
:1ex">&gt; On 2022-Aug-14, at 10:31, Nuno Teixeira &lt;<a href=3D"mailto:ed=
uardo@freebsd.org" target=3D"_blank">eduardo@freebsd.org</a>&gt; wrote:<br>
&gt; <br>
&gt; Ok, I will avoid a swap file.<br>
&gt; <br>
&gt; My actual config shows:<br>
&gt; `swapinfo`:<br>
&gt; ---<br>
&gt; Device=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1K-blocks=C2=A0 =C2=A0 =C2=A0=
Used=C2=A0 =C2=A0 Avail Capacity<br>
&gt; /dev/nvd0p2=C2=A0 =C2=A0 =C2=A0 =C2=A04194304=C2=A0 =C2=A0 =C2=A06036=
=C2=A0 4188268=C2=A0 =C2=A0 =C2=A00%<br>
&gt; ---<br>
&gt; and `cat /etc/fstab`:<br>
&gt; ---<br>
&gt; # Device=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Mountp=
oint=C2=A0 =C2=A0 =C2=A0 FStype=C2=A0 Options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0Dump=C2=A0 =C2=A0 Pass#<br>
&gt; /dev/nvd0p1=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/boot/efi=
=C2=A0 =C2=A0 =C2=A0 =C2=A0msdosfs rw=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 2=C2=A0 =C2=A0 =C2=A0 =C2=A02<br>
&gt; /dev/nvd0p2=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0none=C2=A0 =
=C2=A0 swap=C2=A0 =C2=A0 sw=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 0=C2=A0 =C2=A0 =C2=A0 =C2=A00<br>
&gt; ---<br>
&gt; <br>
&gt; Any clues how do I do this?<br>
<br>
You can have more than one swap partition active, such that<br>
the total is the size that you want. (I do this to have<br>
various freebsd-swap partition sizes available for media<br>
that can be used to boot multiple systems with widely<br>
varying amounts of RAM: sometimes having, say, 3 partitions<br>
in use to get a desired total, for example.)<br>
<br>
So you could even plug in a new device and create a<br>
freebsd-swap type partition on it to add, say, 56 GiBytes<br>
of SWAP to what you already have.<br>
<br>
I&#39;ve no clue about your other media that you might be<br>
able to use, partitioning on media, etc. and so can not<br>
be very specific for your context.<br>
<br>
&gt; Mark Millard &lt;<a href=3D"mailto:marklmi@yahoo.com" target=3D"_blank=
">marklmi@yahoo.com</a>&gt; escreveu no dia domingo, 14/08/2022 =C3=A0(s) 1=
8:21:<br>
&gt; On 2022-Aug-14, at 10:15, Nuno Teixeira &lt;<a href=3D"mailto:eduardo@=
freebsd.org" target=3D"_blank">eduardo@freebsd.org</a>&gt; wrote:<br>
&gt; <br>
&gt; &gt; I use ZFS.<br>
&gt; &gt; <br>
&gt; &gt; I will follow your recomendations and use a swap of 64GB and then=
 test it again.<br>
<br>
Note that I recommended up to 60 GB total SWAP, not 64 GB total<br>
SWAP. 64 GB total would produce warnings about potential<br>
mistuning for a 16 GiByte RAM machine. I avoid such<br>
configurations.<br>
<br>
&gt; &gt; In the meanwhile I will take a look at freebsd docs to see how do=
 I increase swap, by adding a new swap file or resize actual one if possibl=
e.<br>
&gt; <br>
&gt; I recommend never using a swap file, only swap partition(s), in order<=
br>
&gt; to avoid deadlocks and such:<br>
&gt; <br>
&gt; On 2017-Feb-13, at 7:20 PM, Konstantin Belousov &lt;kostikbel at <a hr=
ef=3D"http://gmail.com" rel=3D"noreferrer" target=3D"_blank">gmail.com</a>&=
gt; wrote<br>
&gt; on the freebsd-arm list:<br>
&gt; <br>
&gt; . . .<br>
&gt; <br>
&gt; swapfile write requires the write request to come through the filesyst=
em<br>
&gt; write path, which might require the filesystem to allocate more memory=
<br>
&gt; and read some data. E.g. it is known that any ZFS write request<br>
&gt; allocates memory, and that write request on large UFS file might requi=
re<br>
&gt; allocating and reading an indirect block buffer to find the block numb=
er<br>
&gt; of the written block, if the indirect block was not yet read.<br>
&gt; <br>
&gt; As result, swapfile swapping is more prone to the trivial and unavoida=
ble<br>
&gt; deadlocks where the pagedaemon thread, which produces free memory, nee=
ds<br>
&gt; more free memory to make a progress.=C2=A0 Swap write on the raw parti=
tion over<br>
&gt; simple partitioning scheme directly over HBA are usually safe, while e=
.g.<br>
&gt; zfs over geli over umass is the worst construction.<br>
&gt; <br>
<br>
<br>
<br>
=3D=3D=3D<br>
Mark Millard<br>
marklmi at <a href=3D"http://yahoo.com" rel=3D"noreferrer" target=3D"_blank=
">yahoo.com</a><br>
<br>
</blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D"ltr" class=3D"g=
mail_signature"><div dir=3D"ltr"><span style=3D"color:rgb(102,102,102)">Nun=
o Teixeira<br>FreeBSD Committer (ports)</span></div></div>

--00000000000059ca1a05e6376417--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7U%2BDbO0KFKnS4sx4AiXTsS_CPbKFyPTT-B0o1oZS9rWYAg>