You are not logged in.

#1 2015-02-19 09:22:16

biergaizi
Member
Registered: 2015-02-19
Posts: 13

intel_pstate on Core M: the higher CPU load, the lower frequency?

I have a Sandy Bridge CPU runs flawlessly with intel_pstate on my workstation.

Recently, I got a new tablet with a Core M 5Y10 processor. It's an energy-saver, only runs between 800 MHz - 1 GHz
without turbo boost. When "turbo" and pstate are used, it runs between 500 MHz and 2.00 GHz.

Soon, I found a strange behavior when intel_pstate is running on this platform: the frequency is negatively related to the CPU load.
When the CPU is idle, it runs on nearly 1.8 - 2 GHz, but when CPU usage is 100%, it runs on only 600-700 MHz.

After I did

# x86_energy_perf_policy "performance"
# cpupower frequency-set -g performance

The frequency scaling became a bit optimistic and choose higher frequency, but the behavior never changes.

By default the Linux kernel uses the "ondemand" CPU frequency governor for achieving maximum clock frequency when system load is high and a lower clock frequency when the system is idle. However, it turns out that for at least modern Intel CPUs, this is likely no longer the case. This default kernel choice may lead to poor battery life and performance for modern Linux systems.

I know lower frequency not always equals to lower power usage on modern CPUs, and it is what pstate designed to deal with. But higher CPU load comes lower frequency is something I can't understand. It is a fanless tablet platform, so I guess it is some kinds of overheating protection. But it always happens although the temperature is not higher than 70 degrees celsius. Or it means pstate needs some further improvement on Broadwell?

Last edited by biergaizi (2015-02-19 09:23:13)

Offline

#2 2015-02-24 17:29:31

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: intel_pstate on Core M: the higher CPU load, the lower frequency?

Very interesting... the chip you describe is of the same vintage as my i7-4970k I described as idling at higher frequencies, as you have found in this thread.  I can't locate a list of CPU models comprising the "Haswell Refresh" series but I believe your chip might be in that group.  Anyway, I am very curious if the 300 Hz tick rate is to blame for the odd behavior you are describing.  Can you do two things:

1) Don't change the energy policy or frequency-set
2) Compile the 3.18.6 or 3.19 kernel from ABS but enable the nconfig option in the PKGBUILD so you can manually change the tickrate from 300 to 1000 (under processor features about 2-3 screens down).  Then boot into this kernel and see if it behaves normally.

Last edited by graysky (2015-02-24 17:31:53)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2015-02-24 18:32:33

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,212

Re: intel_pstate on Core M: the higher CPU load, the lower frequency?

I had better result controlling pstate frequency with https://aur.archlinux.org/packages/psta … uency-git/ than with cpupower.
More info at https://github.com/pyamsoft/pstate-frequency

Offline

#4 2015-02-24 18:33:57

biergaizi
Member
Registered: 2015-02-19
Posts: 13

Re: intel_pstate on Core M: the higher CPU load, the lower frequency?

I just tried to change the tickrate of my custom kernel from 300 Hz to 250 Hz, and now the CPU frequency stays at 800 MHz and never goes up when it is idle.

Offline

#5 2015-02-24 18:38:17

biergaizi
Member
Registered: 2015-02-19
Posts: 13

Re: intel_pstate on Core M: the higher CPU load, the lower frequency?

But when the CPU is under heavy load, it still never reaches to any frequency greater than 1 GHz.
I'm going to try frank604's recomennedation and see if anything is different.

Offline

#6 2015-02-25 06:09:48

biergaizi
Member
Registered: 2015-02-19
Posts: 13

Re: intel_pstate on Core M: the higher CPU load, the lower frequency?

frank604 wrote:

I had better result controlling pstate frequency with https://aur.archlinux.org/packages/psta … uency-git/ than with cpupower.
More info at https://github.com/pyamsoft/pstate-frequency

It seems the CPU refuses to reach any frequency higher than 1096 MHz when it's under heavy load. But if it is just for protection, it is unreasonable.
On Windows, at least the CPU can reach 1.2-1.5 GHz.

Offline

#7 2015-02-25 06:23:13

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,212

Re: intel_pstate on Core M: the higher CPU load, the lower frequency?

biergaizi wrote:

It seems the CPU refuses to reach any frequency higher than 1096 MHz when it's under heavy load. But if it is just for protection, it is unreasonable.
On Windows, at least the CPU can reach 1.2-1.5 GHz.

What is the output for

pstate-frequency -g

Offline

#8 2015-02-25 09:13:50

biergaizi
Member
Registered: 2015-02-19
Posts: 13

Re: intel_pstate on Core M: the higher CPU load, the lower frequency?

frank604 wrote:
biergaizi wrote:

It seems the CPU refuses to reach any frequency higher than 1096 MHz when it's under heavy load. But if it is just for protection, it is unreasonable.
On Windows, at least the CPU can reach 1.2-1.5 GHz.

What is the output for

pstate-frequency -g
Missing argument for option. 
Bad Option.

Did you mean -G?

pstate-frequency  1.1.9[g++]
    pstate::CPU_DRIVER     -> intel_pstate
    pstate::CPU_GOVERNOR   -> performance
    pstate::NO_TURBO       -> 0 : ON
    pstate::CPU_MIN        -> 25% : 500000KHz
    pstate::CPU_MAX        -> 100% : 2000000KHz

I was using make -j4 and running i7z to observe the CPUs. In first 15 seconds, the CPUs reached to 2 GHz but soon it decreased to 1 GHz when
the core temperature is greater than 70 degrees, and the temperature got cooler, to ~55-60 degrees in 30 seconds. So I guess the behavior causes
by overheating protection. It is a fanless tablet, I'm not surprised about it.

But it seems Windows runs at a bit higher frequency when it under heavy load, will do more test on it.

Last edited by biergaizi (2015-02-25 09:14:57)

Offline

#9 2015-02-25 20:25:32

einhard
Member
From: Poland
Registered: 2010-01-05
Posts: 89

Re: intel_pstate on Core M: the higher CPU load, the lower frequency?

I would take a look how your graphic card (HD 5300) on this processor behaves. Did you enable any powersave for graphic card (make sure the lvds_downclock=1 and enable_rc6=1 or higher are as options for i915)? My guess is that GPU is making difference here. Whole Turbo and Speed Step are tied to CPU+integral GPU power consumption and temperature.

Check what options you have on with

# systool -m i915 -av

If you want to watch your GPU frequencies I think building intel-gpu-tools with this patch would be best http://lists.freedesktop.org/archives/i … 58217.html
I don't know if intel-gpu-tools-git in aur have intel_frequency in already

other option is looking directly in /sys/class/drm/card0

Last edited by einhard (2015-02-25 21:00:58)

Offline

Board footer

Powered by FluxBB