From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: SMP/DRBVD issues ... Date: Sun, 06 Dec 2009 12:04:10 +0200 Message-ID: <4B1B819A.9090405@redhat.com> References: <4133480.22981260067437024.JavaMail.root@zimbra> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Gareth Bult Return-path: Received: from mx1.redhat.com ([209.132.183.28]:48675 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933052AbZLFKEw (ORCPT ); Sun, 6 Dec 2009 05:04:52 -0500 In-Reply-To: <4133480.22981260067437024.JavaMail.root@zimbra> Sender: kvm-owner@vger.kernel.org List-ID: On 12/06/2009 04:43 AM, Gareth Bult wrote: > Hi, > > I'm new to the list so apologies if this is known / fixed, but I've not been able to find satisfactory answers in the archives. > > I'm running a number of boxes with KVM on the stock Ubuntu 9.10 kernel. > Generally it works very well and I have live migration working on DRBD volumes - very impressed - good job! > > However I have a number of issues that I note others have also reported, for which I've not seen fixes; > > a. SMP, it appears on Ubuntu 9.10 at the very least - does not work. Whereas setting -smp 2 does actually > start two kvm threads, the overall performance of the VM is slower than if you use -smp 1, AND the combined > kvm threads use way more CPU on the host than they should. > > [note; this is using virt-manager to setup and maintain, CPU's are AMD Phenom II X4 @ 3.2G ] > > I think that some of the performance hit comes down to processes not being tagged to specific CPU's - > I've noticed on Zen that if you run a 4 thread guess on a 4 core CPU with nothing else running, so it doesn't > need to move threads between cores, you get quite a large performance boost. > But, this doesn't really cover the huge impact on the host. The guest can be showing 15% CPU util when > configured with 4 cores, while the host is showing 280%. > > I can supply more information if needed, but the problem seems to blatant I'm hoping people already know > about it and that can someone can supply some details re; a way forward. > > We haven't observed this; what kind of guest is it? > b. DRBD and migration, in order to make this work both hosts it appears must be configured for with the > parameter 'allow-two-primaries'. This makes me a little nervous, but it does seem to work. There is > however one massive flaw, KVM does not seem to be DRBD aware and with two volumes on two machines, > it's possible to start two instances of a given virtual machine. i.e. neither instance successfully locks the > volume to prevent another instance also starting on it. As you will guess, this has a detrimental effect on > the underlying volume. > > Is there some way to make KVM apply a lock to a DRBD device such that another instance of the VM cannot > be started on another host? (incidentally, XEN does this 'out of the box' for drbd volumes, so I'm guessing > it is possible somehow...? ) > > Note; it's nice to configure VM's to auto start on a given machine so in the event of a power failure the VM will > boot with the host. However, if this machine fails and you need to start the VM on an alternative machine, > when the original machine recovers / reboots, it will attempt (and succeed) in auto booting the same VM > leaving you with two copies of the same VM and a screwed guest image. > > This needs support at the management layer. qemu has no way of knowing whether you want to share the disk between two guests or not. -- error compiling committee.c: too many arguments to function