How to get CPU, Cache Info

This is a note on how to read the Intel CPU frequency, cache size, turboboost and other information in Linux environment.

  • cat /proc/cpuinfo will give you a lot of numbers.

However, you might get something like the following

model name : Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz

cpu MHz : 1200.878

 

  • lscpu  also gives you a lot of information

~$ lscpu

Architecture:          x86_64

CPU op-mode(s):        32-bit, 64-bit

Byte Order:            Little Endian

CPU(s):                48

On-line CPU(s) list:   0-47

Thread(s) per core:    2

Core(s) per socket:    12

Socket(s):             2

NUMA node(s):          2

Vendor ID:             GenuineIntel

CPU family:            6

Model:                 63

Stepping:              2

CPU MHz:               1201.464

BogoMIPS:              5001.61

Virtualization:        VT-x

L1d cache:             32K

L1i cache:             32K

L2 cache:              256K

L3 cache:              30720K

NUMA node0 CPU(s):     0-11,24-35

NUMA node1 CPU(s):     12-23,36-47

 

  • How to check Turbo boost / Frequency

It is somewhat inconsistent since it says 2.50 GHz above, and then 1200 MHZ below. The reason is that turbo boost is enabled so that when the machine is idle, its frequency is lowered to reduce power.

When the machine is running an application, it can go to 2.50 GHz.

With turbo boost enabled, the single thread can go up to 3.50 GHz, and 24 core execution can go up to 2.90 GHz. Single thread execution is faster because it doesn’t have to worry too much about power consumption when a large number of cores are available.

You can check the turboost info with

sudo turbostat -d  2&> /tmp/log

The log shows the maximum GHz you can get with different number of active cores.

cpu6: MSR_MISC_PWR_MGMT: 0x00400000 (ENable-EIST_Coordination DISable-EPB)

RAPL: 2185 sec. Joule Counter Range, at 120 Watts

cpu6: MSR_PLATFORM_INFO: 0x80c33f3811900

12 * 100 = 1200 MHz max efficiency frequency

25 * 100 = 2500 MHz base frequency

cpu6: MSR_IA32_POWER_CTL: 0x2b040059 (C1E auto-promotion: DISabled)

cpu6: MSR_TURBO_RATIO_LIMIT2: 0x00001d1d

29 * 100 = 2900 MHz max turbo 18 active cores

29 * 100 = 2900 MHz max turbo 17 active cores

cpu6: MSR_TURBO_RATIO_LIMIT1: 0x1d1d1d1d1d1d1d1d

29 * 100 = 2900 MHz max turbo 16 active cores

29 * 100 = 2900 MHz max turbo 15 active cores

29 * 100 = 2900 MHz max turbo 14 active cores

29 * 100 = 2900 MHz max turbo 13 active cores

29 * 100 = 2900 MHz max turbo 12 active cores

29 * 100 = 2900 MHz max turbo 11 active cores

29 * 100 = 2900 MHz max turbo 10 active cores

29 * 100 = 2900 MHz max turbo 9 active cores

cpu6: MSR_TURBO_RATIO_LIMIT: 0x1d1d1d1d1e1f2121

29 * 100 = 2900 MHz max turbo 8 active cores

29 * 100 = 2900 MHz max turbo 7 active cores

29 * 100 = 2900 MHz max turbo 6 active cores

29 * 100 = 2900 MHz max turbo 5 active cores

30 * 100 = 3000 MHz max turbo 4 active cores

31 * 100 = 3100 MHz max turbo 3 active cores

33 * 100 = 3300 MHz max turbo 2 active cores

33 * 100 = 3300 MHz max turbo 1 active cores

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s