« HOWTO: Expand a RAID 5 by adding another diskHOWTO: Create a New VM with VirtualBox »

HOWTO: Stop Folding at Home Scaling My CPU

29/11/09

HOWTO: Stop Folding at Home Scaling My CPU

If you use the CPU scaling options that are now a default part of Ubuntu, you will also see that when folding@home runs or any other process that hits the CPU's hard the CPU frequency will jump up a level or two. Folding@home run as a low priority using nice. To stop any nice process from pushing the CPU to its limits add the following code snippet into the existing file /etc/init.d/ondemand. If will replace the start and background switch commands. I also want to set the minimum for my frequency for CPU too.

 start) 


    log_daemon_msg "Setup cpu scalling" "ondemand" 
    log_daemon_msg "   Sleeping for 60 seconds before continuing" 
    log_daemon_msg "   Setting ondemand, ignore nice and min freq 1.5Ghz" 
    start-stop-daemon --start --background --exec /etc/init.d/ondemand -- background 
    ;; 
 background) 
    sleep 60 # probably enough time for desktop login 
    for CPUFREQ in /sys/devices/system/cpu/cpu*/cpufreq                  
    do 
        [ -f ${CPUFREQ}/scaling_governor ] && echo -n ondemand > ${CPUFREQ}/scaling_govenor 
        [ -f ${CPUFREQ}/ondemand/ignore_nice_load ] && \ 
                         echo 1 > ${CPUFREQ}/ondemand/ignore_nice_load 
        [ -f ${CPUFREQ}/scaling_min_freq ] && echo 1500000 > ${CPUFREQ}/scaling_min_freq 
    done 
    ;; 

Now whenever you boot the file that tells the CPU scaling to ignore nice processes will be set.

Team Ubuntu Icon

Ubuntu documentation on Installing Folding At Home
Team Ubuntu Stats

No feedback yet

Here are a collection of Mini-HOWTOs some of which are too short even for that grand title. I keep them around as it is easier to remember where to look these up that to remember the content of the mini-HOWTO

Search

Contents

powered by b2evolution free blog software