Thanks in advance
Aravind
Consider that I am assigning 7vCPUs, will that still be a problem ?
That should help -
Also the reason I am setting cpu reservation values is that i want to make sure that CPU is being guranteed for that VM, actually we are migrating the DB Server from Physical to Virtual , I want to make sure that resources are available for the DB Server.
That is the correct use of reservationis - my comment was more of a reminder of if you set resrvatrions to all the VMs on your host you will come to point will you will not be able to power on additional VMs even though there might be available resources -
Regarding your comment start with fewer vCPU and add more if needed , for DB Servers which we are migrating from physical to virtual and know that desired capacity is needed , how do we apply that concept of fewer vCPU and and more vCPU when desired ? Please guide me on the same.
Have you looked at the CPU consumption on the physical boxes? Just because teh physical box has 8 cores does note mean you will need 8 vCPUs and also keep in mind you will are probably moving to a much faster CPUs. The added benefit as you set up the new VM is if 4 cores is not sufficient adding additional cores is an easy operation-
Are you sure about that 10000 Mhz ? I don't think you can calculate the speed of cores in this manner. But, I may be wrong. Will love to hear, what people have to say about it.
Hi ,
What I meant to say is that, for the VM I will set the number of CPUs to 8 and Resources tab setting , I will set the CPU Reservation and Limit values to 10000 Mhz. Is that not reasonable to set?
I don't want to hijack your thread. I dont think the calulation of cores and the figure of 8*2.6 Ghz = 20.8 Ghz is correct way. But, I may be wrong.
Normally, I have seen we start with less and add more vCPU as needed. Trying a VM with 8 vCPU does not makes much sense to me.
Welcoem to the community -A few things to point out -
Hi,
Consider that I am assigning 7vCPUs, will that still be a problem ?
Also the reason I am setting cpu reservation values is that i want to make sure that CPU is being guranteed for that VM, actually we are migrating the DB Server from Physical to Virtual , I want to make sure that resources are available for the DB Server.
Regarding your comment start with fewer vCPU and add more if needed , for DB Servers which we are migrating from physical to virtual and know that desired capacity is needed , how do we apply that concept of fewer vCPU and and more vCPU when desired ? Please guide me on the same.
Thanks in advance
First of all, it is not recommended to use limits in esx environment, it will affect your performance
For VCPUs refer
http://communities.vmware.com/docs/DOC-4960
http://www.vmware.com/pdf/vsmp_best_practices.pdf
http://www.yellow-bricks.com/2008/07/07/multiple-virtual-cpu-vms/
http://www.boche.net/blog/index.php/2011/05/21/co-scheduling-visualized/
http://blog.scottlowe.org/2008/06/30/vmware-esx-cpu-scheduling-information/
So in theory, giving more Vcpus dont give higher performance, example - if you give 4 vcpus to a vm, and that vm is using around 40 % or 60 % on peak time, for the same vm if you give 2 Vcpus and that vm us using around 90 % on peak time - this setup will give more performance than the 4 vcpu one.
Because of the co-scheduling, vmkerel has to wait and allocate time for each extra VCPU assingned to a VM.
as suggested by weinstein5
give only 1 vcpu and add later, first you need to have a capacity planner report of the entire work load of the physical server, what is the CPU memory usage etc. Then give 2 or 4 vcpus for DB server, again based on the current usage.
Also dont count the virtual cores given by the HT, HT dont give higher performance, on production it is recommended and best practice that, take the count of physical cores only and accomodate that many vms, if you have 20 cores, 20 vms with 1 vcpus each, HT just makes the processor busy with the instructions.
Entire concept of CPU and Memory management is too complex, so simple rule is give 2 vcpus to the db and monitor its activity and later give additional vcpus. Setting reservation for this DB vm is good so that it will always get the CPU resource. Also you can use CPU shares for the other less critical VMS in the esx host,
Consider that I am assigning 7vCPUs, will that still be a problem ?
That should help -
Also the reason I am setting cpu reservation values is that i want to make sure that CPU is being guranteed for that VM, actually we are migrating the DB Server from Physical to Virtual , I want to make sure that resources are available for the DB Server.
That is the correct use of reservationis - my comment was more of a reminder of if you set resrvatrions to all the VMs on your host you will come to point will you will not be able to power on additional VMs even though there might be available resources -
Regarding your comment start with fewer vCPU and add more if needed , for DB Servers which we are migrating from physical to virtual and know that desired capacity is needed , how do we apply that concept of fewer vCPU and and more vCPU when desired ? Please guide me on the same.
Have you looked at the CPU consumption on the physical boxes? Just because teh physical box has 8 cores does note mean you will need 8 vCPUs and also keep in mind you will are probably moving to a much faster CPUs. The added benefit as you set up the new VM is if 4 cores is not sufficient adding additional cores is an easy operation-
So, is it advisable to give the CPU shares to make sure this VM gets preference over others, instead of adding more CPUS
Please review my recent blog on the topic as it covers your question in detail.
http://joshodgers.com/2012/07/22/common-mistake-using-cpu-reservations-to-solve-cpu-ready/
Also beware of oversizing VMs, see the below.
http://joshodgers.com/2012/07/25/vm-right-sizing-an-example-of-the-benefits/
IMHO, If it's a DB server, focus on the disk IOPS first, then the CPU. Start with 4vCPU's and tune your disk IOPS for best performance.
DB servers are disk intensive and poor queries are CPU intensive AND disk intensive. Your bottleneck will be your disk.
The CPU scheduler does a good job at managing cpu cycles. Just don't have Hyperthreading turned on.
Thanks
Hi COS,
Any particular reason on why u dont want hyperthreading to be enabled??