Page 1 of 1

Ubuntu Script Request

Posted: Wed May 14, 2008 12:53 am
by kitsura
Wonder if anyone has or can come up with a script to automatically get the process id of the Fahcore and change it to a higher priority. Currently I'm manually pgrepping and reniceing it but a script would be great.

Re: Ubuntu Script Request

Posted: Wed May 14, 2008 1:26 am
by Pax-UX
Something like things should work:

./fah6 -forceasm -smp -verbosity 9 &
renice -n -2 -p $!
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load
echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load
echo 2 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load
echo 3 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load

This will give the process created a nice value of 18, don't know if it will give all 4 a value of 18, but the first will be 18.

The magic here is '$!' which is the Process ID of the last execute program, in this case Folding client.

Re: Ubuntu Script Request

Posted: Wed May 14, 2008 6:58 am
by kitsura
I'm running Ubuntu 7.10 and the directory /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load doesn't exist.

Re: Ubuntu Script Request

Posted: Wed May 14, 2008 7:28 am
by monts
Just wondering if this was to force the cpu to run at full speed. I had a problem when I first started the linux-smp client that the cpu was still only running at the speedstep point (only 1.6GHz not the 2.4CHz it should run at) was that the powernowd daemon wasn't looking at the nice processes when calculating the speed of the cpu. since I've changed that I've shaved about fourteen hours off the time it takes the wu to finish (approx 45% of the time taken).

Given half a sober moment (obviously not at the moment) I'll post the steps change it later.