This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] Performance difference between Xen versions

To: Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] Performance difference between Xen versions
From: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
Date: Mon, 02 May 2011 07:31:53 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 01 May 2011 22:32:42 -0700
Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=ts.fujitsu.com; i=juergen.gross@xxxxxxxxxxxxxx; q=dns/txt; s=s1536b; t=1304314315; x=1335850315; h=message-id:date:from:mime-version:to:cc:subject: references:in-reply-to:content-transfer-encoding; bh=RFJ3ju3jELJw6dMputlOEaLZgee4Nxt5sXBza30nTMI=; b=rVmMG8lX/vvmtm6/do7gwtlpACyN+EAof/zXVh6MhLaGt+lFHzs5nzBx RtWquf8MkKlo+nWRFT8gz/kZnO00fmbLdGWBm0SmD5i0BMmO3uN05tPjp +f/MhZio82Wf3pMxh9vuRLublqO+dgdJO/hRveHKMwBsyZ1TppSY/w/5I YpT1mTwuW8DcJhyxjgRqS8GkzQCKYhtLL3wSL2SqyGoCSDnySjianEG13 p7weeymrVVBAl+g2LtwHvJ64gpGCD;
Domainkey-signature: s=s1536a; d=ts.fujitsu.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:X-IronPort-AV: Received:Received:Message-ID:Date:From:Organization: User-Agent:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=O3QBA/V4w2MQDe7pe7WC0oAgUX38c1stfTjVmo+3MRWQ6EQytAOLLNXQ fTDLiq8RQmMVcBE/bjnFO+pOX/aJMGDz54xKWoWD6WRGnd5ZECUkBrchJ TnZLSEbBmKcks0nHMr/cYRLSExQuGf5ozgJGkFRtLPvn//qjmhZeuJTct z/mOG+bhoD2Yr99b9B6jt6/Vrn09CwZt5dqBcZqhHm5vxs8k6bEKnzCSb Lu50K/a/n+k80lOS87HXreedE4MHB;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4DBAFF01020000780003EEFD@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Fujitsu Technology Solutions
References: <4DBAAFF1.8080001@xxxxxxxxxxxxxx> <4DBAFF01020000780003EEFD@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110402 Iceowl/1.0b2 Icedove/3.1.9
On 04/29/11 18:10, Jan Beulich wrote:
On 29.04.11 at 14:32, Juergen Gross<juergen.gross@xxxxxxxxxxxxxx>  wrote:

comparing performance of different Xen versions with BS2000 as HVM guest
showed some weird data I'd like to understand.

All measurements were done on an Intel Xeon E7220 box. We used a disk-
benchmark and found the cpu utilization was much higher with Xen 4.0
to Xen 3.3. I did some more investigation and narrowed things down to calls
the hypervisor (implicit or explicit).

Following is a table with timing data for different low-level functions, all
timing values are tsc ticks obtained via rdtsc:

Xen 3.3     Xen 4.0      Function
        88        165      just the measurement overhead
       176        330      rdtsc-instruction + cli/sti
      5896      11044      lapic timer query
      7381      13519      setting lapic timer
      4653       8987      reload of cr3
      3124       5709      invlpg instruction
    792253     792264      wbinvd instruction
       748       1375      int + iret
      5203       9317      hypervisor yield call
12598102   12597882      memory access loop

All operations involving the hypervisor take nearly twice the time on 4.0.
Operations not involving the hypervisor (wbinvd and memory access loop) are
the same on both systems (this rules out the possibility of different rdtsc

Is there any easy explanation for this? Both Xen versions are from SLES
(SLES11 or SLES11 SP1).
I think cpufreq handling was off by default in 3.3, and is on by
default on 4.0. Try turning this off, or using the performance
Jan, you got it! With cpufreq=none Xen 4.0 has more or less the same numbers
as 3.3. Now I wonder why the default is so much slower. I looks as if the
hypervisor would run at a lower speed. I can't believe it should behave like 


Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@xxxxxxxxxxxxxx
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

Xen-devel mailing list