From: Kenn Humborg (kenn at domain linux.ie)
Date: Mon 30 Sep 2002 - 21:04:02 IST
On Mon, Sep 30, 2002 at 06:32:11PM +0100, Niall O Broin wrote:
> On Mon, Sep 30, 2002 at 05:44:42PM +0100, Justin Mason wrote:
> > Kenn Humborg said:
> > > One side effect of this is that pretty much every application gets
> > > swapped out and the RAM gets filled with cache data. So when I
> > > come along in the morning, everything is quite sluggish as stuff
> > > gets swapped back in again.
> > The swap trick sounds pretty neat though BTW. But if you're running
> > other crons it could be risky...
> I thought so too :-) and I hope Kenn lets us know if it works. But I fail to
> see how it might be risky - it should be failsafe, in that as I described
> it, the secondary swap is turned on before the primary is turned off, and
> vice versa i.e. there should be no danger of running out of VM
Your procedure doesn't actually work like you think. Contrary to the
swapoff(8) manpage, swapoff -a turns off ALL swap areas, not just those
listed in /etc/fstab. And you'll want to make sure that your temporary
swap area has a higher priority than your regular ones (if you have more
than one) or you might find pages bouncing across multiple areas.
> (did that to
> myself on a box one day by running swapoff when I didn't have enough RAM -
> can't rememebr what I was thinking of, but there was a loud pop and a blue
> flame :-) )
> Mind you, knowing Kenn, he'll probably write a ptrace solution because it's
> neater and bugger the implementation cost :-)
I reckon I probably will, because the swap-frobbing method will leave the text
pages out of memory, whereas PEEKTEXT-ing them will ensure that they are
And ptrace() lets me be selective about which processes I want to be resident.
No need to page in a bunch of mingettys!
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:19:10 GMT