我想我的服务器与debian 8.1
不使用CPU缩放,但始终运行在尽可能高的频率。
我已经安装了cpufrequtils
$ dpkg -l | grep cpufreq ii cpufrequtils 008-1 amd64 ... ii libcpufreq0 008-1 amd64 ...
我把州长设定为performance
$ cat /etc/default/cpufrequtils ENABLE="true" GOVERNOR="performance" MAX_SPEED="0" MIN_SPEED="0"
并调用/etc/init.d/cpurequtils restart
当我用cpufreq-info
列出我的cpu信息时,我得到这样的结果:
analyzing CPU 2: driver: intel_pstate CPUs which run at the same hardware frequency: 2 CPUs which need to have their frequency coordinated by software: 2 maximum transition latency: 0.97 ms. hardware limits: 1.20 GHz - 3.80 GHz available cpufreq governors: performance, powersave current policy: frequency should be within 1.20 GHz and 3.80 GHz. The governor "performance" may decide which speed to use within this range. current CPU frequency is 1.73 GHz (asserted by call to hardware).
最后一行显示CPU没有全速运行。 当我检查从/ sys的值我得到相同的结果:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq echo "--" cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq 1198203 1199707 2001015 3048828 1551210 1358847 2953808 1982832 1523867 1200253 1654296 3446132 -- 1198203 1199707 2001015 2643730 1772695 1358847 2953808 1982832 1523867 1200253 1654296 3446132
我想知道的是我在/ sys中没有任何名为'scaling_available_frequencies'的文件,在许多howtos
ls -1 /sys/devices/system/cpu/cpu0/cpufreq/ affected_cpus cpuinfo_cur_freq cpuinfo_max_freq cpuinfo_min_freq cpuinfo_transition_latency related_cpus scaling_available_governors scaling_cur_freq scaling_driver scaling_governor scaling_max_freq scaling_min_freq scaling_setspeed
相应的内核模块全部被加载:
$ lsmod | grep cpufre cpufreq_powersave 12454 0 cpufreq_userspace 12525 0 cpufreq_conservative 14184 0 cpufreq_stats 12782 0
现在我设置scaling_min像这样:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
现在我看到的信息,它说频率应该在3.80 GHz和3.80 GHz之间,但实际上不是:
analyzing CPU 0: driver: intel_pstate CPUs which run at the same hardware frequency: 0 CPUs which need to have their frequency coordinated by software: 0 maximum transition latency: 0.97 ms. hardware limits: 1.20 GHz - 3.80 GHz available cpufreq governors: performance, powersave current policy: frequency should be within 3.80 GHz and 3.80 GHz. The governor "performance" may decide which speed to use within this range. current CPU frequency is 2.84 GHz (asserted by call to hardware).
总督“表演”似乎没有做的工作。 那么如何强制我的CPU全速运行呢?
你必须检查你的BIOS,因为CPU的P状态似乎只被部分识别。 如果发现很多服务器BIOS(主要是DELL)在处理节电问题时真的坏了。
所以,进入你的BIOS并禁用任何CPU省电function。 我build议你离开的唯一一个是关于C状态的(C1E,C6 / E等)。 如果您的BIOS允许您select电源configuration文件,请select“最高性能”。
3.8Ghz听起来像是一个涡轮增压频率。 你不能以这个速度运行所有内核–CPU不会允许它(它会超过它的功耗预算)。 您的CPU可能运行得尽可能快。
在较新的内核中,总督只是告诉CPU要优先考虑什么 – 性能或节能 – 并让它根据活动尝试获得最佳结果。 这是一个更好的做法。