Wednesday, July 05, 2017

Oracle Linux – finding your CPU speed

People used to know the speed of the CPU in their server, mainly because they actively purchased the hardware they were using to run their systems. Now that the move to the cloud is becoming more and more standard this information is not always known. Cloud providers provide you Infrastructure as a Service and you can define the number of vCPU’s and other things however the speed of this specific CPU is not always known upfront.

When you are deploying high performance systems on the cloud it is good to understand what the speed is of the vPCU’s you have. In Oracle Linux, and in other distributions, you can relative easily find the speed of you cpu as it is noted down in /proc/cpuinfo

[vagrant@localhost ~]$ cat /proc/cpuinfo | grep MHz | uniq
cpu MHz  : 2903.998
[vagrant@localhost ~]$

The above example shows how to get the required information which is stored in /proc/cpuinfo where we use uniq to prevent values to appear multiple times. In general all the CPU’s have the same speed. In theory, this is not a given, however, in practice this is almost always the case and all you CPU’s will have the same speed. In case it is not you will see two entries and you will have to find out which CPU is having which speed.

No comments: