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] VM start time slows with large number of VMs

To: "Carb, Brian A" <Brian.Carb@xxxxxxxxxx>, "Daniel P. Berrange" <berrange@xxxxxxxxxx>, "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: RE: [Xen-devel] VM start time slows with large number of VMs
From: Mats Petersson <mats@xxxxxxxxxxxxxxxxx>
Date: Tue, 11 Sep 2007 18:42:43 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, "Carb, Brian A" <Brian.Carb@xxxxxxxxxx>
Delivery-date: Tue, 11 Sep 2007 10:42:33 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:x-mailer:date:to:from:subject:cc:in-reply-to:references:mime-version:content-type:content-transfer-encoding:sender:message-id; bh=eiOA1vYEUvotPM3mV5ocUbue1oldqE1yILQ8Q7TG4Is=; b=cvXAMtXscOWU++pPRugv9Femz8XTxJP9f/Mppllocc8Sh71jmIwzQXPwhrTt6PWd159njOfM0M/OHiGfNZnMuX+Zl1i+HFnIgbpvUXnNXtsbQrpgrBL99XpqeaDbcs3cSs0elnvA1WqRG6sp873ljMkLw29GoqVkMN7frofb/tU=
Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:x-mailer:date:to:from:subject:cc:in-reply-to:references:mime-version:content-type:content-transfer-encoding:sender:message-id; b=fjCWUPW7FK1Jgy84rOG2GHwraV0mjLVVWwhsLDgZKyY+ijNGud3fH1Q9bsxNp59Ll7tnWaia355Jv24fHFj0awQL34syQhGc0qctCjDsTVX/bGZqxkaNQ4W1Upe4t2sWOM9beSxXbsRT+WWYBW/gFLYGYQjwIgllRqMznJSyMG4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <089B0D75973E1241B941D0A9854F23FC08F4CE10@xxxxxxxxxxxxxxxxx .unisys.com>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <089B0D75973E1241B941D0A9854F23FC08E17469@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C304A1BA.D3AD%Keir.Fraser@xxxxxxxxxxxx> <20070905173732.GH5503@xxxxxxxxxx> <089B0D75973E1241B941D0A9854F23FC08F4CE10@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
At 17:27 11/09/2007, Carb, Brian A wrote:

I tried timing xenstore-ls and then tried it again with the shared memory idea (adding the 2 lines to the /etc/init.d/rc3.0/S10xend script before it starts xend). Here are the average times for xenstore-ls:

 # vms     std    shm
001-020    .67    .59
021-040   1.70   1.54
041-060   2.41   2.36
061-080   3.26   3.14
081-100   4.06   3.95
101-120   4.96   4.90
121-140   6.56   6,02
141-160   7.33   7.21
161-180   8.00   8.62
181-200   9.90   9.61

Without using shared memory, the total elapsed time to start 200 VMs is about 95 minutes, vs 81 minutes with the shm statements. Time to start the 200th vm, from create to unpaused, is about 55 seconds, and with xenstore in shared memory that time is about 43 seconds. I'm not seeing the 200+ seconds I was seeing before, but that time was for vm263 and I've only been able to test with 200 VMs. This week I'll try to test with more.

Since the shared and non-shared memory results are so close, how can I verify that the xenstore data is actually going in and out of shared memory? It seems as if the start times became reduced once I cleared out the old info from xenstore, regardless of shared memory.

That would make sense.

I'm not sure how well the xenstore structure is designed, with respect to holding hundred and thousands of different entries - I had a quick look at it, but not really looking at it deeply, just very briefly - the code I was looking at seemed to do a lot of small function calls to dig data out of the database a byte or some few bytes at a time, which didn't make me say "Wow, that's clever".


Is it worth trying bootloader/bootentry instead of kernel/ramdisk as well?

brian carb
unisys corporation - malvern, pa

-----Original Message-----
From: Daniel P. Berrange
Sent: Wednesday, September 05, 2007 1:38 PM
Subject: Re: [Xen-devel] VM start time slows with large number of VMs

On Wed, Sep 05, 2007 at 06:11:06PM +0100, Keir Fraser wrote:
> xenstore slowness seems a reasonable hypothesis. How does performance
> of ?time xenstore-ls >/dev/null¹ change as you increase the number of guests?

There's another issue with the way hotplug scripts do locking which exhbits fairly pathelogical behaviour when a large number of guests are started concurrently. We've got a patch we're evaluating which changes the use of lock files + looping + sleeps, to instead use the 'flock' shell util.

I suspect the performance issues will be a combination of both the locking stuff and the xenstore I/O. You might also want to try putting /var/lib/xenstored onto tmpfs eg in initscripts before xenstored starts ...

  mkdir /dev/shm/xenstored
  mount --bind /dev/shm/xenstored /var/lib/xenstored


Xen-devel mailing list

Xen-devel mailing list