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
Solved

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

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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.
Last article we focus in how to VMware: How to create and use VMs TAGs – Part 1 so before follow this article and perform the next tasks, you should read the first article how to create the TAG before using them in Veeam Backup Jobs.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

856 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