Do you know how many cores your server has ?

27 Mar

Do you know how many cores your server has ? If you don’t have answer to this, then probably you should get this information internally from concerned team before you present your load testing results to the stakeholders or read this post.Its very essential piece of information which hardly any performance engineer can ignore.

Ok I understand  sometimes for various reasons, it so happens during load testing engagements that performance team is often unaware about the capacity of the hardware infrastructure like number of CPU’s the server has, network capacity etc.Without this information it really becomes hard to conclude meaningful outcome about the test results.However there are ways, where in we can collect all these information ourselves.So let me share with you a  quick tip as how to collect information about number of CPU’s associated with the servers namely Windows/Solaris.

Windows Task Manager is one of the best tools which will give you the information about the number of cores your server has on the box. All you need to do is,go to command prompt, and type taskmgr or  get inside the taskmanager window.


The 4 Histograms in the above picture tells me that I have 4 CPU cores in my laptop.Each Histogram represents a single core in the box.So if you have N histograms, it often means you have N cores on that box.

We can also check the same information by going to cmd prompt and typing msconfig.Once inside the system configuration section, click on Boot tab and then Advanced options.The dropdown list will show you the number of processor server has.(Please note that on server machine, you might or might not have access to msconfig,but you can always ask person who has access to check this for you)



In addition to above methods, we can also use the process explorer to get this information,Just install process explorer and then go to view menu and get system information, over here you should be seeing the similar screen as seen in windows task manager.Please ensure that you select “Show one graph per CPU” option.


Sometimes for some databases(rare case as per my exposure) like Oracle/MS SQL depending on the license type, we might have to dig deeper to understand the relation between NUMA Mode/Socket/Logical CPU/Core/Hyper threading.So here is the thumb rule which I picked up from Microsoft MSSQL Team some years back,

CPU Socket – Actual holder of physical CPU, Multicore

CPU Core (Core) – Single physical CPU, can be part of a package placed in a given socket. Dual or multiple cores depending on packaging might or might not share L2 cache.

Logical CPU (Logical thread, Hyper thread) – a single logical CPU that has its own set of dedicated components on physical CPU but shares the rest of physical CPU, Core, with another logical CPUs.

NUMA Node – a set of CPU Sockets packaged together with a block of dedicated memory. A Node might consist of one CPU Socket.

So based on above, NUMA Node contains Sockets, Sockets contain Cores, and Cores contain Logical CPUs. For example, the number of CPUs output by Windows in Task Manager or PerfMon can be calculated by Nodes*Sockets*Cores*LogicalCPUs. For example for single node system with two sockets, two cores per socket, and two logical CPUs, OS will show 1*2*2*2 = 8 CPUs.

For Solaris box, the below command will give you the information about CPU and associated cores with it.You can get the more information on this command by referring the man pages(Below is copied extract from Man pages)

psrinfo –pv

psrinfo displays information about processors. Each physical
processor may support multiple virtual processors. Each virtual processor is an entity with its own interrupt ID, capable of executing independent threads.Without the processor_id operand, psrinfo displays one line for each configured processor, displaying whether it is on-line, non-interruptible (designated by no-intr), spare,off-line, faulted or powered off, and when that status last changed. Use the processor_id operand to display information about a specific processor. See OPERANDS.


The following options are supported:

-s processor_id
Silent mode. Displays 1 if the specified processor is fully  on-line,  and  0  if the specified processor is non-interruptible, off-line, or powered off.Use silent mode when using psrinfo in shell scripts.


Display the number of physical processors in a system.When combined with the -v option, reports  additional information about each physical processor.


Verbose mode. Displays  additional  information about the  specified  processors, including: processor type,floating point unit type and clock speed.If any of this information   cannot be determined,psrinfo displays unknown.

When combined with the -p option,reports additional information about each physical processor.

The following operands are supported:

processor_id – The processor ID of the processor about which information is to be displayed.

Hope this helps.

Technorati Tags: ,
About these ads

Leave a Reply

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

You are commenting using your 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 )

Google+ photo

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

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: