[Bug 230402] With buildworld, the system can not use swap

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Sep 1 15:22:37 UTC 2018


--- Comment #11 from Mark Millard <marklmi26-fbsd at yahoo.com> ---
(In reply to chris from comment #10)

You are not explicit about what revision you are building.
My experience is with head (12), not 11.x .

If the following is supported:

sysctl vm.pageout_oom_seq=120

then do that before starting the first build after booting. The default
value of 12 is unlikely to work. Depending on what all is going on in
your I/O environment, this may prove insufficient but it likely would
get more of the build done. If the build does not complete, then
investigating your I/O latencies becomes relevant.

The figure is tied to how long FreeBSD tolerates low free
RAM conditions. (This wording is a simplification.) FreeBSD
does not swap running processes to gain more free RAM, only
processes that are idle for a while.

Another point is the use of -j4 or other such vs. -j1 .
-j1 or other smaller figures are more likely to complete
(use less memory and have fewer long-running processes at
once). You were not explicit about your usage for this.

As for the swap space sizing (1 page = 4*1024 Bytes):

1048576 pages is 1048576 * (4*1024) Bytes, so 4 GiBytes, not the
1 GiByte referenced.

924056 pages is 924056 * (4*1024) Bytes, so a little over 3.5 GiBytes.

(Note the figures in the messages are system specific and can even
change some from build revision to revision for the same system.)

I'd recommend staying at or under the 3.5 GiByte figure. But going
anywhere near 1 GiByte of swap is insufficient with 1 GiByte of RAM.
2 GiByte of swap should work with some room to spare.

Is the reference to 512M of swap in another context similarly off
by a factor of 4? If yes: 2 GiBytes of swap were in use. Otherwise?
Again -j4 or other such vs. -j1 matters to the RAM+SWAP use and the
number of long-running processes at once.

I recommend using swap partitions and avoiding the use of swap
files. (I've no clue which you are using.)

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

More information about the freebsd-bugs mailing list