LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   CPU Frequency Scaling (https://www.linuxquestions.org/questions/linux-general-1/cpu-frequency-scaling-944348/)

rng 05-11-2012 12:32 AM

CPU Frequency Scaling
 
How useful and important is cpu frequency scaling? I read somewhere that some larger distros have this already set up. How do I find out if it is activated in my installation and how much difference it is making? What will be the best/easiest application to monitor and adjust it. Thanks for your help.

em31amit 05-11-2012 12:58 AM

files in /sys/devices/system/cpu/cpu0/cpufreq/ provide information and a means of controlling the frequency scaling subsystem. Seed values are given in Khz. You need to be root to access the /sys filesystem.

Your max speed is at /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq.
Code:

    # cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
    700000

Your min speed is at /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq.
Code:

    # cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq
    500000


rng 05-11-2012 02:28 AM

The response to these commands on my system is:
Code:

No such file or directory
So this is not set up on my installation. But is it worth adjusting it? Are there any drawbacks?

em31amit 05-11-2012 04:40 AM

what linux distribution are you using??? i hope this will work in rhel5+

cascade9 05-11-2012 04:53 AM

With older CPUs, frequency scaling will not work. Almost all distros will setup frequency scaling if its supported (so far as I know they all will, but there might be a few that dont).

*edit- of course arch (and other distros with similar driving ideas) wouldnt have it setup 'out of the box'.

What CPU are you running?

rng 05-11-2012 08:30 AM

My CPU is fairly recent:
Quote:

i686 Intel(R) Core(TM) i3 CPU 540 @ 3.07GHz GenuineIntel
I am using arch linux and I know cpu frequency scaling is not set up here. I want to know if it is worth all the trouble to set it up.

cascade9 05-11-2012 08:55 AM

I'd use it if your CPU supports it.

Frequency scalling helps with power use, tempratures and may give your CPU a longer lifespan.

rng 05-11-2012 10:09 AM

Quote:

I'd use it if your CPU supports it.
Which is the best application to monitor and configure cpu frequency scaling?

speck 05-15-2012 10:14 PM

Try the following as root or sudo (I think that CPU will have four entries):
Code:

modprobe acpi-cpufreq
modprobe cpufreq_conservative
echo conservative > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo conservative > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo conservative > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo conservative > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor

To make sure it's working, they should all be listed as "conservative":
Code:

cat /sys/devices/system/cpu/cpu?/cpufreq/scaling_governor


All times are GMT -5. The time now is 08:41 PM.