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
F81955335: D22150.diff
Tue, Apr 23, 5:25 PM
Unknown Object (File)
Sun, Apr 21, 5:33 PM
Unknown Object (File)
Dec 16 2023, 3:33 PM
Unknown Object (File)
Dec 13 2023, 3:32 AM
Unknown Object (File)
Nov 10 2023, 11:46 AM
Unknown Object (File)
Nov 8 2023, 11:46 AM
Unknown Object (File)
Oct 9 2023, 1:54 PM
Unknown Object (File)
Oct 9 2023, 1:54 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

Lint
Lint Skipped
Unit
Tests Skipped

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