Architecture:
**AMD** Opteron quad-core using 2 CPUs --- Numa system
Processor : x86_64 Operating System: GNU/Linux
I am trying to set the core freq to 2.2GHz(that being the max) on just one core of the die. The other die completely turned off.
sudo sh -c "echo 0 > /sys/devices/system/cpu/cpu1/online"
sudo sh -c "echo 0 > /sys/devices/system/cpu/cpu3/online"
sudo sh -c "echo 0 > /sys/devices/system/cpu/cpu5/online"
sudo sh -c "echo 0 > /sys/devices/system/cpu/cpu7/online"
Therefore just the cores, 0,2,4,6 are turned on
I have tried changing the governor
to performance
but it changes the frequency of other cores' when any other thread runs on it.
For example:
if thread one runs on core 0: then its freq is 2.2GHz
when thread two starts to run on core 2: it gets it as 2.2GHz - Where as I am expecting it to work as 0.8GHz.
is there a particular way to just set the frequency of just one core permanently.
Following @Lars answer.
Here is the complete solution:
echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo userspace > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo userspace > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
echo userspace > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
yum install cpufrequtils
or sudo aptitude install cpufrequtils
Then,
sudo cpufreq-set -c 0 -f 2200Mhz
sudo cpufreq-set -c 2 -f 800Mhz
sudo cpufreq-set -c 4 -f 800Mhz
sudo cpufreq-set -c 6 -f 800Mhz
Let me know if i can be anymore help in this issue. thanks
You could try setting the governor to userspace
(you may need to recompile your kernel if it isn't included) and then manually setting the frequency using scaling_setspeed
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With