From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: KVM performance vs. Xen Date: Sun, 03 May 2009 19:20:41 +0300 Message-ID: <49FDC459.3010800@redhat.com> References: <49F8672E.5080507@linux.vnet.ibm.com> <49F967AE.4040905@redhat.com> <49F9AB64.20506@codemonkey.ws> <49F9AEC0.2060909@redhat.com> <49F9AFE6.8010704@linux.vnet.ibm.com> <49F9BF9E.50006@codemonkey.ws> <49F9C16B.9000809@redhat.com> <49FA44F2.5050609@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Anthony Liguori , kvm-devel To: Andrew Theurer Return-path: Received: from mx2.redhat.com ([66.187.237.31]:59215 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751997AbZECQUt (ORCPT ); Sun, 3 May 2009 12:20:49 -0400 In-Reply-To: <49FA44F2.5050609@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: Andrew Theurer wrote: >> >> If the overhead is dominated by copying, then you won't see the >> difference. Once the copying is eliminated, the comparison may yield >> different results. We should certainly see a difference in context >> switches. > I would like to test this the proper way. What do I need to do to > ensure these copies are eliminated? I am on a 2.6.27 kernel, am I > missing anything there? Anthony, would you be willing to provide a > patch to support the changes in the block API? You need a 2.6.30 host kernel plus a libc patch. Or the linux-aio qemu patch. >> >> One cause of context switches won't be eliminated - the >> non-saturating workload causes us to switch to the idle thread, which >> incurs a heavyweight exit. This doesn't matter since we're idle >> anyway, but when we switch back, we incur a heavyweight entry. > I have not looked at the schedstat or ftrace yet, but will soon. > Maybe it will tell us a little more about the context switches. > > Here's a sample of the kvm_stat: We have about 120K host_state_reloads/sec, 70K pio/sec, and 35K interrupts/sec. That corresponds to 35K virtio notifications/sec (reasonable for 8 cores), and 85K excess context switches/sec. These can probably be eliminated by using linux-aio, except those due to idling. -- error compiling committee.c: too many arguments to function