From mboxrd@z Thu Jan 1 00:00:00 1970 From: "David S. Ahern" Subject: Re: [kvm-devel] performance with guests running 2.4 kernels (specifically RHEL3) Date: Thu, 29 May 2008 07:49:19 -0600 Message-ID: <483EB45F.6020601@cisco.com> References: <482C1633.5070302@qumranet.com> <482E5F9C.6000207@cisco.com> <482FCEE1.5040306@qumranet.com> <4830F90A.1020809@cisco.com> <4830FE8D.6010006@cisco.com> <48318E64.8090706@qumranet.com> <4832DDEB.4000100@qumranet.com> <4835EEF5.9010600@cisco.com> <483D391F.7050007@qumranet.com> <483D6898.2050605@cisco.com> <20080528144850.GX27375@duo.random> <483D72D1.7080803@qumranet.com> <483D7CC6.5000708@cisco.com> <483E9D18.50904@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Andrea Arcangeli , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from sj-iport-1.cisco.com ([171.71.176.70]:48905 "EHLO sj-iport-1.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758372AbYE2N4G (ORCPT ); Thu, 29 May 2008 09:56:06 -0400 In-Reply-To: <483E9D18.50904@qumranet.com> Sender: kvm-owner@vger.kernel.org List-ID: This is 2.4/RHEL3, so HZ=100. 848 jiffies = 8.48 seconds -- and that's just the one age bucket and this is just one example pulled randomly (well after boot). During that time kscand does get scheduled out, but ultimately guest time is at 100% during the scans. david Avi Kivity wrote: > David S. Ahern wrote: >> I've been instrumenting the guest kernel as well. It's the scanning of >> the active lists that triggers a lot of calls to paging64_prefetch_page, >> and, as you guys know, correlates with the number of direct pages in the >> list. Earlier in this thread I traced the kvm cycles to >> paging64_prefetch_page(). See >> >> http://www.mail-archive.com/kvm-devel@lists.sourceforge.net/msg16332.html >> >> In the guest I started capturing scans (kscand() loop) that took longer >> than a jiffie. Here's an example for 1 trip through the active lists, >> both anonymous and cache: >> >> active_anon_scan: HighMem, age 4, count[age] 41863 -> 30194, direct >> 36234, dj 225 >> >> > > HZ=512, so half a second. > > 41K pages in 0.5s -> 80K pages/sec. Considering we have _at_least_ two > emulations per page, this is almost reasonable. > >> active_anon_scan: HighMem, age 3, count[age] 1772 -> 1450, direct >> 1249, dj 3 >> >> active_anon_scan: HighMem, age 0, count[age] 104078 -> 101685, direct >> 84829, dj 848 >> > > Here we scanned 100K pages in ~2 seconds. 50K pages/sec, not too good. > >> I'll pull down the git branch and give it a spin. >> > > I've rebased it again to include the prefetch_page optimization. >