HFT:Check the current CPU Speed
Check the current speed of the CPU
The speed of the cpu in /proc/cpuinfo will report the default speed of the CPU. If the speed of the CPU has been changed in anyway it may not be accurate. This includes overclocking on the HFT systems
Get the current CPU speed
Install the package from yum:
yum install cpupowerutils
Use turbostat to get the current speed. This is shown in the GHz column.
[root@hft1 ~]# turbostat
pk cor CPU %c0 GHz TSC SMI %c1 %c3 %c6 %c7 CTMP PTMP %pc2 %pc3 %pc6 %pc7 Pkg_W Cor_W RAM_W PKG_% RAM_%
100.00 3.75 3.54 0 0.00 0.00 0.00 0.00 73 73 0.00 0.00 0.00 0.00 203.02 173.64 0.00 0.00 0.00
0 1 0 100.00 3.75 3.54 0 0.00 0.00 0.00 0.00 66 73 0.00 0.00 0.00 0.00 100.86 86.27 0.00 0.00 0.00
0 2 1 100.00 3.75 3.54 0 0.00 0.00 0.00 0.00 68
0 3 2 100.00 3.75 3.54 0 0.00 0.00 0.00 0.00 71Another Handy Tool (i7z)
prereqs
- development tools
- ncurses
- ncurses-devel
Get the i7z util: https://code.google.com/p/i7z/
Build and Install Process:
[root@hft1 scratch]# mkdir i7z
[root@hft1 scratch]# cd i7z
[root@hft1 i7z]# wget https://i7z.googlecode.com/files/i7z-0.27.2.tar.gz
--2014-01-30 12:25:59-- https://i7z.googlecode.com/files/i7z-0.27.2.tar.gz
Resolving i7z.googlecode.com... 173.194.78.82, 2a00:1450:400c:c00::52
Connecting to i7z.googlecode.com|173.194.78.82|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 51226 (50K) [application/x-gzip]
Saving to: “i7z-0.27.2.tar.gz”
100%[==============================================================================================================================================>] 51,226 267K/s in 0.2s
2014-01-30 12:25:59 (267 KB/s) - “i7z-0.27.2.tar.gz” saved [51226/51226]
[root@hft1 i7z]# tar zxvf i7z-0.27.2.tar.gz
i7z-0.27.2/
i7z-0.27.2/MAKEDEV-cpuid-msr
i7z-0.27.2/put_cores_online.sh
i7z-0.27.2/i7z.c
i7z-0.27.2/i7z.h
i7z-0.27.2/put_cores_offline.sh
i7z-0.27.2/i7z_Dual_Socket.c
i7z-0.27.2/helper_functions.c
i7z-0.27.2/GUI/
i7z-0.27.2/GUI/i7z_GUI.cpp
i7z-0.27.2/GUI/compile_me.sh
i7z-0.27.2/GUI/i7z_GUI.pro
i7z-0.27.2/GUI/README_GUI.txt
i7z-0.27.2/GUI/Makefile
i7z-0.27.2/GUI/i7z_GUI.moc
i7z-0.27.2/COPYING
i7z-0.27.2/i7z_Single_Socket.c
i7z-0.27.2/i7z_rw_registers.rb
i7z-0.27.2/Makefile
i7z-0.27.2/cpuinfo.c
i7z-0.27.2/README.txt
i7z-0.27.2/doc/
i7z-0.27.2/doc/i7z.man
[root@hft1 i7z]#
[root@hft1 i7z]#
[root@hft1 i7z]# ls
i7z-0.27.2 i7z-0.27.2.tar.gz
[root@hft1 i7z]# cd i7z-0.27.2
[root@hft1 i7z-0.27.2]# ls
COPYING doc helper_functions.c i7z_Dual_Socket.c i7z_rw_registers.rb MAKEDEV-cpuid-msr put_cores_offline.sh README.txt
cpuinfo.c GUI i7z.c i7z.h i7z_Single_Socket.c Makefile put_cores_online.sh
[root@hft1 i7z-0.27.2]# make
rm -f *.o i7z
If the compilation complains about not finding ncurses.h, install ncurses (libncurses5-dev on ubuntu/debian)
cc -O3 -fno-schedule-insns2 -fno-schedule-insns -fno-inline-small-functions -fno-caller-saves -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DBUILD_MAIN -Wimplicit-function-declaration -Dx64_BIT -c -o i7z.o i7z.c
cc -O3 -fno-schedule-insns2 -fno-schedule-insns -fno-inline-small-functions -fno-caller-saves -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DBUILD_MAIN -Wimplicit-function-declaration -Dx64_BIT -c -o helper_functions.o helper_functions.c
cc -O3 -fno-schedule-insns2 -fno-schedule-insns -fno-inline-small-functions -fno-caller-saves -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DBUILD_MAIN -Wimplicit-function-declaration -Dx64_BIT -c -o i7z_Single_Socket.o i7z_Single_Socket.c
cc -O3 -fno-schedule-insns2 -fno-schedule-insns -fno-inline-small-functions -fno-caller-saves -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DBUILD_MAIN -Wimplicit-function-declaration -Dx64_BIT -c -o i7z_Dual_Socket.o i7z_Dual_Socket.c
cc -O3 -fno-schedule-insns2 -fno-schedule-insns -fno-inline-small-functions -fno-caller-saves -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DBUILD_MAIN -Wimplicit-function-declaration -Dx64_BIT -o i7z i7z.o helper_functions.o i7z_Single_Socket.o i7z_Dual_Socket.o -lncurses -lpthread -lrt -lm
Succeeded, now run sudo ./i7zUsing the Tool
Cpu speed from cpuinfo 3528.00Mhz
True Frequency (without accounting Turbo) 3528 MHz
Socket [0] - [physical cores=6, logical cores=6, max online cores ever=6]
CPU Multiplier 34x || Bus clock frequency (BCLK) 103.76 MHz
TURBO ENABLED on 6 Cores, Hyper Threading OFF
True Frequency 3631.76 MHz (103.76 x [35])
Max TURBO Multiplier (if Enabled) with 1/2/3/4/5/6 cores is 40x/39x/38x/37x/36x/36x
Current Frequency 3735.53 MHz (Max of below)
Core [core-id] :Actual Freq (Mult.) C0% Halt(C1)% C3 % C6 % Temp
Core 1 [0]: 3735.53 (36.00x) 100 0 0 0 73
Core 2 [1]: 3735.53 (36.00x) 100 0 0 0 74
Core 3 [2]: 3735.53 (36.00x) 100 0 0 0 76
Core 4 [3]: 3735.53 (36.00x) 100 0 0 0 70
Core 5 [4]: 3735.53 (36.00x) 100 0 0 0 77
Core 6 [5]: 3735.53 (36.00x) 100 0 0 0 80
Socket [1] - [physical cores=6, logical cores=6, max online cores ever=6]
CPU Multiplier 34x || Bus clock frequency (BCLK) 103.76 MHz
TURBO ENABLED on 6 Cores, Hyper Threading OFF
True Frequency 3631.76 MHz (103.76 x [35])
Max TURBO Multiplier (if Enabled) with 1/2/3/4/5/6 cores is 40x/39x/38x/37x/36x/36x
Current Frequency 3735.53 MHz (Max of below)
Core [core-id] :Actual Freq (Mult.) C0% Halt(C1)% C3 % C6 % Temp
Core 1 [6]: 3735.53 (36.00x) 100 0 0 0 71
Core 2 [7]: 3735.53 (36.00x) 100 0 0 0 72
Core 3 [8]: 3735.53 (36.00x) 100 0 0 0 72
Core 4 [9]: 3735.53 (36.00x) 100 0 0 0 69
Core 5 [10]: 3735.53 (36.00x) 100 0 0 0 64
Core 6 [11]: 3735.53 (36.00x) 100 0 0 0 68
C0 = Processor running without halting
C1 = Processor running with halts (States >C0 are power saver)
C3 = Cores running with PLL turned off and core cache turned off
C6 = Everything in C3 + core state saved to last level cache
Above values in table are in percentage over the last 1 sec
[core-id] refers to core-id number in /proc/cpuinfo
'Garbage Values' message printed when garbage values are read
Ctrl+C to exit