From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 0/4] Rework alarm timer infrastrucure - take2 Date: Tue, 21 Aug 2007 15:09:43 +0300 Message-ID: <46CAD607.2080504@qumranet.com> References: <20070817231149.544849769@gmail.com> <1187450256.13580.1.camel@squirrel> <64F9B87B6B770947A9F8391472E032160D4645F0@ehost011-8.exch011.intermedia.net> <20070818220252.GA19526@dreamland.darkstar.lan> <68676e00708190952g7d4751c2g87a6ff71dd278f71@mail.gmail.com> <46C89A8E.7040609@qumranet.com> <20070820212058.GA6713@dreamland.darkstar.lan> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-TtF/mJH4Jtrk1uMJSBkQmQ@public.gmane.org, qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org To: Luca Tettamanti Return-path: In-Reply-To: <20070820212058.GA6713-sTXFmx6KbOnUXq0IF5SVAZ4oGUkBHcCu@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Luca Tettamanti wrote: >>> >>> >> Run a 100Hz guest, measure cpu usage using something accurate like >> cyclesoak, with and without dynticks, with and without kvm. >> > > Ok, here I've measured the CPU usage on the host when running an idle > guest. > > At 100Hz > > QEMU > hpet 4.8% > dynticks 5.1% > > Note: I've taken the mean over a period of 20 secs, but the difference > between hpet and dynticks is well inside the variability of the test. > > KVM > hpet 2.2% > dynticks 1.0% > > Hum... here the numbers jumps a bit, but dynticks is always below hpet. > The differences here are small, so I'll focus on the 1000Hz case. > At 1000Hz: > > QEMU > hpet 5.5% > dynticks 11.7% > > KVM > hpet 3.4% > dynticks 7.3% > > No surprises here, you can see the additional 1k syscalls per second. This is very surprising to me. The 6.2% difference for the qemu case translates to 62ms per second, or 62us per tick at 1000Hz. That's more than a hundred simple syscalls on modern processors. We shouldn't have to issue a hundred syscalls per guest clock tick. The difference with kvm is smaller (just 3.9%), which is not easily explained as the time for the extra syscalls should be about the same. My guess is that guest behavior is different; with dynticks the guest does about twice as much work as with hpet. Can you verify this by running strace -c -p `pgrep qemu` & sleep 10; pkill strace for all 4 cases, and posting the results? -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- 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/