How to determine actual current/running CPU speed?

General support questions
Post Reply
roly
Posts: 4
Joined: 2018/02/08 04:15:00

How to determine actual current/running CPU speed?

Post by roly » 2018/02/08 05:46:04

Hello,

I'll try to be detailed but I'm completely new with Linux, please excuse my shortcomings for this topic and the lengthy read below.

We have an HP Z840 (specs below) that was running on RHEL 6.5 (2.6.32-431.l6.x86-64x8) which we upgraded (clean install) to CentOS 7.2 (7.2.1511 - 3.10.0-327.el7.x86_64):

HP Z840 Workstation
1st Processor Type: Intel Xeon CPU E5-2687W v3 @ 3.10GHz
2nd Processor Type: Intel Xeon CPU E5-2687W v3 @ 3.10GHz
64GB ECC RDDR4 2133 MHz
BIOS updated to version M60 v02.34

REASON FOR THIS QUESTION:
We have an application we're running on this system that is intermittently complaining that the CPU is too slow. This issue came up a week after this application was installed. The first week, the application didn't complain of anything and all of its usual check are passed.
The application requires the CPU to be running between 2100 and 3725 Mhz. The application sometimes fail on its usual check during launch that it only detects CPU running at 1200 MHz (sometimes dynamically between 1200 to 1700), and sometimes gets a pass when it detects the CPU running on required speeds (dynamically between 2200 to 2500). Pass or Fail, we can continue using the application but we're afraid that when workload gets really heavy, the application may crash if it has marked the CPU to be too slow. The application's support team says that their application gathers the information about the CPU speed via the dmidecode.

PROBLEM:
When we run different commands to check for current running CPU speed, we seem to get different information:

lscpu says CPU MHz: 1200.00
lscpu | grep MHz: 1200.00
dmidecode -t processor | grep Speed says "Current Speed: 3100 MHz
dmidecode -s processor-frequency shows the result below:
3100 MHz
3100 MHz

The info under "Processor Information" when I run dmidecode shows "Current Speed: 3100 MHz

If we run this command below, its shows all 40 lines of CPU running consistent at 1200 (some of which changes real time when needed from 1200 to 1300 or 1500 or even 3100 like when I launch another application):
sudo watch -n 1 cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq

Additionally:
If I boot the system from the old RHEL 6.5 (Cloned disk of old system), the above commands shows consistent CPU speed of 3100 MHz
Also, we have an exact same workstation setup that is currently running on RHEL 6.5 on another location which also shows a consistent CPU speed of 3100 MHz from those above commands. Therefore that particular application's usual check on required CPU speed is always a Pass.

THE QUESTION:
So now, we are wondering on how to find out the actual/true running CPU speed from a system running CentOS 7 so we can determine if we have some potential hardware issue or if we can simply ignore the application's failed hardware checks or better yet escalate the issue to the application's support team.

I guess it doesn't matter even if we manage to establish that the running speed of our workstation is 3100 MHz, because if the application thinks or detects otherwise, we won't get the application's full potential?

Thanks in advance.
- Roly

tunk
Posts: 1206
Joined: 2017/02/22 15:08:17

Re: How to determine actual current/running CPU speed?

Post by tunk » 2018/02/08 13:24:29

There may be a setting in the BIOS to disable speedstep.
There may also be some linux tools to control this. Maybe this is a starting point:
viewtopic.php?t=47982

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to determine actual current/running CPU speed?

Post by TrevorH » 2018/02/08 14:21:51

Why would you update to a 2 year old operating system version? 7.2 is out of date and insecure, run yum update to get to 7.4 ASAP.

7.2 is missing 2 *years* of security fixes and some of those are extremely serious. It's not safe to run. Do not do it.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

roly
Posts: 4
Joined: 2018/02/08 04:15:00

Re: How to determine actual current/running CPU speed?

Post by roly » 2018/02/09 07:24:50

@tunk - Thanks, I will look into that. At the sametime, I have raised a hardware support ticket to HP for possible CPU issue.

@ TrevorH - Thanks. I agree, it's always best to run the latest version (latest and greatest and more secure). However, the application vendor has not yet qualified versions above 7.2. Currently, only version 7.2 is on their application's system requirements. I'm afraid we are currently dictated by the application's system requirement at this stage. But as I've mentioned above, we are also exploring with HP support to get them to diagnose any possible cpu-related hardware issue. Additionally, we've expressed the security concern of running an outdated OS on a system within our network to the application vendor, hopefully they can fast track in qualifying the latest CentOS version. thanks again.

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: How to determine actual current/running CPU speed?

Post by hunter86_bg » 2018/02/09 15:46:45

You can configure your own tuned profile which changes the cpu governor.
If you want to get information about the cpu's current speed , use something like 'watch -n 0.5 grep -i mhz /proc/cpuinfo'

chemal
Posts: 776
Joined: 2013/12/08 19:44:49

Re: How to determine actual current/running CPU speed?

Post by chemal » 2018/02/09 16:05:24

I'm curious: what software is this that still hasn't heard of dynamic CPU frequency scaling and even checks for a minimum fequency at startup? Who sells it?

Anyway: you should treat 7.2 as a minimum requirement, not as an absolute requirement. Later versions are compatible with earlier versions. And you can simply ignore this stupid frequency warning, because the CPU's frequency will automatically rise once your stupid program is through with its lame check and does some real computation.

roly
Posts: 4
Joined: 2018/02/08 04:15:00

Re: How to determine actual current/running CPU speed?

Post by roly » 2018/03/12 08:44:00

Just sharing latest findings which I hope others can find useful:

As it turns out, cpu power frequency is currently at "Conservative" mode.
After setting it to "Performance" mode, lscpu command now reports that the CPU MHz is at 3100, and the applications hardware validation tool no longer fails on the CPU aspect.

So, it appears lscpu is reporting the correct cpu frequency.

To further continue with this cpu-related issue, unfortunately, the cpu power frequency goes back to "Conservative" after rebooting the machine.
All power saving feature in the BIOS are turned off/disabled but it seems as if the OS is overriding the BIOS setting.

I tried running echo 'GOVERNOR="performance"' | sudo tee /etc/default/cpufrequtils but it still goes back to "Conservative" mode after a reboot.

Looking for other options at the moment (e.g. disabling rc.d ondemand).

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to determine actual current/running CPU speed?

Post by TrevorH » 2018/03/12 08:53:03

I don't think that /etc/default/cpufrequtils is used by the CentOS version, that sounds like a Debian file location.

You want to use tuned-adm to set a performance profile instead.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

roly
Posts: 4
Joined: 2018/02/08 04:15:00

Re: How to determine actual current/running CPU speed?

Post by roly » 2018/03/12 10:00:16

@TrevorH, yes, thanks, that directory doesn't actually exists but only after I manually created it with the echo command.
Most of my search results indeed points me to tuned-adm (including this topic: viewtopic.php?t=61949).
Thanks, I will look into this.

Post Reply