[Bug 280846] Low memory freezes / OOM: a thread waited too long to allocate a page

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 13 Oct 2024 16:32:03 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280846

--- Comment #36 from Mark Millard <marklmi26-fbsd@yahoo.com> ---
(In reply to Mark Millard from comment #18)

By the way, if you add having swap space:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206048#c7

reports:

QUOTE
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 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.

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.
END QUOTE

Implication: Avoid file-based swap space in order to avoid deadlocks. Use
partitions/slices instead.

-- 
You are receiving this mail because:
You are the assignee for the bug.