Page MenuHomeFreeBSD

Update swapon.8 to discourage using ZFS as swap device/file.
AcceptedPublic

Authored by ota_j.email.ne.jp on Oct 25 2019, 3:37 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 2, 9:14 AM
Unknown Object (File)
Sat, Apr 27, 5:27 AM
Unknown Object (File)
Sat, Apr 27, 5:27 AM
Unknown Object (File)
Sat, Apr 27, 5:27 AM
Unknown Object (File)
Sat, Apr 27, 3:41 AM
Unknown Object (File)
Tue, Apr 23, 5:25 PM
Unknown Object (File)
Sun, Apr 21, 5:33 PM
Unknown Object (File)
Dec 16 2023, 3:33 PM

Details

Reviewers
kib
alc
markj
pauamma_gundo.com
dougm
Group Reviewers
manpages
Summary

ZFS swap space can trigger OOM much earlier.

Test Plan

man swapon

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 27215
Build 25480: arc lint + arc unit

Event Timeline

Two suggestions.

sbin/swapon/swapon.8
211

killing what? I would insert "(random?) processes" here.
Contractions are discouraged in man pages, so use "does not" here.

sbin/swapon/swapon.8
208

It does not matter how much memory is required for write. What matter is that each write requires allocation of memory.

If the VM high watermark levels are tweaked, OOM from ZFS on swap can be entirely avoided. Don't know if this is relevant?

Any updates on this one? The suggested changes don't seem too difficult to me.
@ota_j.email.ne.jp are you interested in finishing this?

I've completely forgotten this changeset.

How does it look this time?

.Sh NOTE
ZVOLs are discouraged for use as swap devices,
because ZFS needs to allocate memory in order to write,
which may not be possible while the system is under memory pressure.
In other words, ZFS needs memory to make memory available.
ZFS swap files are discouraged for the same reason.
.Sh NOTE
ZVOLs are discouraged for use as swap devices,
because ZFS needs to allocate memory in order to write,
which may not be possible while the system is under memory pressure.
In other words, ZFS needs memory to make memory available.
ZFS swap files are discouraged for the same reason.

Why don't you go ahead and commit this, referencing original submitter in credits?

Minor, fixable on commit.

sbin/swapon/swapon.8
212

s/OOM/The OOM/

213

Missing word here? "or fails to allocate" maybe?

This revision is now accepted and ready to land.Oct 6 2022, 8:04 AM