Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Aug 2022 10:45:54 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        Nuno Teixeira <eduardo@freebsd.org>
Cc:        FreeBSD Mailing List <freebsd-ports@freebsd.org>
Subject:   Re: Resolved: devel/llvm13 build: "ninja: build stopped: subcommand failed"
Message-ID:  <3E3F8980-8214-45E9-9530-D78243A29D41@yahoo.com>
In-Reply-To: <CAFDf7ULAPa-YcYezUDCAVP-cMijYLMpLM10z7Xom%2B1siXvn42g@mail.gmail.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>

next in thread | previous in thread | raw e-mail | index | archive | help
> On 2022-Aug-14, at 10:31, Nuno Teixeira <eduardo@freebsd.org> wrote:
>=20
> Ok, I will avoid a swap file.
>=20
> 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
> ---
>=20
> 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:
>=20
> > I use ZFS.
> >=20
> > I will follow your recomendations and use a swap of 64GB and then =
test 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.
>=20
> I recommend never using a swap file, only swap partition(s), in order
> to avoid deadlocks and such:
>=20
> On 2017-Feb-13, at 7:20 PM, Konstantin Belousov <kostikbel at =
gmail.com> wrote
> on the freebsd-arm list:
>=20
> . . .
>=20
> swapfile write requires the write request to come through the =
filesystem
> 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 =
require
> allocating and reading an indirect block buffer to find the block =
number
> of the written block, if the indirect block was not yet read.
>=20
> As result, swapfile swapping is more prone to the trivial and =
unavoidable
> deadlocks where the pagedaemon thread, which produces free memory, =
needs
> 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.
>=20



=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E3F8980-8214-45E9-9530-D78243A29D41>