- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm guessing we have completely the wrong idea here, but anyway...
we're evaluating ESX on a quad core CPU machine. Now, what we were hoping is that by presenting a VM with one vCPU, it would effectively be able to use all 4 cores at once, but looking at the performance while running a CPU intensive task, it's only using 2400Mhz as opposed to the 9600 I was hoping/expecting.
The application I am testing isn't multi-core "aware" as such, hence the question.
Can Vmware be made to do this? Reading the overview of Virtual SMP it sounds like maybe it can, but perhaps I'm misunderstanding things...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
VMware virtualizes away the underlying hardware. So, if you give the VM a single CPU, then it will run on only one core in the chip. The VM Does not see the entire chip, so it cannot see all cores. If your VM needs to use multiple cores, then it will need to be set for Virtual SMP if you have it.
The reason it is done like this is so that if you had, say, 4 VMs on the machine, each would have its own core. It is more efficent that way.
So, to answer your question, VMware treats a core as an individual CPU when virtualized.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just rememebr a vCPU runs only on a single core at a time -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, thanks for two (helpful) answers - I'm assuming this really means that to get the benefit of all 4 cores an application would still need to be multi-core aware then, it would need to be presented with 4 vcpu's (which is effectively the 4 real cores). As an example, I have used 3D Studio Max on a quad core before, and when Rendering, all 4 cores go up to 90-100% cpu usage. It's nice and fast. Here in the office we often run database conversions using our own software, but as it's not multi-core available, it only ever puts one core to 90-100% usage, while the other 3 sit almost idle. Sounds like a VM would behave the same...?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is correct - the application and O/S both need to be multithreaded to take advantage of multipl vCPUs in a SMP VM - in fact if they are not you can adversely affect the performance of the VM by configuring a non-multithreaded O/S and/or application on a virtual SMP VM - this has to do with the way the VMKERNEL schedules the vCPU on the physical cores - all vCPUs are scheduled simultaneously - so it is easier to schedule a single vCPU instead of 2 or 4 vCPUs -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the explanation - shame it doesn't quite do what we hoped; the performance on our test VM is still way above that of our physical server running at the same no. of Mhz though... !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you search the forums, you will find many (and I do mean many!) discussion on this exact topic. Basic rules of thumb:
- Create your VMs with one vCPU, make sure you use the uni-processor HAL
- If your VM can REALLY USE additional CPUs (i.e. 3D Studio Max, a busy database or similar), then add vCPUs incrementally until you achieve acceptable performance. Remember...creating even one vSMP VM will have a negative impact on the performance of ALL other VMs running on your host (search for vSMP and schedule) - AND it impacts the number of VMs you can run in an HA cluster (search for HA and SLOT).
- After updating your VM to vSMP, make sure you update the HAL on your guest OS to be multi-processor aware
Ken Cline
Technical Director, Virtualization
VMware Communities User Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Keep in mind that VMware is designed to consolidate servers, so it is excellent for taking a number of systems that are under utilized and placing them on a single piece of hardware, and then managing resources so that the VMs can "share" those resources.
If you have an application that is extremely intesive, it may not be a good candidate for virtualization. Ken makes a very good point about adding additional CPUs. Also, in general, you want to have vSMP VMs running on seperate machines from single-core VMs. However, it sounds like you are not running multiple ESX servers at this point anyways.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's all fair enough - primarily, we are looking at server consolidation, I think the "multiple cpu" thing was more idle curiosity for when we do have tasks like that... very helpful information from you all though. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is Mr. Flibble's statement (20 Mar 2008 10.23 AM) "Keep in mind that VMware is designed to consolidate servers, ..." correct?
Because we are planning to consolidate many applications on SQL-level, this means SQL on a VM with 4 vCPUs and lots of memory. When the above statement is correct, this is not the way to go.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how many cores are you going to have in your Physical host? if you have a large amount of cores ie one of the new Quad way /quad cores servers then you may be able to have enough resourses available to guarantee the 4 cores needed to run a 4vCPU server,
personally I would go with serveral lower spec Guests and spread the SQL load amounst the Host Farm. that way you would not be running into CPU scheduling issues.
Tom Howarth
VMware Communities User Moderator
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tom, you wrote "personally I would go with serveral lower spec Guests and spread the SQL load amounst the Host Farm.", but our SQL DBA-ers like to consolidate on SQL-level, because this make the management of SQL easier, they said. Is this realy true, I don`t know?
They prefer huge physial MSCS environments with SQL running many instances. But our company policy is to virtualise everything unless .....
I'm looking for arguments not go physical for SQL.
When can we expect VMWare to support more than 4 vCPUs per VM? 2009?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
at the end of the day this comes down to what the management say. you say that the management focus is to virtualise as much as posible. then there needs to be some give and take on both sides.
It is a fact that from a DBA point of view Less hosts, more instances make for eaiser management, in fact by the using instances you are infact virtualising the SQL level (ie fooling the DB into thinking it has its own resource when in reality it is sharing it with other SQL instances).
if you ramp up the Guests with 4vCPU you could/Will run into CPU scheduling issues. thereby reducing performance of your DB's by keeping your SQL servers leaner by scalling out not up and not having that many instances per host and using single or dual vCPU guests you will get a better over all performance. however performance will not be as good a bare metal.
do your capacity planning and sizing and test test test. Remember not all services are good candidates for virtualisation. even if you virtualise 40% of your DB,s that will be a consideralbe saving. also you can still do MSCS, but you will lose the ability to VMotion and participate in DRS/HA.
Tom Howarth
VMware Communities User Moderator
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410