Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timing measurement method #1

Open
pauljurczak opened this issue Sep 14, 2013 · 4 comments
Open

Timing measurement method #1

pauljurczak opened this issue Sep 14, 2013 · 4 comments

Comments

@pauljurczak
Copy link

I am running some code benchmarks on Linux and I have a few comments about the method you used here:

  1. Setting CPU governor mode to performance will set CPU clock to turbo speed if available. This may be throttled down by CPU thermal management, when die temperature exceeds safe threshold, which will affect time measurements. Wouldn't it be better to set it to CPU rated speed and disabling turbo mode?
  2. I'm curious why you chose median times instead of minimum ones? Median is good for sanity check, but still contains noise induced by other system activities.
@localvoid
Copy link
Owner

  1. Yes, you're right. But it seems that with new intel_pstate driver there is no way to set governor mode to userspace.
  2. I actually don't remember, maybe it was just my stupidity :)

localvoid pushed a commit that referenced this issue Sep 15, 2013
@pauljurczak
Copy link
Author

I'm a noob on Linux, but I'm using indicator-cpufreq on Xubuntu and it allows to set both the governor and specific CPU frequency. I selected the maximum non-turbo frequency and cpufreq-info confirms that it is indeed set. I hope that I can trust cpufreq-info reports.

@localvoid
Copy link
Owner

Starting with kernel 3.9 there is a new driver for power scaling that is used on Sandy/Ivy cpus, and it supports only performance and powersave governors. And it seems that it doesn't allow to set fixed frequency.

# 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: 1.60 GHz - 3.80 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 1.60 GHz and 3.80 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 2.28 GHz (asserted by call to hardware).
  boost state support:
    Supported: yes
    Active: yes
    3600 MHz max turbo 4 active cores
    3700 MHz max turbo 3 active cores
    3800 MHz max turbo 2 active cores
    3800 MHz max turbo 1 active cores

@pauljurczak
Copy link
Author

I'm running kernel 3.8 and it seems that indicator-cpufreq app sets fixed CPU frequency just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants