> (4) processes being killed with out-of-swapspace messages > even though I have 4 GB of untouched swap space. Might > be associated with (3). [This is mostly a FYI in case the material is unfamiliar.] Only believe the detailed wording of messages of the form: "was killed: out of swap space" if you also got messages of the form: "swap_pager_getswapspace(...): failed" The other causes that I know of for the "out of swap space" messages are: Sustained low free RAM [via stays-runnable process(es)]. A sufficiently delayed pageout. The swap blk uma zone was exhausted. The swap pctrie uma zone was exhausted. (This is in part because FreeBSD does not swap out runnable processes.) My personal FreeBSD builds have extra code that reports which of the 4 happened but FreeBSD itself does not report such detail. There are tunables for some of the above that make some of those not trip as soon ( /etc/sys.conf content ): # # Delay when persistent low free RAM leads to # Out Of Memory killing of processes. The # delay is a count of kernel-attempts to gain # free RAM (so not time units). vm.pageout_oom_seq=120 (The default is 12 last I knew. 120 allows a 1 GiByte armv7 to -j4 buildworld buildkernel from scratch, relative to what vm.pageout_oom_seq tunes anyway.) # # For plunty of swap/paging space (will not # run out), avoid pageout delays leading to # Out Of Memory killing of processes: vm.pfault_oom_attempts=-1 That last has the alternative structure (replace ???'s with positive integers): # # For possibly insufficient swap/paging space # (might run out), increase the pageout delay # that leads to Out Of Memory killing of # processes: #vm.pfault_oom_attempts= ??? #vm.pfault_oom_wait= ??? # (The multiplication of the two values is the # total but there are other potential tradoffs # in the factors multiplied for the same total.) For reference: # sysctl -d vm.pageout_oom_seq vm.pageout_oom_seq: back-to-back calls to oom detector to start OOM # sysctl -d vm.pfault_oom_wait vm.pfault_oom_wait: Number of seconds to wait for free pages before retrying the page fault handler # sysctl -d vm.pfault_oom_attempts vm.pfault_oom_attempts: Number of page allocation attempts in page fault handler before it triggers OOM handling I hope that helps. === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)Received on Mon Jan 25 2021 - 01:29:25 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:26 UTC