tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: killed: out of swap



On 2022-06-14 19:57, David Brownlee wrote:
On Tue, 14 Jun 2022 at 13:33, Robert Elz <kre%munnari.oz.au@localhost> wrote:

NetBSD implements overcommitted swap - many processes malloc()
(or mmap() which that really becomes in the current implementation)
far more memory than they're ever going to actually use.  It is only
when some real physical memory is required (rather than simply a marker
"zero filled page might be required here") that the system actually
allocates any real resources.   Similarly pages mapped from a file only
need swap space if they're altered - otherwise the file serves as the
backing store for it.

Once upon a time there was a method to turn overcommitted swap off, and
require actual allocations (of RAM or swap) to be made for all reserved
(virtual) memory.  I used to enable that all the time - but I haven't seen
any mention of it in ages, and the mechanism might no longer still exist.

What might be interesting is a way to influence the order in which
processes are chosen to kill...

I don't see any realistic way of doing anything with that.
It's basically the first process that tries to allocate another page when there are no more. There are no other processes at that moment in time that have the problem, so why should any of them be considered?

  Johnny

--
Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt%softjar.se@localhost             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol


Home | Main Index | Thread Index | Old Index