From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: KVM performance Date: Sat, 27 Jan 2007 10:34:13 +0200 Message-ID: <45BB0E85.9060303@qumranet.com> References: <1169857267.30807.44.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: tim.c.chen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org Return-path: In-Reply-To: <1169857267.30807.44.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@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 Tim Chen wrote: > Hi, > > I did some testing of KVM on my woodcrest machine. And I found that > building a 2.6.19 kernel with identical configuration takes 845 sec on a > guest and 210 sec on the host. So the compile is about 4X slower on the > guest :( > > The guest ran with 2.6.19 kernel and host ran with a 2.6.20-rc5 kernel. > The guest file image is created with raw format. Wonder if people see > similar performance figure? > > http://virt.kernelnewbies.org/KVM/Performance cites a 2.5X difference, but for a different cpu. It's probably better to use an lvm volume rather than a raw file, and to give the guest ample memory. In addition, quite a few performance optimizations are missing from kvm: - after modifying a pte, kvm doesn't preload the modified pte into shadow, but instead lets the guest fault it in - disk access is blocking instead of non-blocking. this will be fixed by merging qemu-cvs, which uses aio for disk access. - better heuristics for recycling page tables are needed - prefaulting for common access patterns can help - kvm currently saves the entire fpu state on every exit, even if it has not been modified -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV