Subject: Re: patch for handling out-of-swap conditions
To: Chuck Silvers <chuq@chuq.com>
From: Bill Sommerfeld <sommerfeld@orchard.arlington.ma.us>
List: tech-kern
Date: 02/25/1999 16:16:03
I tried this on a dataless shark with filesystems in NFS, 32meg of
physical memory and 32meg of swap on a local paging disk; it built ok
and appears to run ok when not under severe memory pressure.

However, under stress, it still wedges up.

The workload was on the order of 15-20 `xterm -sl 10000' processes,
each running `cat /usr/share/misc/termcap'.

It quickly got to the point where swap was full, according to pstat
-s.  Things kept running for for several minutes after that.  However,
I wasn't able see any process to die due to swap exhaustion; instead,
things gradually slowed to a crawl to the point that the system might
as well be hung.  I lost patience and hit the reset button.

I *suspect* what's going on is that the more-agressive page
deactivation is preferentially chasing all text pages out of core
(since they're read-only and backed by the text vnode), replacing them
with dirty data pages which can't be swapped out because there isn't
any swap space.  With text pages in really short supply, apps start
thrashing like crazy.

					- Bill