NetBSD-Users archive

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

Re: "adjusting" / control Swapping



On Thu, Sep 16, 2010 at 09:08:28AM -0400, Greg Troxel wrote:
> 
> "Niels Dettenbach" <nd%syndicat.com@localhost> writes:
> 
> > volume of 5 GB swap. The swap is needed as there are peaks of required
> > memory sometimes (once or twice a month) where the system stops with
> > out of mem otherwise. In most time the swap is not required, but used
> > (I assume i.e. for file caching). If i restart several of that
> > mem-pigs / deamons (i.e. once a day) within the system the swap was
> > wiped out and the sytsm seems to run faster (with less load). There
> > are daemons who doenst offer control of their caching or mem-usage
> > behaviour byself.
> 
> As others said, your problem is badly-behaved daemons.  Daemons that
> intend to run forever should not accumulate memory usage.  So if they
> do, add a cron job to restart them daily.

That's not the real problem in my experience. It's rather, long running
programs / daemons get pushed onto swap by e.g. the daily process's
find(1) etc. boosting the file cache. And then, in the morning, you
return to your computer to see it's having a gig on swap and three
gigs of free RAM. And it's e.g. firefox that's completely out on swap.
And even if you start using firefox again, it does not swap in completely.
You have to kill it and restart so that it uses real memory.

I.e. memory that got swapped out doesn't get returned to RAM when
the shortage on RAM is over. And that sucks. Hard.

-Martin


Home | Main Index | Thread Index | Old Index