Solved

Relation between time(in ms) and processing capacity (in MHz) for KVM virtual machine

Posted on 2014-09-06
11
252 Views
Last Modified: 2015-01-03
I am using KVM as virtualization. Created a windows 7 VM and allocated 1 CPU to it.
Now going through the link http://libvirt.org/formatdomain.html#elementsCPUTuning , I want to limit the CPU utilization using quota, share and period .

Any one who can help me in understanding the values of quota in ms which could be converted to MHz ?
Rephrashing my question , If I have to set 496MHz CPU limitation ,what exact value I should be placing it in Quota ?
If you know how its being calculated, please share the method of calculation ?
0
Comment
Question by:Ratnesh Mishra
  • 5
  • 4
11 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 40309350
and windows 7 requires gigahertz or better
0
 
LVL 8

Author Comment

by:Ratnesh Mishra
ID: 40309479
Okay , Gheist , if that suits you . I am rephrasing it   If I have to set 1.2GHz CPU limitation ,what exact value I should be placing it in Quota ?
My hardware have processor 3.2GHz capacity , 6 Core . So in virtualized [KVM] environment how should I be able to limit VM's processing capacity ? How can I confirm that CPU limitation has been implemented ?
0
 
LVL 62

Expert Comment

by:gheist
ID: 40309484
those parameters are to guarantee particular resource to guest.
0
Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

 
LVL 8

Author Comment

by:Ratnesh Mishra
ID: 40309491
Let me put the extract from the link provided above :
period  : The optional period element specifies the enforcement interval(unit: microseconds). Within period, each vcpu of the domain will not be allowed to consume more than quota worth of runtime.
quota : The optional quota element specifies the maximum allowed bandwidth(unit: microseconds).

This will help you in understanding more that the CPU tuning parameters are for enforcing the limit provided in terms of the values. However I need to know what value in microsecond represent processing capacity in Hz or KHz or MHz or GHz. ? What formula leads you to the value and which tool justify that the limit in the VM has not crossed ?
0
 
LVL 62

Expert Comment

by:gheist
ID: 40309504
quota/period = guest GHZ/host ghz
0
 
LVL 8

Author Comment

by:Ratnesh Mishra
ID: 40309570
Within period, each vcpu of the domain will not be allowed to consume more than quota worth of runtime.

Above extract explains that Quota is the maximum bandwidth allocated for the period. In other word , Quota is the bandwidth allocated for example 1GHZ and period is the time duration for example 5 sec . So overall VM's CPU under this limitation will not consume 1GHz in 5 sec or in average 1024/5 = 204.8 MHz per sec , this example is just for your understanding , please feel free to correct me if I understood it wrongly.   [Regarding average 204.5 MHz ,its KVM kernal mainting the CPU cycle so in real at kernal level it will be considered as wrong, however my intention is just to give an idea about period and quota].
0
 
LVL 8

Accepted Solution

by:
Ratnesh Mishra earned 0 total points
ID: 40522245
Hello All ,

I am putting my research so that it may help others and save time. quota and period in ratio gives you the privilege to utilize the processing capacity of a processor.
Let me explain so that it may be easy to understand :-

[Hypothetical example but realistic approach] If I have processor dual core with 1GHz processing capacity.
Based on the information we have total actual processing capacity of 2 GHz to utilize in VMs.

Now I have created a VM with 1 vCPU without any limitation on processing capacity. It will use 1GHz of processing capacity at maximum when required.
Now if you want to limit the processing capacity of this VM upto maximum of 50 %  i.e. 512MHz .
We can achieve it by maintaining the quota and period ratio. For example if we put Period as 1,00,000 and Quota as 50,000  we will be able to limit the processing capacity .
So in general , you can fix the period as 1,00,000 and change the value from 99,000 to 10,000 in order to limit the processing capacity from 99% to 10% .

Additional information :-
You may change the period to any number say X which should be less than 1,00,000 and can use the quota in respect with the same number to achieve the desired processing capacity.

Note : Since KVM doesn't allow us to calculate the processing capacity at very discrete level however by using the above condition you can achieve up to 90-95% accuracy in terms of allocating processing capacity.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40522694
Usually you run short in IOPS first and RAM causes pain next. I can hardly imagine CPU-demanding workload that you might put in so many machines that others notice...
0
 
LVL 8

Author Closing Comment

by:Ratnesh Mishra
ID: 40528921
This is what I have concluded from my research work and is very true on implementation. As the same formula is implemented on the production VMs after through research.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an issue that we can get adding / removing permissions in the vCSA 6.0. We can also have issues searching for users / groups in the AD (using your identify sources). This is how one of the ways to handle this issues and fix it.
A clone is a duplicate copy. Sheep have been cloned and maybe someday even people will be cloned, but disk cloning (performed by the hard drive cloning software) is a vital tool used to manage and protect data. Let’s look at what hard drive cloning …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In this video tutorial I show you the main steps to install and configure  a VMware ESXi6.0 server. The video has my comments as text on the screen and you can pause anytime when needed. Hope this will be helpful. Verify that your hardware and BIO…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question