Solved

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

Posted on 2014-09-06
11
257 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

 
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

A look into Log Analysis and Effective Critical Alerting.
Giving access to ESXi shell console is always an issue for IT departments to other Teams, or Projects. We need to find a way so that teams can use ESXTOP for their POCs, or tests without giving them the access to ESXi host shell console with a root …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

623 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