Wednesday, July 1, 2015

Myths of Processing - CPU Scheduling

Always when i start to do performance analysis, i always get bogged down by  Procesors, Core and Virtualization. In this post, I have tried to understand the performance impact in general. Although, the overall performance of any processes depends upon other factors  such as CPU intensive, I/O Intensive or Network I/O intensive, This post is focused more on CPU operations and how different operating systems and Virtualization layer manage the CPU resources.

CPU scheduling is one of most critical and important part of the system software. Not all operating systems are equal, it is one of the key metrics that distinguished the operating systems in terms of it's performance - which is largely guided by CPU's operations. Also, when the application is written, how it is going to use the multicore and multiprocessor should also be the part of the discussion.

Due to the availability of the different types of milt-processors in terms of number of processors and number of cores, the processing power of the computers has increased dramatically. But does all the programs and operating systems really benefits from increasing the cores and processors ? - It needs more scientific explanation and is largely guided by the design of the operating systems.

For example windows 2003 is limited up-to four CPU's. However, it can take advantage of cores, if you quad processors, it can go upto 16 cores. If it has a dual core, the windows can run upto 8 cores.

Virtual CPUs (vCPU) in VMware virtual machines appear to the operating system as single core CPUs. So, just like in the example above, if you create a virtual machine with 8 vCPUs (which you can do with vSphere) the operating system sees 8 single core CPUs. If the operating system is Windows 2003 Standard Edition (limited to 4 CPUs) it only runs on 4 vCPUs ( source Vmware knowledge base).

But this configuration can be overwritten by adding cpuid.coresPerSocket in configuration file of Vmware (.vmx) file

This is a very good article that specifically talks on configuring this parameter in  Vmware Vsphere.