Solved

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

Posted on 2014-09-06
11
238 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 61

Expert Comment

by:gheist
Comment Utility
and windows 7 requires gigahertz or better
0
 
LVL 8

Author Comment

by:Ratnesh Mishra
Comment Utility
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 61

Expert Comment

by:gheist
Comment Utility
those parameters are to guarantee particular resource to guest.
0
 
LVL 8

Author Comment

by:Ratnesh Mishra
Comment Utility
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 61

Expert Comment

by:gheist
Comment Utility
quota/period = guest GHZ/host ghz
0
 
LVL 8

Author Comment

by:Ratnesh Mishra
Comment Utility
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
Comment Utility
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 61

Expert Comment

by:gheist
Comment Utility
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
Comment Utility
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

What do we know about Legacy Video Conferencing? - Full IT support needed! - Complicated systems at outrageous prices! - Intense training required! Highfive believes we need to embrace a new alternative.
David Varnum recently wrote up his impressions of PRTG, based on a presentation by my colleague Christian at Tech Field Day at VMworld in Barcelona. Thanks David, for your detailed and honest evaluation!
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now