5

I'm trying to understand why my CPUs don't run at higher frequencies (related link)

Can someone explain me how is it possible that when a min and a max are defined, the effective value finally goes out of that range?

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
3267000
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 
3300000
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq 
1199960


$ cpupower frequency-info
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: 800 MHz - 3.30 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 3.27 GHz and 3.30 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 1.20 GHz.
  boost state support:
    Supported: yes
    Active: yes
    25500 MHz max turbo 4 active cores
    25500 MHz max turbo 3 active cores
    25500 MHz max turbo 2 active cores
    25500 MHz max turbo 1 active cores

Also, can someone explain the difference between cpuinfo_cur_freq and scaling_cur_freq please?


Related issues I opened to solve my problem (may contain additional infos not mentionned here that could be useful)


Additional info:

$ sudo rdmsr -a 0x19a
0
0
0
0
rdmsr: No CPU 4

1 Answers1

3

Depending on your processor, and for yours this is the case, cpuinfo_cur_freq and scaling_cur_freq are the same thing.
For some processors, cpuinfo_cur_freq involves a hardware read and can be "expensive" in terms of time, which is the reason it requires sudo to access.

Your CPU frequency can be outside the limits you have set, because the processor itself can back off on the PLL (Phase Locked Loop) if the load is light enough, and regardless of what you asked for. Don't worry the CPU frequency will spin up very quickly if there is actual work to do. In your case, you are using the performance governor, which will give the fastest CPU frequency ramp up time possible.

For your other referenced question, and as I mentioned over there, I think Clock Modulation is involved, which is a problem for the intel_pstate CPU frequency driver. To confirm or deny if Clock Modulation is enabled please add this result to your question:

$ sudo modprobe msr
$ sudo rdmsr -a 0x19a

Note that the package msr-tools is needed for the rdmsr primitive. I'll decode the information, once provided.

Doug Smythies
  • 15,448
  • 5
  • 44
  • 61
  • thanks for your answer. I've seen other topics where you talk about clock modulation but the problem appears after sleep right? My problem happens directly after reboot, and the frequency seems to become lower when I add load to the cpus (see also: https://github.com/pyamsoft/pstate-frequency/issues/24). Can it still be related? I can't test right now but I'll take a look at your other answers and try to turn off clock modulation and pstate driver. Thanks – Sebastien Lorber Jul 20 '16 at 21:45
  • I am suggesting that in your case the reasons for Clock Modulation becoming enabled are real. i.e. thermal, and the last line of defense before your processor cooks itself. In addition to what I already asked for, I think output from sudo turbostat --debug sleep 10 might help. – Doug Smythies Jul 20 '16 at 21:55
  • After my last tests with thermald removed and pstate-frequency put to maximum I was able to saw proc temperature to go close to 100°. It is probably that computer tries to protect itself as the junction temp is 105. But that would mean that upgrading my Ubuntu distribution made my computer become hotter than before while running at lower frequency? What could cause that? I'll get turbostat tomorow thanks – Sebastien Lorber Jul 20 '16 at 22:05
  • I suspect your computer vent paths needs to be cleaned. I have a dell XPS-M1730 and I have to clean the vents every 6 months or so. – Doug Smythies Jul 21 '16 at 06:56
  • Hi. I've put the turbostat outputs on the related question (http://askubuntu.com/q/800797/453923) because it's more suited than here. Unfortunatly I'm not sure how I can open my computer to clean it (never did), the screws are so small and seem to require specific tooling. It looks like my computer allows temperature to become very high underload, and then decide that it's too hot and only let cpu run around 1Ghz. I'd rather have my computer become less hot, and when it's too hot, avoid going back to such a low frequency. – Sebastien Lorber Jul 21 '16 at 08:26
  • I'd appreciate if you could take a look at this new question. Maybe there's overheat, but then why would fans slow down? http://askubuntu.com/questions/801226/fans-arent-fullspeed-while-cpu-is-100-then-cpu-frequency-decrease – Sebastien Lorber Jul 21 '16 at 09:31
  • Doug Smythies I'm still having problems. I'm trying to work, I forced the fans full-speed, and the CPUs are at 60° (which is low for my computer). The frequency is staying around 800mhz for some time now, while there is almost no load on my computer (like 5-10% C0). I'm currently using acpi-cpufreq and turned off thermald, cpufreqd and i8kmon. I just run your rdmsr command and added the result above. By chance do you have an idea of a possible cause? – Sebastien Lorber Jul 22 '16 at 15:55
  • Possible cause of what? What you describe seems normal to me. The rdmsr command I wanted was for when the CPU frequencies are much too low due to, we suspect, an extreme thermal event. By the way, I cleaned my vents and such on my LapTop without taking it apart, using a bent out paper clip to hold the fan blades from spinning, and a vacuum and compressed air. If you don't have compressed air, just try to vacuum via the air intake area. If you do have clean (no oil) compressed air, then spray some into the outflow vents, while vacuuming at the intake area. In my case I saw significant dust. – Doug Smythies Jul 22 '16 at 16:15
  • Oh, if you are still using the performance governor, then we would expect higher CPU frequencies, even for the 5 to 10% C0 time. – Doug Smythies Jul 22 '16 at 20:18