4

Running a particularly compute-intensive task on my computer (Tecra W50) for more than a few seconds causes it to become very slow. Performance does not return to normal after the task completes.

  • Running time python3 -c "for i in range(10000000): pass" prints 0.2 seconds before the computer starts being slow, but 2.1 seconds after.

  • Rebooting fixes the problem, until the next time I run an intensive task.

  • dmesg doesn't show anything of in the last 2 hours

  • htop shows low resource usage, both in terms of CPU and RAM.

  • I didn't do a dist-upgrade recently, but I did install a new kernel (3.16.0-38-generic)

How should I approach this problem?

EDIT:

Based on an insightful comment by Harald, I dumped /proc/cpuinfo before and after running a compute-intensive task. The diff is pretty telling:

@@ -5,7 +5,7 @@
 model name : Intel(R) Core(TM) i7-4810MQ CPU @ 2.80GHz
 stepping   : 3
 microcode  : 0x1c
-cpu MHz        : 2800.218
+cpu MHz        : 609.218
 cache size : 6144 KB
 physical id    : 0
 siblings   : 8

(this gets repeated 8 times with similar numbers).

Some more data (taken while things were still running fast):

/ $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
intel_pstate
/ $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
powersave
/ $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
3800000
/ $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
800000
/ $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors 
performance powersave

And calling sensors while the task is running (before the slowdown) yields this:

$ sensors
acpitz-virtual-0
Adapter: Virtual device
temp1:        +99.0°C  (crit = +102.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +99.0°C  (high = +84.0°C, crit = +100.0°C)
Core 0:         +97.0°C  (high = +84.0°C, crit = +100.0°C)
Core 1:         +99.0°C  (high = +84.0°C, crit = +100.0°C)
Core 2:         +93.0°C  (high = +84.0°C, crit = +100.0°C)
Core 3:         +86.0°C  (high = +84.0°C, crit = +100.0°C)

Just seconds later it's down to 60, and everything is slower.

I made some more precise timings: the small python script above with one extra zero changes from

real    0m2.869s
user    0m2.868s
sys 0m0.004s

before running anything intensive to

real    0m19.208s
user    0m19.217s
sys 0m0.004s

after a few seconds of heavy work.

Here's what cpuinfo | grep MHz says while the fast test is running:

cpu MHz     : 3799.359
cpu MHz     : 3800.015
cpu MHz     : 3156.453
cpu MHz     : 2791.250
cpu MHz     : 3623.484
cpu MHz     : 3120.687
cpu MHz     : 2887.828
cpu MHz     : 3129.656

and while the slow test is running:

cpu MHz     : 608.015
cpu MHz     : 599.921
cpu MHz     : 610.531
cpu MHz     : 590.406
cpu MHz     : 642.906
cpu MHz     : 576.515
cpu MHz     : 606.484
cpu MHz     : 593.468

The timings don't seem to change too much after echo "50" | sudo tee /sys/devices/system/cpu/intel_pstate/max_perf_pct:

real    0m18.938s
user    0m18.909s
sys 0m0.036s

neither do they change after echo 100:

real    0m20.201s
user    0m20.195s
sys 0m0.016s

The problem does not appear on 3.13.0-37-generic. The output of sensors is still as above, but the performance of the small python test is unchanged before and after the test. The output of cpuinfo is as follows:

cpu MHz     : 800.000
cpu MHz     : 2801.000
cpu MHz     : 800.000
cpu MHz     : 800.000
cpu MHz     : 800.000
cpu MHz     : 800.000
cpu MHz     : 800.000
cpu MHz     : 800.000

which makes sense, since the test is single threaded. On that kernel, some things are different, too:

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
acpi-cpufreq
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
ondemand
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
2801000
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
800000
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors 
conservative ondemand userspace powersave performance 

I've also captured the output of turbostat a little before, during, and after a compute-intensive task on the intel_pstate driver:

Core     CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 PkgWatt CorWatt GFXWatt 
   -       -       9    0.57    1662    2793       0    0.85    0.01    0.05   98.53      45      48   95.66    0.00    0.00    0.00    2.35    0.06    0.00
   0       0      19    1.18    1643    2793      29    0.32    0.00    0.00   98.50      45      48   95.66    0.00    0.00    0.00    2.35    0.06    0.00
   0       1       2    0.15    1643    2793      29    1.35
   1       2       7    0.45    1476    2793      29    0.85    0.05    0.18   98.47      43
   1       3      10    0.59    1654    2793      29    0.71
   2       4       8    0.49    1644    2794      29    0.23    0.00    0.00   99.28      43
   2       5       3    0.18    1624    2794      29    0.54
   3       6       5    0.34    1475    2794      29    1.80    0.00    0.00   97.85      43
   3       7      22    1.19    1824    2794      29    0.95
Core     CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 PkgWatt CorWatt GFXWatt 
   -       -    2142   60.38    3547    2794       0    4.77    0.07    0.15   34.64      89      89   30.27    0.00    0.00    0.00   36.95   30.53    0.00
   0       0    2138   60.55    3530    2794      32    3.22    0.02    0.17   36.03      80      89   30.27    0.00    0.00    0.00   36.95   30.53    0.00
   0       1    2153   60.36    3568    2794      32    3.41
   1       2    2144   60.46    3547    2794      32    6.65    0.12    0.04   32.73      89
   1       3    2127   60.10    3539    2794      32    7.01
   2       4    2113   59.67    3542    2794      32    3.95    0.07    0.02   36.29      78
   2       5    2160   60.52    3569    2794      32    3.10
   3       6    2133   59.95    3558    2794      32    6.13    0.07    0.35   33.49      72
   3       7    2163   61.41    3522    2794      32    4.68
Core     CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 PkgWatt CorWatt GFXWatt 
   -       -    3548   98.89    3588    2794       0    1.11    0.00    0.00    0.00      91      91    0.00    0.00    0.00    0.00   56.62   47.73    0.00
   0       0    3542   98.73    3588    2794      32    1.27    0.00    0.00    0.00      84      91    0.00    0.00    0.00    0.00   56.62   47.73    0.00
   0       1    3540   98.67    3588    2794      32    1.33
   1       2    3553   99.02    3588    2794      32    0.98    0.00    0.00    0.00      91
   1       3    3582   99.84    3588    2794      32    0.16
   2       4    3518   98.06    3588    2794      32    1.94    0.00    0.00    0.00      84
   2       5    3563   99.31    3588    2794      32    0.69
   3       6    3586   99.95    3588    2794      32    0.05    0.00    0.00    0.00      78
   3       7    3499   97.53    3588    2794      32    2.47
Core     CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 PkgWatt CorWatt GFXWatt 
   -       -    3565   99.30    3590    2794       0    0.70    0.00    0.00    0.00      95      95    0.00    0.00    0.00    0.00   56.53   47.58    0.00
   0       0    3570   99.46    3590    2794      27    0.54    0.00    0.00    0.00      89      95    0.00    0.00    0.00    0.00   56.53   47.58    0.00
   0       1    3574   99.57    3590    2794      27    0.43
   1       2    3589   99.98    3590    2794      27    0.02    0.00    0.00    0.00      95
   1       3    3563   99.26    3590    2794      27    0.74
   2       4    3519   98.01    3590    2794      27    1.99    0.00    0.00    0.00      87
   2       5    3589   99.98    3590    2794      27    0.02
   3       6    3558   99.11    3590    2794      27    0.89    0.00    0.00    0.00      80
   3       7    3556   99.05    3590    2794      27    0.95
Core     CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 PkgWatt CorWatt GFXWatt 
   -       -    2861   98.83    2895    2794       0    1.17    0.00    0.00    0.00      93      93    0.00    0.00    0.00    0.00   46.17   38.07    0.00
   0       0    2854   98.57    2896    2794      43    1.43    0.00    0.00    0.00      89      93    0.00    0.00    0.00    0.00   46.17   38.07    0.00
   0       1    2854   98.70    2891    2794      43    1.30
   1       2    2853   98.57    2895    2794      43    1.43    0.00    0.00    0.00      93
   1       3    2892   99.79    2898    2794      43    0.21
   2       4    2865   98.92    2896    2794      43    1.08    0.00    0.00    0.00      87
   2       5    2821   97.81    2884    2794      43    2.19
   3       6    2874   99.17    2898    2794      43    0.83    0.00    0.00    0.00      83
   3       7    2873   99.15    2898    2794      43    0.85
Core     CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 PkgWatt CorWatt GFXWatt 
   -       -    2834   98.72    2871    2794       0    1.27    0.00    0.00    0.00      97      97    0.00    0.00    0.00    0.00   46.45   38.38    0.00
   0       0    2823   98.37    2870    2794      50    1.63    0.00    0.00    0.00      95      97    0.00    0.00    0.00    0.00   46.45   38.38    0.00
   0       1    2842   99.00    2871    2794      50    1.00
   1       2    2839   98.80    2873    2794      50    1.20    0.00    0.00    0.00      97
   1       3    2868   99.72    2876    2794      50    0.28
   2       4    2817   98.17    2869    2794      50    1.81    0.01    0.01    0.00      93
   2       5    2813   98.16    2866    2794      50    1.82
   3       6    2832   98.61    2872    2794      50    1.39    0.00    0.00    0.00      88
   3       7    2841   98.95    2871    2794      50    1.05
Core     CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 PkgWatt CorWatt GFXWatt 
   -       -    2172   98.67    2202    2793       0    1.33    0.00    0.00    0.00      95      95    0.00    0.00    0.00    0.00   34.06   26.79    0.00
   0       0    2171   97.75    2221    2793      60    2.25    0.00    0.00    0.00      93      95    0.00    0.00    0.00    0.00   34.06   26.79    0.00
   0       1    2156   98.42    2190    2793      60    1.57
   1       2    2175   98.74    2202    2793      60    1.26    0.00    0.00    0.00      95
   1       3    2180   99.24    2197    2793      60    0.76
   2       4    2173   98.73    2201    2793      60    1.27    0.00    0.00    0.00      93
   2       5    2161   98.52    2194    2794      60    1.48
   3       6    2181   98.88    2206    2794      60    1.12    0.00    0.00    0.00      87
   3       7    2180   99.08    2200    2794      60    0.92
Core     CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 PkgWatt CorWatt GFXWatt 
   -       -    2415   98.38    2455    2793       0    1.61    0.00    0.00    0.01      70      70    0.00    0.00    0.00    0.00   38.87   31.59    0.00
   0       0    2377   97.24    2444    2793      54    2.73    0.00    0.00    0.03      68      70    0.00    0.00    0.00    0.00   38.87   31.59    0.00
   0       1    2392   97.66    2449    2793      54    2.31
   1       2    2449   99.32    2466    2793      54    0.68    0.00    0.00    0.00      70
   1       3    2418   98.61    2452    2793      54    1.39
   2       4    2437   99.00    2462    2793      54    1.00    0.00    0.00    0.00      66
   2       5    2393   97.79    2447    2793      54    2.21
   3       6    2426   98.58    2461    2793      54    1.42    0.00    0.00    0.00      68
   3       7    2430   98.82    2459    2793      54    1.18
Core     CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 PkgWatt CorWatt GFXWatt 
   -       -    1626   98.64    1648    2794       0    1.36    0.00    0.00    0.00      66      66    0.00    0.00    0.00    0.00   24.97   18.61    0.00
   0       0    1628   98.45    1654    2794      41    1.55    0.00    0.00    0.00      63      66    0.00    0.00    0.00    0.00   24.97   18.61    0.00
   0       1    1648   99.49    1656    2794      41    0.51
   1       2    1630   98.82    1650    2794      41    1.18    0.00    0.00    0.00      66
   1       3    1607   98.05    1639    2794      41    1.95
   2       4    1637   98.85    1656    2794      41    1.15    0.00    0.00    0.00      63
   2       5    1638   99.18    1652    2794      41    0.82
   3       6    1645   99.25    1657    2794      41    0.75    0.00    0.00    0.00      64
   3       7    1571   97.01    1620    2794      41    2.99
Core     CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 PkgWatt CorWatt GFXWatt 
   -       -     594   99.29     598    2794       0    0.71    0.00    0.00    0.00      63      63    0.00    0.00    0.00    0.00    7.26    2.11    0.00
   0       0     600   98.85     607    2794       9    1.15    0.00    0.00    0.00      61      63    0.00    0.00    0.00    0.00    7.26    2.11    0.00
   0       1     585   99.28     590    2794       9    0.72
   1       2     604   99.58     607    2794       9    0.42    0.00    0.00    0.00      63
   1       3     582   98.72     590    2794       9    1.28
   2       4     605   99.71     607    2794       9    0.29    0.00    0.00    0.00      60
   2       5     589   99.86     590    2794       9    0.14
   3       6     598   98.49     607    2794       9    1.51    0.00    0.00    0.00      59
   3       7     589   99.87     589    2794       9    0.13
Core     CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 PkgWatt CorWatt GFXWatt 
   -       -     368   61.51     598    2794       0    3.20    0.26    1.62   33.41      58      58   25.93    0.00    0.00    0.00    5.52    1.30    0.00
   0       0     369   60.85     607    2794       9    0.78    0.28    2.22   35.86      58      58   25.93    0.00    0.00    0.00    5.52    1.30    0.00
   0       1     349   59.17     590    2794       9    2.46
   1       2     365   60.08     607    2794       9    3.01    0.60    0.16   36.15      58
   1       3     359   60.87     590    2794       9    2.21
   2       4     376   61.97     607    2794       9    2.48    0.09    4.07   31.40      56
   2       5     351   59.60     590    2794       9    4.84
   3       6     376   61.86     607    2794       9    7.83    0.07    0.02   30.23      56
   3       7     398   67.65     589    2794       9    2.03
Core     CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 PkgWatt CorWatt GFXWatt 
   -       -       7    1.11     603    2794       0    1.28    0.02    0.02   97.57      54      56   91.75    0.00    0.00    0.00    2.43    0.03    0.00
   0       0      17    2.77     609    2794       9    0.49    0.05    0.03   96.65      54      56   91.75    0.00    0.00    0.00    2.43    0.03    0.00
   0       1       1    0.20     640    2794       9    3.07
   1       2       6    0.95     615    2794       9    3.56    0.02    0.03   95.45      54
   1       3      20    3.39     585    2794       9    1.11
   2       4       1    0.22     659    2794       9    0.31    0.00    0.00   99.47      53
   2       5       1    0.21     634    2794       9    0.32
   3       6       2    0.29     628    2794       9    1.01    0.00    0.00   98.70      54
   3       7       5    0.89     604    2794       9    0.41
Core     CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 PkgWatt CorWatt GFXWatt 
   -       -       8    1.38     602    2794       0    1.68    0.02    0.01   96.92      53      55   89.75    0.00    0.00    0.00    2.45    0.03    0.00
   0       0       9    1.49     613    2794       9    0.55    0.05    0.00   97.90      53      55   89.75    0.00    0.00    0.00    2.45    0.03    0.00
   0       1       1    0.16     650    2794       9    1.89
   1       2      13    2.14     609    2794       9    3.66    0.02    0.00   94.19      52
   1       3      20    3.42     584    2794       9    2.37
   2       4       8    1.30     612    2794       9    0.52    0.00    0.03   98.14      51
   2       5       2    0.25     627    2794       9    1.58
   3       6       2    0.35     635    2794       9    2.21    0.01    0.00   97.44      52
   3       7      11    1.92     597    2794       9    0.64
Core     CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 PkgWatt CorWatt GFXWatt 
   -       -       8    1.26     601    2794       0    1.45    0.02    0.01   97.26      52      54   90.61    0.00    0.00    0.00    2.40    0.03    0.00
   0       0       6    0.93     622    2794       9    0.37    0.01    0.00   98.69      52      54   90.61    0.00    0.00    0.00    2.40    0.03    0.00
   0       1       1    0.15     653    2794       9    1.16
   1       2       8    1.23     611    2794       9    4.54    0.00    0.01   94.21      51
   1       3      26    4.41     584    2794       9    1.37
   2       4      11    1.76     611    2794       9    0.48    0.03    0.05   97.68      50
   2       5       2    0.30     621    2794       9    1.94
   3       6       2    0.30     642    2794       9    1.23    0.02    0.00   98.45      50
   3       7       6    1.04     602    2794       9    0.50

Some extra info (after running an intensive task):

10:00:26 /sys/class/thermal
$ sudo grep -r . *
cooling_device0/type:Processor
cooling_device0/power/control:auto
cooling_device0/power/async:disabled
cooling_device0/power/runtime_enabled:disabled
cooling_device0/power/runtime_active_kids:0
cooling_device0/power/runtime_active_time:0
grep: cooling_device0/power/autosuspend_delay_ms: Input/output error
cooling_device0/power/runtime_status:unsupported
cooling_device0/power/runtime_usage:0
cooling_device0/power/runtime_suspended_time:0
cooling_device0/cur_state:0
cooling_device0/max_state:10
cooling_device1/type:Processor
cooling_device1/power/control:auto
cooling_device1/power/async:disabled
cooling_device1/power/runtime_enabled:disabled
cooling_device1/power/runtime_active_kids:0
cooling_device1/power/runtime_active_time:0
grep: cooling_device1/power/autosuspend_delay_ms: Input/output error
cooling_device1/power/runtime_status:unsupported
cooling_device1/power/runtime_usage:0
cooling_device1/power/runtime_suspended_time:0
cooling_device1/cur_state:0
cooling_device1/max_state:10
cooling_device2/type:Processor
cooling_device2/power/control:auto
cooling_device2/power/async:disabled
cooling_device2/power/runtime_enabled:disabled
cooling_device2/power/runtime_active_kids:0
cooling_device2/power/runtime_active_time:0
grep: cooling_device2/power/autosuspend_delay_ms: Input/output error
cooling_device2/power/runtime_status:unsupported
cooling_device2/power/runtime_usage:0
cooling_device2/power/runtime_suspended_time:0
cooling_device2/cur_state:0
cooling_device2/max_state:10
cooling_device3/type:Processor
cooling_device3/power/control:auto
cooling_device3/power/async:disabled
cooling_device3/power/runtime_enabled:disabled
cooling_device3/power/runtime_active_kids:0
cooling_device3/power/runtime_active_time:0
grep: cooling_device3/power/autosuspend_delay_ms: Input/output error
cooling_device3/power/runtime_status:unsupported
cooling_device3/power/runtime_usage:0
cooling_device3/power/runtime_suspended_time:0
cooling_device3/cur_state:0
cooling_device3/max_state:10
cooling_device4/type:Processor
cooling_device4/power/control:auto
cooling_device4/power/async:disabled
cooling_device4/power/runtime_enabled:disabled
cooling_device4/power/runtime_active_kids:0
cooling_device4/power/runtime_active_time:0
grep: cooling_device4/power/autosuspend_delay_ms: Input/output error
cooling_device4/power/runtime_status:unsupported
cooling_device4/power/runtime_usage:0
cooling_device4/power/runtime_suspended_time:0
cooling_device4/cur_state:0
cooling_device4/max_state:10
cooling_device5/type:Processor
cooling_device5/power/control:auto
cooling_device5/power/async:disabled
cooling_device5/power/runtime_enabled:disabled
cooling_device5/power/runtime_active_kids:0
cooling_device5/power/runtime_active_time:0
grep: cooling_device5/power/autosuspend_delay_ms: Input/output error
cooling_device5/power/runtime_status:unsupported
cooling_device5/power/runtime_usage:0
cooling_device5/power/runtime_suspended_time:0
cooling_device5/cur_state:0
cooling_device5/max_state:10
cooling_device6/type:Processor
cooling_device6/power/control:auto
cooling_device6/power/async:disabled
cooling_device6/power/runtime_enabled:disabled
cooling_device6/power/runtime_active_kids:0
cooling_device6/power/runtime_active_time:0
grep: cooling_device6/power/autosuspend_delay_ms: Input/output error
cooling_device6/power/runtime_status:unsupported
cooling_device6/power/runtime_usage:0
cooling_device6/power/runtime_suspended_time:0
cooling_device6/cur_state:0
cooling_device6/max_state:10
cooling_device7/type:Processor
cooling_device7/power/control:auto
cooling_device7/power/async:disabled
cooling_device7/power/runtime_enabled:disabled
cooling_device7/power/runtime_active_kids:0
cooling_device7/power/runtime_active_time:0
grep: cooling_device7/power/autosuspend_delay_ms: Input/output error
cooling_device7/power/runtime_status:unsupported
cooling_device7/power/runtime_usage:0
cooling_device7/power/runtime_suspended_time:0
cooling_device7/cur_state:0
cooling_device7/max_state:10
cooling_device8/type:LCD
cooling_device8/power/control:auto
cooling_device8/power/async:disabled
cooling_device8/power/runtime_enabled:disabled
cooling_device8/power/runtime_active_kids:0
cooling_device8/power/runtime_active_time:0
grep: cooling_device8/power/autosuspend_delay_ms: Input/output error
cooling_device8/power/runtime_status:unsupported
cooling_device8/power/runtime_usage:0
cooling_device8/power/runtime_suspended_time:0
cooling_device8/cur_state:0
cooling_device8/max_state:100
cooling_device9/type:intel_powerclamp
cooling_device9/power/control:auto
cooling_device9/power/async:disabled
cooling_device9/power/runtime_enabled:disabled
cooling_device9/power/runtime_active_kids:0
cooling_device9/power/runtime_active_time:0
grep: cooling_device9/power/autosuspend_delay_ms: Input/output error
cooling_device9/power/runtime_status:unsupported
cooling_device9/power/runtime_usage:0
cooling_device9/power/runtime_suspended_time:0
cooling_device9/cur_state:-1
cooling_device9/max_state:50
thermal_zone0/mode:enabled
thermal_zone0/temp:83000
thermal_zone0/type:acpitz
thermal_zone0/power/control:auto
thermal_zone0/power/async:disabled
thermal_zone0/power/runtime_enabled:disabled
thermal_zone0/power/runtime_active_kids:0
thermal_zone0/power/runtime_active_time:0
grep: thermal_zone0/power/autosuspend_delay_ms: Input/output error
thermal_zone0/power/runtime_status:unsupported
thermal_zone0/power/runtime_usage:0
thermal_zone0/power/runtime_suspended_time:0
grep: thermal_zone0/emul_temp: Permission denied
thermal_zone0/trip_point_0_temp:102000
thermal_zone0/trip_point_0_type:critical
thermal_zone0/policy:step_wise
thermal_zone0/passive:0
thermal_zone1/temp:51000
thermal_zone1/type:x86_pkg_temp
thermal_zone1/power/control:auto
thermal_zone1/power/async:disabled
thermal_zone1/power/runtime_enabled:disabled
thermal_zone1/power/runtime_active_kids:0
thermal_zone1/power/runtime_active_time:0
grep: thermal_zone1/power/autosuspend_delay_ms: Input/output error
thermal_zone1/power/runtime_status:unsupported
thermal_zone1/power/runtime_usage:0
thermal_zone1/power/runtime_suspended_time:0
grep: thermal_zone1/emul_temp: Permission denied
thermal_zone1/trip_point_0_temp:0
thermal_zone1/trip_point_0_type:passive
thermal_zone1/trip_point_1_temp:0
thermal_zone1/trip_point_1_type:passive
thermal_zone1/policy:step_wise

And the output of turbostat -d sleep 10

$ sudo ~/dls/turbostat -d sleep 10
turbostat version 4.7 17-June, 2015 - Len Brown 
CPUID(0): GenuineIntel 13 CPUID levels; family:model:stepping 0x6:3c:3 (6:60:3)
CPUID(6): APERF, DTS, PTM, EPB
RAPL: 5578 sec. Joule Counter Range, at 47 Watts
cpu5: MSR_NHM_PLATFORM_INFO: 0x80838f3011c00
8 * 100 = 800 MHz max efficiency frequency
28 * 100 = 2800 MHz base frequency
cpu5: MSR_IA32_POWER_CTL: 0x0004005d (C1E auto-promotion: DISabled)
cpu5: MSR_TURBO_RATIO_LIMIT: 0x24242526
36 * 100 = 3600 MHz max turbo 4 active cores
36 * 100 = 3600 MHz max turbo 3 active cores
37 * 100 = 3700 MHz max turbo 2 active cores
38 * 100 = 3800 MHz max turbo 1 active cores
cpu5: MSR_CONFIG_TDP_NOMINAL: 0x0000001c (base_ratio=12)
cpu5: MSR_CONFIG_TDP_LEVEL_1: 0x00000000 ()
cpu5: MSR_CONFIG_TDP_LEVEL_2: 0x00000000 ()
cpu5: MSR_CONFIG_TDP_CONTROL: 0x80000000 ( lock=1)
cpu5: MSR_TURBO_ACTIVATION_RATIO: 0x00000000 (MAX_NON_TURBO_RATIO=0 lock=0)
cpu5: MSR_NHM_SNB_PKG_CST_CFG_CTL: 0x1e008405 (UNdemote-C3, UNdemote-C1, demote-C3, demote-C1, locked: pkg-cstate-limit=5: pc7s)
cpu0: MSR_IA32_ENERGY_PERF_BIAS: 0x00000006 (balanced)
cpu0: MSR_CORE_PERF_LIMIT_REASONS, 0x38210000 (Active: ) (Logged: Transitions, MultiCoreTurbo, PkgPwrL2, Auto-HWP, PROCHOT, )
cpu0: MSR_GFX_PERF_LIMIT_REASONS, 0x00000000 (Active: ) (Logged: )
cpu0: MSR_RING_PERF_LIMIT_REASONS, 0x0c000000 (Active: ) (Logged: PkgPwrL1, PkgPwrL2, )
cpu0: MSR_RAPL_POWER_UNIT: 0x000a0e03 (0.125000 Watts, 0.000061 Joules, 0.000977 sec.)
cpu0: MSR_PKG_POWER_INFO: 0x00000178 (47 W TDP, RAPL 0 - 0 W, 0.000000 sec.)
cpu0: MSR_PKG_POWER_LIMIT: 0x4281d600dc8178 (UNlocked)
cpu0: PKG Limit #1: ENabled (47.000000 Watts, 28.000000 sec, clamp DISabled)
cpu0: PKG Limit #2: ENabled (58.750000 Watts, 0.002441* sec, clamp DISabled)
cpu0: MSR_PP0_POLICY: 0
cpu0: MSR_PP0_POWER_LIMIT: 0x00000000 (UNlocked)
cpu0: Cores Limit: DISabled (0.000000 Watts, 0.000977 sec, clamp DISabled)
cpu0: MSR_PP1_POLICY: 0
cpu0: MSR_PP1_POWER_LIMIT: 0x00000000 (UNlocked)
cpu0: GFX Limit: DISabled (0.000000 Watts, 0.000977 sec, clamp DISabled)
cpu0: MSR_IA32_TEMPERATURE_TARGET: 0x00641000 (100 C)
cpu0: MSR_IA32_PACKAGE_THERM_STATUS: 0x88310808 (51 C)
cpu0: MSR_IA32_THERM_STATUS: 0x88310808 (51 C +/- 1)
cpu2: MSR_IA32_THERM_STATUS: 0x88340808 (48 C +/- 1)
cpu4: MSR_IA32_THERM_STATUS: 0x88340808 (48 C +/- 1)
cpu6: MSR_IA32_THERM_STATUS: 0x88330808 (49 C +/- 1)
    Core     CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 PkgWatt CorWatt GFXWatt
       -       -       4    0.72     612    2794       0    1.10    0.02    0.01   98.16      51      53   93.95    0.00    0.00    0.00    2.26    0.02    0.00
       0       0       8    1.23     617    2794      18    1.48    0.03    0.01   97.26      51      53   93.95    0.00    0.00    0.00    2.26    0.02    0.00
       0       1       3    0.55     602    2794      18    2.16
       1       2      12    1.93     609    2794      18    0.76    0.05    0.02   97.24      49
       1       3       5    0.84     598    2794      18    1.85
       2       4       2    0.32     637    2794      18    0.87    0.00    0.00   98.81      49
       2       5       2    0.26     616    2794      18    0.92
       3       6       3    0.42     628    2794      18    0.25    0.00    0.00   99.32      50
       3       7       1    0.19     630    2794      18    0.49
10.003772 sec

Output of sudo rdmsr -a 0x19a before running intensive task:

$ sudo rdmsr -a 0x19a
0
0
0
0
0
0
0
0

After:

$ sudo rdmsr -a 0x19a
1c
1c
1c
1c
1c
1c
1c
1c

There's nothing in kern.log about temperatures

  • What about memory and swap usage? Compare free -h before and after the slowdown. – Byte Commander Jul 27 '15 at 9:22
  • All normal. This laptop has 32GB of RAM. – Clément Jul 27 '15 at 17:31
  • 1
    Does the CPU run hot, really temperature-wise, is throttled and not properly reset? askubuntu.com/a/36637/367444 may help, which shows how to get the current frequency, and this askubuntu.com/a/15833/367444 to get the temperature. – Harald Jul 27 '15 at 18:20
  • @Harald great advice. The CPU seems to throttled but not reset. Any further pointers? – Clément Jul 28 '15 at 5:29
  • Temperature remains normal throughout the task. – Clément Jul 28 '15 at 5:41
2

I would like to try to help you with your issue.
I would like you to try to help me understand your specific issue better.

The condition where a relatively recent Intel processor locks at around 600 MHz, where the minimum pstate for the package is 800 MHz has been observed many times. However, I am only aware of the condition occurring after a resume from a suspend to ram. Furthermore, the condition (of about 75% of what was asked for, not the lock at that frequency) has (correctly or incorrectly) been attributed to a BIOS problem, particularly in the Dell E6320.

EDIT: Theory: With the current version of the intel_pstate driver, any engagement of thermal throttling via Clock Modulation will result in the reported CPU frequency being locked at some very low frequency.
The acpi-cpufreq driver does not suffer from this issue. Note that a proposed patch set for the intel_pstate driver also does not suffer from this issue.
In addition to the desired turbostat data, an additional MSR register will help to confirm or deny this theory.

Would you be willing to do these tests, and edit the results into your question:

. After slow down. Do your time python3 -c "for i in range(10000000): pass" test. Make it about 10 or 100 times longer, and while it is running do grep MHz /proc/cpuinfo. Are all CPU's stuck at around 600MHz? (in your original posting it is not clear, to me, if the 600 MHz was just because it was idle, or if it is stuck there.)

. After a fresh boot, and before any intensive task, does your little test thing run faster than 0.2 seconds (perhaps use 10 or 100 times longer in order to extract more significant digits)? And what CPU frequencies do you get? I.E. was the 2800 MHz you listed already about 0.75 X 3800 MHz. or will the CPU actually go to 3800 MHz (depending on activity on other CPUs, and if turbo is enabled).

. To prevent frequency lock up, a patch was added to the intel_pstate driver as of the 4.2RC (release candidate) series. If the result from test 1 above was that the frequency is locked, would you be willing to try kernel 4.3RC4. It might not unlock in your case, because the issue (as different from the BIOS issue) was suspend related.

. If the result from test 1 above is that the frequency is locked, then does this unlock it?:

$ echo "50" | sudo tee /sys/devices/system/cpu/intel_pstate/max_perf_pct
50

wait 5 seconds, to ensure that every CPU is toggled. It can take up to 4 seconds for an idle CPU to actually run a pass through the intel_pstate driver.

$ echo "100" | sudo tee /sys/devices/system/cpu/intel_pstate/max_perf_pct
100

And if it does unlock it, does it stay at about 0.75 times what it should be?

Please also check your BIOS settings. However, I do not know what you would be looking for.

Please alos review your /var/log/kern.log file for any thermal related messages.

It will be useful to provide the before and after slowdown output from:

sudo turbostat -d sleep 10

or, for older versions of turbostat it might still be:

sudo turbostat -v sleep 10

Also needed is another MSR register (needs once per boot sudo modprobe msr first):

sudo rdmsr -a 0x19a

Also needed is the output from:

cd /sys/class/thermal
grep -r . *

You might need to install the linux-tools package to get turbostat, and if that version of turbostat is not new enough you might need to do a sudo modprobe msr first.

From your tests, your root issue seems to be that your processor is overheating and scaling back on its own to protect itself. However, it seems to lockup at this condition and not recover. I would very much like to understand why, and the turbostat tests mentioned above will provide some insight. In particular (I think) we are interested in understanding and decoding the MSR_IA32_PACKAGE_THERM_STATUS line for the different conditions and different drivers. We are also interested in understanding and decoding the IA32_CLOCK_MODULATION MSR (0x19A).

From your tests, it appears as though the issue is only present with the intel_pstate frequency scaling driver and not the acpi cpufreq frequency scaling driver. I had thought the intel_pstate driver was used by default for sometime now.

If you just want to get on with things, you can disable the use of the intel_pstate frequency scaling driver. Edit the file /etc/default/grub, perhaps making a copy first, and add intel_pstate=disable to the GRUB_CMDLINE_LINUX_DEFAULT line. Here is an example from one of my computers:

GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 intel_pstate=disable net.ifnames=1 biosdevname=0 crashkernel=384M-:128M"

You will have to do the edit as sudo and you will have to run sudo update-grub afterwards, then re-boot.

However, I would be most grateful if, when times permits, you would continue to help investigate the issue with the intel_pstate driver, as no computer I have access to has the issue.

If you are having troubles with the linux-tools package, there is a turbostat on my web site that should work. double u double u double u dot smythies dot com /~doug/linux/intel_pstate/energy/turbostat. It is also included in the kernel source, you would just have to compile it.

EDIT: Observations from the 14 turbostat samples:

The 14 turbostat samples show thermal related issues. The idle temperature seems a little high, as does the idle CPU clock frequency. There does appear to be some variable degree of thermal throttling before the locked up state. Summary from the 14 samples:

Sample CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz  CPU%c7  PkgTmp PkgWatt CorWatt Throttled  Comment
   1     -       9    0.57    1662    2793   98.53      48    2.35    0.06  no        High idle temp and Bzy clock
   2     -    2142   60.38    3547    2794   34.64      89   36.95   30.53  no
   3     -    3548   98.89    3588    2794    0.00      91   56.62   47.73  no
   4     -    3565   99.30    3590    2794    0.00      95   56.53   47.58  no        Very high Temp
   5     -    2861   98.83    2895    2794    0.00      93   46.17   38.07  yes X 29
   6     -    2834   98.72    2871    2794    0.00      97   46.45   38.38  yes X 29
   7     -    2172   98.67    2202    2793    0.00      95   34.06   26.79  yes X 22  More Thermal throttling
   8     -    2415   98.38    2455    2793    0.01      70   38.87   31.59  yes X 25  Less Thermal throttling
   9     -    1626   98.64    1648    2794    0.00      66   24.97   18.61  yes X 16  More Thermel throttling
  10     -     594   99.29     598    2794    0.00      63    7.26    2.11  yes X 6   Locked up state
  11     -     368   61.51     598    2794    3.41      58    5.52    1.30  yes X 6
  12     -       7    1.11     603    2794    7.57      56    2.43    0.03  yes X 6   
  13     -       8    1.38     602    2794    6.92      55    2.45    0.03  yes X 6
  14     -       8    1.26     601    2794   97.26      54    2.40    0.03  yes X 6   High idle temperature 
  • Thanks a lot for this. I'll report soon. I think this is already quite close to an answer, since the question was phrased as "how do I diagnose the issue" :) – Clément Jul 29 '15 at 23:23
  • Ok, I've added a bunch of information – Clément Jul 31 '15 at 16:06
  • Is there a way to revert to the old acpi scaling driver? I don't have the overheating problem with the old kernel :/ – Clément Aug 1 '15 at 3:42
  • Hmmm, I'm getting linux-tools-3.16.0-38-generic : Depends: linux-lts-utopic-tools-3.16.0-38 but it is not going to be installed when trying to setup linux-tools – Clément Aug 1 '15 at 3:43
  • Yes, I never actually install or use the package, I just compile and use turbostat. I added a location where you can get it. – Doug Smythies Aug 1 '15 at 5:32
1

Your system BIOS is using Clock Modulation as a method to protect itself from thermal overload. While it is wanting to reduce system performance by a small amount, 75% of the nominal maximum, the performance is actually being restricted to 75% of the very minimum. Also, it appears that once Clock Modulation has been engaged, it never resets. In its current form, the intel_pstate CPU frequency scaling driver is fundamentally incompatible with Clock Modulation, and will always drive the target pstate to minimum regardless of actual load. However, the acpi-cpufreq CPU scaling driver works fine with Clock Modulation, and is the recommended driver for you.

Is that the whole story? No. As of, I think, Kernel 4.5 the intel_pstate driver has some changes based on CPU id, such that some processors will be controlled by load based algorithms, which are compatible with Clock Modulation, and some processors will be controlled by performance based algorithms, which are not compatible with Clock Modulation. Your processor, ID=0X3C, will still be performance based.

  • Thanks! Huge +1 :) Do you think I should file a bug report? Wouldn't it be more appropriate for this processor to be controlled by a load-based algorithm? Is there anything that I could read about this? I'd love to reach a state where I could diagnose this on my own :) – Clément Mar 29 '16 at 17:40
  • Do not file a bug report. The issue is known and understood by the power management group kernel e-mail list. There are some related bug reports at bugzilla.kernel.org. Well, my other answer is more about "how" we got to here. – Doug Smythies Mar 29 '16 at 18:45
  • Thanks! I was just surprised by your very last sentence: since intel_pstate doesn't work with my processor, why is it enabled by default? – Clément Mar 30 '16 at 10:20
  • Perhaps I should edit my answer a bit. Your computer is overheating and the last stage of the defense is the BIOS Clock Modulation stuff. Lots of BIOS's will behave the same. Some thermal management like thermald or tlp might prevent getting to that situation in the first place. – Doug Smythies Mar 30 '16 at 20:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.