From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH v2 00/11] KVM in-guest performance monitoring Date: Thu, 16 Jun 2011 08:32:39 -0600 Message-ID: <4DFA1407.8020104@cisco.com> References: <1307972106-2468-1-git-send-email-avi@redhat.com> <4DF66B1A.6060606@cisco.com> <4DF71DA3.2080300@redhat.com> <4DF7972F.3040103@cisco.com> <4DF79941.9050705@siemens.com> <4DF79B6F.10102@cisco.com> <4DF79EFE.1050201@cisco.com> <4DF7A436.8090308@cisco.com> <4DF873FD.6040903@redhat.com> <4DF8A82F.5090900@cisco.com> <4DF8B1F8.6030502@redhat.com> <4DF8D8FE.2080808@cisco.com> <4DF8DD87.8040905@redhat.com> <4DF8E328.6070708@cisco.com> <4DFA0AC4.9050702@redhat.com> <4DFA0E56.70301@cisco.com> <4DFA10DA.4030704@cisco.com> <4DFA1148.6070306@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Arnaldo Carvalho de Melo To: Avi Kivity Return-path: Received: from sj-iport-2.cisco.com ([171.71.176.71]:47081 "EHLO sj-iport-2.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757312Ab1FPOck (ORCPT ); Thu, 16 Jun 2011 10:32:40 -0400 In-Reply-To: <4DFA1148.6070306@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 06/16/2011 08:20 AM, Avi Kivity wrote: > On 06/16/2011 05:19 PM, David Ahern wrote: >> On 06/16/2011 08:08 AM, David Ahern wrote: >> > Command: >> > perf stat -e instructions openssl speed aes >> >> Hmm.. this might be the wrong benchmark for this. I thought >> openssl-speed was a purely CPU intensive benchmark which should have >> fairly similar performance numbers in both host and guest. I seem to >> recall this as true 2 or so years ago, but that is not the case with >> 3.0-rc2 and F14. >> >> Using a benchmark Vince W. wrote seems better: >> http://www.csl.cornell.edu/~vince/projects/perf_counter/million.s >> >> perf stat -e instructions ./million >> >> Performance counter stats for './million': >> >> 1,113,650 instructions # 0.00 insns per cycle >> > > Maybe it's sensitive to a cpuid bit which we don't pass through - likely > a bug in qemu or perhaps in kvm. > Seems to be a side effect of running perf-stat in the guest. Running just 'openssl speed aes' in both host and guest shows very similar numbers (for the first 3 columns). Adding the 'perf stat' to the command (ie., perf stat openssl speed aes) causes a significant decline in the guest - by a factor of 2. For comparison 'perf stat' in the host has a negligible impact. David