SONTAYA'P BLOGGER

IT Digital lifestyle

Sockets vs. Cores on a VMware VM Config?

bySONTAYA July 24, 2015 VMware

A question that I frequently receive is if there is a difference in virtual machine performance if the virtual machine is created with multiple cores instead of selecting multiple sockets?

Single core CPU

VMware introduced multi core virtual CPU in vSphere 4.1 to avoid socket restrictions used by operating systems. In vSphere a vCPU is presented to the operating system as a single core cpu in a single socket, this limits the number of vCPUs that can be operating system. Typically the OS-vendor only restricts the number of physical CPU and not the number of logical CPU (better know as cores).

For example, Windows 2008 standard is limited to 4 physical CPUs, and it will not utilize any additional vCPUs if you configure the virtual machine with more than 4 vCPUs. To solve the limitation of physical, VMware introduced the vCPU configuration options “virtual sockets” and “cores per socket”. With this change you can for example configure the virtual machine with 1 virtual sockets and 8 cores per socket allowing the operating system to use 8 vCPUs.

Just to show it works, I initially equipped the VM running Windows 2008 standard with 8 vCPU each presented as a single core.

00-8-virtual sockets

When reviewing the cpu configuration inside the Guest OS, the task manager shows 4 CPUs:

01-basic information

A final check by opening windows task manager verified it only uses 4 vCPUs.

02-windows task manager

I reconfigured the virtual machine to present 8 vCPU using a single socket and 8 number of cores per socket.

03-1socket

I proceeded to power-on the virtual machine:

04-task manager 8 vCPU

Performance impact

Ok so it worked, now the big question, will it make a difference to use multiple sockets or one socket? How will the Vmkernel utilize the physical cores? Might it impact any NUMA configuration. And it can be a very short answer. No! There is no performance impact between using virtual cores or virtual sockets. (Other than the number of usuable vCPU of course).

Abstraction layer

And its because of the power of the abstraction layer. Virtual socket and virtual socket are “constructs” presented upstream to the tightly isolated software container which we call a virtual machine. When you run a operating system it detects the hardware (layout) within the virtual machine. The VMkernel schedules a Virtual Machine Monitor (VMM) for every vCPU. The virtual machine vCPU configuration is the sum of number of cores x number of sockets. Lets use the example of 2 virtual socket 2 virtual core configuration.

05-vCPU-Stack

The light blue box shows the configuration the virtual machine presents to the guest OS. When a CPU instruction leaves the virtual machine it get picked up the Vmkernel. For each vCPU the VMkernel schedules a VMM world. When a CPU instruction leaves the virtual machine it gets picked up by a vCPU VMM world. Socket configurations are transparent for the VMkernel

NUMA

When a virtual machine powers on in a NUMA system, it is assigned a home node where memory is preferentially allocated. The vCPUs of a virtual machine are grouped in a NUMA client and this NUMA client is scheduled on a physical NUMA node. For more information about NUMA please read the article: “Sizing VMs and NUMA nodes” Although it’s a not covering the most current vSphere release, the basics remain the same.

To verify that the sockets have no impact on the NUMA scheduler I powered up a new virtual machine and configured it with two sockets with each 2 cores. The host running the virtual machine is a dual socket quad core machine with HT enabled. Providing 4 vCPUs to the virtual machine ensures me that it will fit inside a single NUMA node.

06-2cores

When reviewing the memory configuration of the virtual machine in ESXTOP we can deduct that its running on a single physical CPU using 4 cores on that die. Open the console, run ESXTOP, press M for memory view. Use V (capital v) to display on VM worlds only. Press F and select G for NUMA stats. You might want to disable other fields to reduce the amount of information on your screen.

07-ESXtop

The column, NHN identifies the current Numa Home Node, which in Machine2 case is Numa node 0. N%L indicates how much memory is accessed by the NUMA client and it shows 100%, indicating that all vCPUs access local memory. The column GST_ND0 indicates how much memory is provided by Node0 to the Guest. This number is equal to the NLMEM counter, which indicated the current amount of local memory being accessed by VM on that home node.

vNUMA

What if you have a virtual machine with more than 8 CPU (for clarity, life of a Wide NUMA starts at a vCPU count of 9). Then the VMkernel presents the NUMA client home nodes to the Guest OS. Similar to the normal scheduling, the socket configuration are also transparent in this case.

Why differentiate between sockets and cores?

Well there is a difference and it has to do with the Hot-Add CPU feature. When enabling the option CPU Hot Plug you can only increase the virtual socket count.

08-hot-add

In short using virtual sockets or virtual cores does not impact the performance of the virtual machine. It only effects the initial configuration and the ability to assign more vCPU when your Operating System restricts the maximum number of physical CPUs. Always check if your VM configuration is in compliance with the vendor licensing rules before increasing the vCPU count!

Source: //frankdenneman.nl, blogs.vmware

 

Configuring iSCSI connection using the vSphere 5.x software iSCSI initiator

จับตา! บริษัทสตาร์ทอัพใหม่ Color Genomics ใน Silicon Valley

Leave a Reply Cancel reply

You must be logged in to post a comment.

Tag Cloud

3G Android Backup Blognone Chromecast Cloud Comparison CUPS Dell DNS Facebook Firefox Firewall Google Guitar Hacked HP Joomla LGP500 LibreOffice Linux Mozilla Firefox OpenOffice.org Open Source OpenStack openSUSE openSUSE11.3 openSUSE12.1 Peplink Performance Postfix Printer Samsung Security Storage SUSE SUSE Enterprise Desktop SUSE Enterprise Server SUSE Linux Enterprise Switch Thin client Tips VMware WordPress WordPress/SMF

Comments

  • Narupon Pattapat on การ cleaning the imaging unit หรือ Drum (Imaging Unit)
  • 76Rusty on แอพ aVia Media Player Pro และ Pocket Casts 4 อนาคตอาจรองรับ Chromecast
  • JindaTheme on CloudFlare คืออะไร?
  • viva3388 on CloudFlare คืออะไร?
  • SONTAYA on Linux Foundation T-Shirt มาแล้ว

Categories

  • Android (7)
  • Joomla (9)
  • LibreOffice/OpenOffice.org (16)
  • Linux (159)
  • Music (16)
  • News (55)
  • Office (55)
  • Online Marketing (3)
  • Personal (232)
  • VMware (5)
  • WordPress/SMF (20)

Archives

  • May 2019
  • March 2019
  • January 2019
  • December 2018
  • September 2018
  • August 2018
  • July 2018
  • April 2018
  • March 2018
  • January 2018
  • December 2017
  • June 2017
  • December 2016
  • November 2016
  • April 2016
  • March 2016
  • February 2016
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • February 2015
  • January 2015
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009

Archives

  • May 2019 (1)
  • March 2019 (1)
  • January 2019 (1)
  • December 2018 (1)
  • September 2018 (1)
  • August 2018 (3)
  • July 2018 (1)
  • April 2018 (1)
  • March 2018 (1)
  • January 2018 (2)
  • December 2017 (1)
  • June 2017 (3)
  • December 2016 (1)
  • November 2016 (1)
  • April 2016 (1)
  • March 2016 (2)
  • February 2016 (1)
  • September 2015 (3)
  • August 2015 (2)
  • July 2015 (7)
  • June 2015 (5)
  • May 2015 (1)
  • April 2015 (1)
  • February 2015 (2)
  • January 2015 (1)
  • November 2014 (3)
  • October 2014 (2)
  • September 2014 (2)
  • August 2014 (1)
  • July 2014 (3)
  • June 2014 (3)
  • May 2014 (2)
  • April 2014 (5)
  • March 2014 (2)
  • February 2014 (5)
  • December 2013 (3)
  • November 2013 (15)
  • October 2013 (15)
  • September 2013 (11)
  • August 2013 (9)
  • July 2013 (26)
  • June 2013 (7)
  • May 2013 (15)
  • April 2013 (6)
  • March 2013 (5)
  • February 2013 (4)
  • January 2013 (2)
  • December 2012 (9)
  • November 2012 (2)
  • October 2012 (4)
  • September 2012 (2)
  • August 2012 (4)
  • June 2012 (3)
  • May 2012 (4)
  • April 2012 (6)
  • March 2012 (14)
  • February 2012 (9)
  • December 2011 (8)
  • November 2011 (6)
  • October 2011 (13)
  • September 2011 (7)
  • August 2011 (10)
  • July 2011 (4)
  • June 2011 (12)
  • May 2011 (26)
  • April 2011 (6)
  • March 2011 (3)
  • February 2011 (4)
  • January 2011 (10)
  • December 2010 (6)
  • November 2010 (4)
  • October 2010 (5)
  • September 2010 (10)
  • August 2010 (5)
  • July 2010 (8)
  • June 2010 (6)
  • May 2010 (4)
  • April 2010 (9)
  • March 2010 (10)
  • February 2010 (8)
  • January 2010 (21)
  • December 2009 (28)
Proudly powered by WordPress | Theme: Showme by NEThemes.