public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Chris Wright <chrisw@sous-sol.org>
Cc: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>,
	kvm@vger.kernel.org, Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)
Date: Fri, 03 Dec 2010 12:55:53 -0600	[thread overview]
Message-ID: <4CF93D39.9010100@codemonkey.ws> (raw)
In-Reply-To: <20101203182015.GG10050@sequoia.sous-sol.org>

On 12/03/2010 12:20 PM, Chris Wright wrote:
> * Anthony Liguori (anthony@codemonkey.ws) wrote:
>    
>> On 12/03/2010 11:58 AM, Chris Wright wrote:
>>      
>>> * Srivatsa Vaddagiri (vatsa@linux.vnet.ibm.com) wrote:
>>>        
>>>> On Fri, Dec 03, 2010 at 09:29:06AM -0800, Chris Wright wrote:
>>>>          
>>>>> That's what Marcelo's suggestion does w/out a fill thread.
>>>>>            
>>>> There's one complication though even with that. How do we compute the
>>>> real utilization of VM (given that it will appear to be burning 100% cycles)?
>>>> We need to have scheduler discount the cycles burnt post halt-exit, so more
>>>> stuff is needed than those simple 3-4 lines!
>>>>          
>>> Heh, was just about to say the same thing ;)
>>>        
>> My first reaction is that it's not terribly important to account the
>> non-idle time in the guest because of the use-case for this model.
>>      
> Depends on the chargeback model.  This would put guest vcpu runtime vs
> host running guest vcpu time really out of skew.  ('course w/out steal
> and that time it's already out of skew).  But I think most models are
> more uptime based rather then actual runtime now.
>    

Right.  I'm not familiar with any models that are actually based on 
CPU-consumption based accounting.  In general, the feedback I've 
received is that predictable accounting is pretty critical so I don't 
anticipate something as volatile as CPU-consumption ever being something 
that's explicitly charged for in a granular fashion.

>> Eventually, it might be nice to have idle time accounting but I
>> don't see it as a critical feature here.
>>
>> Non-idle time simply isn't as meaningful here as it normally would
>> be.  If you have 10 VMs in a normal environment and saw that you had
>> only 50% CPU utilization, you might be inclined to add more VMs.
>>      
> Who is "you"?  cloud user, or cloud service provider's scheduler?
> On the user side, 50% cpu utilization wouldn't trigger me to add new
> VMs.  On the host side, 50% cpu utilization would have to be measure
> solely in terms of guest vcpu count.
>
>    
>> But if you're offering deterministic execution, it doesn't matter if
>> you only have "50%" utilization.  If you add another VM, the guests
>> will get exactly the same impact as if they were using 100%
>> utilization.
>>      
> Sorry, didn't follow here?
>    

The question is, why would something care about host CPU utilization?  
The answer I can think of is, something wants to measure host CPU 
utilization to identify an underutilized node.  One the underutilized 
node is identified, more work can be given to it.

Adding more work to an underutilized node doesn't change the amount of 
work that can be done.  More concretely, one PCPU, four independent 
VCPUs.  They are consuming, 25%, 25%, 25%, 12% respectively.  My 
management software says, ah hah, I can stick a fifth VCPU on this box 
that's only using 5%.  The other VCPUs are unaffected.

However, in a no-yield-on-hlt model, if I have four VCPUs, they each get 
25%, 25%, 25%, 25% on the host.  Three of the VCPUs are running 100% in 
the guest and one is running 50%.

If I add a fifth VCPU, even if it's only using 5%, each VCPU drops to 
20%.  That means the three VCPUS that are consuming 100% now see a 25% 
drop in their performance even though you've added an idle guest.

Basically, the traditional view of density simply doesn't apply in this 
model.

Regards,

Anthony Liguori

> thanks,
> -chris
>    


  reply	other threads:[~2010-12-03 18:55 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-02 13:59 [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2) Anthony Liguori
2010-12-02 14:39 ` lidong chen
2010-12-02 15:23   ` Anthony Liguori
2010-12-02 15:23   ` Anthony Liguori
2010-12-03  9:38     ` Avi Kivity
2010-12-03 11:12       ` Srivatsa Vaddagiri
2010-12-03 23:28       ` Anthony Liguori
2010-12-02 17:37 ` Marcelo Tosatti
2010-12-02 19:07   ` Anthony Liguori
2010-12-02 20:12     ` Marcelo Tosatti
2010-12-02 20:51       ` Anthony Liguori
2010-12-03  9:36         ` Avi Kivity
2010-12-03 22:45           ` Anthony Liguori
2010-12-04  8:13             ` Avi Kivity
2010-12-04 13:30               ` Anthony Liguori
2010-12-06  8:28                 ` Avi Kivity
2010-12-06  8:35                   ` Avi Kivity
2010-12-06 13:58                     ` Anthony Liguori
2010-12-06 14:01                       ` Avi Kivity
2010-12-06 14:02                         ` Avi Kivity
2010-12-06 14:08                           ` Anthony Liguori
2010-12-06 14:14                             ` Gleb Natapov
2010-12-06 14:03                         ` Anthony Liguori
2010-12-06 14:33                           ` Avi Kivity
2010-12-06 15:07                             ` Anthony Liguori
2010-12-06 15:16                               ` Avi Kivity
2010-12-06 16:21                                 ` Anthony Liguori
2010-12-06 16:30                                   ` Avi Kivity
2010-12-06 16:33                                     ` Anthony Liguori
2010-12-03 12:40         ` Gleb Natapov
2010-12-03 23:31       ` Anthony Liguori
2010-12-03 22:42   ` Anthony Liguori
2010-12-04  8:16     ` Avi Kivity
2010-12-04 13:48       ` Anthony Liguori
2010-12-06  8:32         ` Avi Kivity
2010-12-02 19:14 ` Chris Wright
2010-12-02 20:25   ` Anthony Liguori
2010-12-02 20:40     ` Chris Wright
2010-12-02 20:40   ` Marcelo Tosatti
2010-12-02 21:07     ` Chris Wright
2010-12-02 22:37       ` Anthony Liguori
2010-12-03  2:42         ` Chris Wright
2010-12-03  3:21           ` Anthony Liguori
2010-12-03  3:44             ` Chris Wright
2010-12-03 14:25               ` Anthony Liguori
2010-12-02 22:27     ` Anthony Liguori
2010-12-03 22:49     ` Anthony Liguori
2010-12-04  5:43       ` Srivatsa Vaddagiri
2010-12-03  9:40   ` Avi Kivity
2010-12-03 11:21     ` Srivatsa Vaddagiri
2010-12-03 11:57   ` Srivatsa Vaddagiri
2010-12-03 16:27     ` Srivatsa Vaddagiri
2010-12-03 17:29       ` Chris Wright
2010-12-03 17:33         ` Srivatsa Vaddagiri
2010-12-04  8:18           ` Avi Kivity
2010-12-03 17:57         ` Srivatsa Vaddagiri
2010-12-03 17:58           ` Chris Wright
2010-12-03 18:07             ` Anthony Liguori
2010-12-03 18:12               ` Srivatsa Vaddagiri
2010-12-04  8:19                 ` Avi Kivity
2010-12-03 18:20               ` Chris Wright
2010-12-03 18:55                 ` Anthony Liguori [this message]
2010-12-03 18:10             ` Marcelo Tosatti
2010-12-03 18:24               ` Marcelo Tosatti
2010-12-03 17:28     ` Chris Wright
2010-12-03 17:36       ` Srivatsa Vaddagiri
2010-12-03 17:38         ` Chris Wright
2010-12-03 17:43           ` Srivatsa Vaddagiri
2010-12-03 17:47           ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CF93D39.9010100@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=chrisw@sous-sol.org \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=vatsa@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox