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

REQ: Runtime warning if CPU scaling is enabled #111

Open
darlingm opened this issue Nov 7, 2017 · 3 comments
Open

REQ: Runtime warning if CPU scaling is enabled #111

darlingm opened this issue Nov 7, 2017 · 3 comments

Comments

@darlingm
Copy link

darlingm commented Nov 7, 2017

I tried out Celero for the first time, and got very inconsistent results.

Tried out google benchmark, and it showed:

***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will incur extra overhead.

Would be nice if Celero had a similar warning. I'm betting turning scaling off will fix the inconsistencies I was seeing.

I disabled CPU scaling (well, technically set it to always run at max frequency) by running sudo cpupower frequency-set -g performance. I'll be back to trying Celero soon.

@DigitalInBlue
Copy link
Owner

When Celero runs, it calls "celero::DisableDynamicCPUScaling()". On Windows, this disables scaling. There is not, however, a linux implementation in the code at this point. This should be added. It seems (to me) better to just turn it off, then to warn that it is on.

@darlingm
Copy link
Author

darlingm commented Nov 8, 2017

I'm torn on that. I'd be more OK with it as long as on Windows and linux that it puts it back to the setting it started on. But, if for any reason the celero executable crashed or the user stops it (infinite loop perhaps) it would never get set back. Wouldn't be a huge deal for me, but some more worried about energy savings possibly to having many more systems running might feel otherwise.

I believe though that root privileges are required to change it on linux. I think that's why google benchmark just gives the warning.

@DigitalInBlue
Copy link
Owner

After consideration, I am going to remove automatically setting this on Windows. (It was never implemented for Linux.) A cross-platform warning does seem more appropriate.

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