VMware, Coreinfo and mapping logical CPU cores to physical processors.

Sometimes you may have a requirement due to licensing to ensure a Virtual Machine’s CPU configuration is perfectly set out in terms of “physical sockets”. Or perhaps you want to run an operating system such as Windows Server 2003 SE on your Virtual Machine. By default this VM would be limited to only use 4 cores because of the way VMware tells the operating system that each CPU has only 1 core per socket. (Giving it 4 x vCPUs would be the same as giving a physical Windows Server 2003 SE machine 4 x physical CPUs – the actual CPU limit). Either way, it can be quite useful to verify you have the correct CPU configuration.

Enter Coreinfo. This is a handy command line utility by Mark Russinovich which allows you to dump the information about your current CPU and cache configuration for Windows. Download the utility and execute the following command to gather information about the logical CPU core mapping to physical processor.

coreinfo.exe -c -s

In the case of a single socket, six core CPU (such as the one I have running here) this is the output you will see:

 

The Logical to Physical Processor Map information in the first section marks each CPU core with an asterisk (*). The next section, lists the Logical Processor to Socket mappings, indicating how many “processor sockets” your machine has and at which location each Processor Core is at (again marked with an asterisk).

 

If you had provisioned a VM with 4 x vCPUs by default, this would show up with 4 x Sockets and 4 x Physical Processors like so:


Besides being a limiting factor for Windows Server 2003 SE VMs when trying to use 8 x vCPUs (you can’t have more than 4 x “physical” CPUs), this may also be a potential issue with a socket licensed edition of SQL server for example, as you would now have 4 x sockets to worry about with your licensing.

 

So here is where VMware’s useful extra configuration parameters come in handy. These are basically bits of extra configuration you can add to your VMs, and are stored in your VM’s .vmx configuration file. By simply editing your VM, you can add a configuration option which specifies how many Cores per Socket there are. To do this using vSphere, power off your VM, then edit it’s settings. Go to the Options tab, then General, then Configuration Paramaters.

 

 

In this case I have a VM with 4 x vCPUs, which shows up by default with 4 x processor sockets. I want this to be 4 x cores with 1 x socket. So now I would click “Add Row” and in the first empty column, enter: cpuid.coresPerSocket and use 4 as the value in the second column. See this screenshot for specifics (and adjust the value used depending on your desired configuration):

 

 

Power up your VM, and run coreinfo again, using

coreinfo.exe -c -s

 

You should now see that VMware is assigning 4 CPU cores per “Physical CPU socket”. In other words, your VM now has 1 x “physical” processor socket, and 4 x cores. Meaning your single processor application socket is now valid on this VM. Here is the result of assigning my VM a value of 4 for “cpuid.coresPerSocket” when it uses 4 x vCPUs in vSphere:

 

 

As you can now see, it has changed from the original configuration where it had 4 x Sockets listed under “Logical Processor to Socket Map” with a “Physical Processor” for each “Socket”, to showing the 4 x “Physical Processors” all on “Socket 0”.

 

If you are using VMware Workstation, this configuration is easy to do – just edit your VM settings, and look for the dropdown menu under the CPU configuration – change this to how many Processors you want and how many Cores per Processor you will use. (See the screenshot below for an example of 2 x Sockets with 2 x cores per socket):

 

 

Well, that is a brief overview of how to look at your Processor configuration (whether you are using a physical machine or a Virtual Machine), and how to change your CPU socket / core configurations using VMware vSphere or Workstation. The two uses I can think of as stated above are for licensing issues, or issues where you are being limited by what your guest OS can handle in terms of physical CPUs. Feel free to chime in, in the comments below if you can think of any other uses this may have, or if spot a mistake anywhere!

Problems using vmotion to move VMs between ESX hosts with different CPUs

When VMs are used on new ESX servers the CPU mask maybe left over from the ESX server that they were previously used on. This can cause problems when VMotioning to new ESX servers that have slightly different CPU/s. To get around this issue, we need to reset the CPU mask as part of the process when moving any VMs over to a different host / cluster.

The following explains how to reset the CPU Identification Mask to avoid this issue:

1) Shutdown the problem VM
2) From the VMWare Infrastructure client, go to “Edit Settings” (From the summary tab) on the VM in question.
3) Select the “Options” tab
4) Select “CPUID Mask” under the “Advanced” section
5) Click the “Advanced” button
6) Click “Reset All to Default” button
7) Click “OK” on all forms to apply the change.

You should now *hopefully* be able to VMotion this Virtual Machine across seeing as though the CPUID Mask has been reset to defaults – I would imagine that this gets reconfigured depending on what CPU the VM finds when it starts up again.

Drop any comments or additional information in the comments section below.

E8400 Gaming rig build

This is an old post from my other site. I thought as it was IT relevant I would clone the small write up I did across to this blog…

I recently bought myself a new rig, consisting of a Coolermaster CM-690 and the following hardware:

Asus P5Q P45 Pro motherboard
Intel E8400 overclocked to 3.6GHz 24/7
OCZ 2GB ATI Heatspreader RAM DDR800 4-4-4-12
Sapphire ATI HD 4870 512MB GDDR5 Graphics card
OCZ GameXstream 600w Power supply
Western Digital 750GB SATAII Hard drive
Logitech G15 Keyboard (orange backlight model)
Logitech MX518 (5 year old mouse that has travelled the world with me!)

For display I chose a 24″ Dell LCD with a native resolution of 1920×1200 and 6ms response time.

My ultimate goal was to build a faster, cooler and quieter PC than the previous one I had in S.A.

Right, so in my last rig I had the pre-built CM-690 L-shaped window panel. This came with the chassis when I bought it, so I was pretty lazy and didn’t change anything. I also had a Coolermaster Aquagate watercooling unit that fitted in 2 x optical drive bays, which had the pump, radiator and everything incorporated, cooling my E8200 on the old rig. Temperatures were not much better than the Zalman 9700LED that I used to have on it and it was quite messy. I also didn’t enjoy the tiny tubing that this unit used, hence my custom kit choice with 1/2″ diameter tubing for this project. I had never built myself a custom watercooling system, so this will be my first. It will also be the first batch of modding I have done in about 10 years! (The last mod I did was on an AMD K6-2 333MHz in an AT case many, many years ago)! That is barring some odd LED, and minor case mods here and there.

Anyway, here is an image of the final product (Case cut, window installed, hardware assembled and modded to fit the watercooling gear. Cables neatened and basically everything finished, barring the watercooling of the graphics card.

final-1

night-shot

I cut a rough pattern out of the top with my jigsaw, this is where the radiator is to be fit:

case-cut

I cabled-sleeved most of the loose / visible wiring throughout the chassis:

cable-sleeving

Next to be cut was the side panel – Masked off the area to be cut, and used the jigsaw once again:

perspex

This is the box of goodies (watercooling hardware) I ordered from Specialtech:

goodies

The waterblock for cooling the CPU:

cpu-block

Shortly after finishing the water components, and tubing, I started the system up for leak testing…

test-run

A few weeks later the graphics card was ready to be added to the watercooling system. This is a Sapphire ATI HD 4870 512MB (GDDR4) card. I had to remove the stock air cooler, and re-apply some new thermal compound. I used Zalman STG-1 thermal paste for this.

4870-air

Here the card is naked, with the old thermal compound applied to the GPU. The card still needed to be cleaned with some pure alcohol to remove the old thermal paste.

4870-naked

Everything installed, Feser one non-conductive cooling fluid in the loop with the system up and running :

final-2

A small update on this build.

Since the original work was finished, I have now upgraded the RAM. I added another 2GB OCZ RAM to give a total of 4GB. I also pushed my original overclock a bit further, and now run the FSB at 445MHz with a CPU multiplier of 9x giving me a total of 4.0GHz on the E8400. The RAM is running a multiplier of 2x overclocking the four modules to 890MHz each, with timings of 4-4-4-12. My Vcore setting for the processor is on around about 1.375 volts, and my RAM is sitting at 2.2 volts which is what I consider a safe 24/7 setting for RAM modules cooled by passive heatsinks. The FSB is set to 1.16 volts for the increase FSB speed to hold stable. I also flashed the 4870’s bios with a custom image, that sets the card’s default core speed to 795mhz (from a default of 750mhz) and the memory to 1100mhz (from a default of 900mhz). I then use Catalyst Control Centre to up the core speed to a further 830mhz for gaming. The PC now runs at these speeds 24/7 and has no stability issues.