All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Adam Monsen <haircut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: idle linux guest takes up to 8.5% of host CPU
Date: Mon, 23 Jul 2007 09:52:15 +0300	[thread overview]
Message-ID: <46A4501F.3060006@qumranet.com> (raw)
In-Reply-To: <9ebd65110707221850w2055632va8c53c989c651020-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Adam Monsen wrote:
> Hi Avi,
>
> On 7/22/07, Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org> wrote:
>   
>> Adam Monsen wrote:
>>     
> [...]
>   
>>> Any idea why an idle Fedora 7 guest would use more host CPU than an
>>> idle Windows XP guest?
>>>       
>> Several reasons:
>>
>> - Linux userspace sucks up more cpu than Windows.  That's especially
>> true if you have X running.
>>     
>
> This is a very minimal F7 install... no X, basically just an Apache
> HTTP server with mod_mono.
>
>   
>> - If running a 64-bit kernel, Linux is running at 250Hz or 300Hz whereas
>> Windows runs at 100Hz unless you're doing multimedia. F7 32-bit kernels
>> adjust the timer dynamically.
>>     
>
> I'm pretty sure I'm running a 32-bit kernel on the host;
> "CONFIG_X86_32" is defined in the kernel options, and "getconf
> LONG_BIT" returns 32. Same for the Linux guest.
>
> According to the Intel Web site (
> http://www.intel.com/products/processor_number/chart/pentium_d.htm )
> my processor supports "Intel(r) 64", but I don't think it is truly a
> "64-bit processor".
>
>   
>> - If your machine is idle, it scales down the clock frequency, making
>> guest idle usage seem higher (that doesn't account for the difference
>> between Linux and Windows, though).
>>
>> That said, I usually see much lower numbers.  Maybe you have an older
>> cpu.
>>     
>
> Could be, depending on how old is old.
>
> Dell tells me I bought a "Dual Core Pentium D, 930 Processor, 2X2MB
> Cache, 3.0GHz 800MHz Front Side Bus". It came as part of a Dell
> PowerEdge 830 package; the cheapest I could find that supported Intel
> VT.
>   

In terms of the VT lifetime, that's old.  I think these are the first
processors to have featured VT.

You can try downloading the latest kvm package, and do

  ./configure --with-patched-kernel
  make -C user
  user/kvmctl user/test/bootstrap user/test/vmexit.flat

That will give you the cost (in cycles) of a guest<->host switch.


(btw, you're running the distro kernel, right?  I don't know how current
the kvm version there is)

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

  parent reply	other threads:[~2007-07-23  6:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-22 14:39 idle linux guest takes up to 8.5% of host CPU Adam Monsen
     [not found] ` <9ebd65110707220739j761ada89wec0eb8194b63e8d0-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-07-22 14:54   ` Avi Kivity
     [not found]     ` <46A36F9C.3030809-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-23  1:50       ` Adam Monsen
     [not found]         ` <9ebd65110707221850w2055632va8c53c989c651020-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-07-23  6:52           ` Avi Kivity [this message]
     [not found]             ` <46A4501F.3060006-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-23 11:43               ` Adam Monsen

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=46A4501F.3060006@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=haircut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.