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)
Fri, Feb 3, 7:19 PM
Unknown Object (File)
Tue, Jan 10, 1:48 AM
Unknown Object (File)
Mon, Jan 9, 7:29 PM
Unknown Object (File)
Dec 14 2022, 11:40 PM
Unknown Object (File)
Dec 12 2022, 12:11 PM
Unknown Object (File)
Dec 9 2022, 2:41 AM
Unknown Object (File)
Dec 2 2022, 6:57 AM

Details

Reviewers
kib
alc
markj
pauamma
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?

pauamma added a subscriber: pauamma.

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