[PLUG] Morning Slugishness

Russell Senior seniorr at aracnet.com
Mon Jul 31 20:57:24 UTC 2006


>>>>> "Daniel" == Daniel Hedlund <daniel at digitree.org> writes:

Daniel> [...] If I change the value to a low number such as 10 (or
Daniel> even 0, "echo 10 > /var/sys/vm/swappiness") just before
Daniel> running updatedb, the kernel will be very unlikely to swap out
Daniel> any memory unless it really really has to.  Once updatedb is
Daniel> done, you can set the swappiness back to its previous value:
Daniel> http://lwn.net/Articles/83588/ http://kerneltrap.org/node/3000

Won't solve the problem (of applications laggily swapping back in).
Rsync on big jobs chews up lots of RAM (has to maintain a lookup of
visited inodes in order to get hardlinks right).  That pressure is apt
to push idle jobs out of RAM.

Daniel> However, I think the easiest solution would be to either
Daniel> disable updatedb in the nightly cron job and make run it once
Daniel> a week.

Not a solution to nightly backups.  The nightliness is a desired feature.

Daniel> There is also apparently a patch being proposed (not sure if
Daniel> it's been implemented in the main trunk yet), which would
Daniel> automatically reload certain applications back into memory
Daniel> after they've been paged out to swap
Daniel> (http://members.optusnet.com.au/ckolivas/kernel/index.html).

The ability to do something like that on a per-process basis could
solve the problem.  Something like: swapin $(pidof mozilla)

Depending on the situation/machine, though, my swapoff/swapon trick
will work too.  Thanks for pointing out the caution though.  I am not
sure what happens if swapoff can't swap everything back in.


-- 
Russell Senior         ``I have nine fingers; you have ten.''
seniorr at aracnet.com



More information about the PLUG mailing list