Solved

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

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

Expert Comment

by:gheist
ID: 40309484
those parameters are to guarantee particular resource to guest.
0
 
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 61

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 61

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

If your vDisk VHD file gets deleted from the image store accidentally or on purpose, you won't be able to remove the vDisk from the PVS console. There is a known workaround that is solid.
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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‚Ķ

863 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

19 Experts available now in Live!

Get 1:1 Help Now