On 2/20/06, Bob Rogers <[EMAIL PROTECTED]> wrote:
>    From: Ranga Nathan <[EMAIL PROTECTED]>
[...]
>    On the other hand, doing "nice -n-1 <myscript> &" would run it at a
> slightly higher-than-default priority, which might allow it to swap in
> more quickly when the workload picked up.  This would work best if the
> actions were fairly lightweight, as <myscript> will hog the CPU while
> it's running.  (I Haven't tried this recipe myself, though.)

The problem with a script swapping out is that it takes I/0 to swap it
back in.  Changing the priority just gives it better access to the
CPU, which doesn't help one bit in how quickly I/O lets it get swapped
back in.

There many two solutions for getting swapped back out.  The best is to
add RAM.  Secondly you can regularly guarantee that the script wakes
up regularly and does something.  Third, if you're using Linux 2.6 or
later, play around with the swappiness parameter.  You can control
this either by

echo 60 > /proc/sys/vm/swappiness

or by adding

vm.swappiness =60

to /etc/sysctl.conf.

Cheers,
Ben
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to