WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] RE: qemu-dm cpu utilization

To: "Anthony Liguori" <anthony@xxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] RE: qemu-dm cpu utilization
From: "McAfee, Tommie M" <Tommie.McAfee@xxxxxxxxxx>
Date: Wed, 30 Aug 2006 14:05:45 -0400
Delivery-date: Wed, 30 Aug 2006 11:07:42 -0700
Envelope-to: www-data@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/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: <5E735516D527134997ABD465886BBDA63A3B6C@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <44F4D109.507@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcbLxOdwzGqfaWm4TeWbCjoaFKphZQAmRbjI
Thread-topic: qemu-dm cpu utilization

Anthony,

>If you delete the timer (and set vs->timer = NULL) in 
>vnc_client_io_error(), does it reduce the usage?

setting vs->timer=NULL causes qemu-dm to segfault when I launch vncviewer
to view the virtual host.  Here is a snippet of the strace results:

ioctl(13, EVIOCGKEYCODE, 0x7fffff904ee0) = 0
select(17, [6 9 11 13 16], [], [], {0, 10000}) = 1 (in [13], left {0, 10000})
read(13, "\34\0\0\0", 4)                = 4
write(13, "\34\0\0\0", 4)               = 4
clock_gettime(CLOCK_MONOTONIC, {87584, 18585008}) = 0
clock_gettime(CLOCK_MONOTONIC, {87584, 18684008}) = 0
clock_gettime(CLOCK_MONOTONIC, {87584, 18783008}) = 0
ioctl(13, EVIOCGKEYCODE, 0x7fffff904ee0) = 0
select(17, [6 9 11 13 16], [], [], {0, 10000}) = 1 (in [13], left {0, 10000})
read(13, "\34\0\0\0", 4)                = 4
write(13, "\34\0\0\0", 4)               = 4
clock_gettime(CLOCK_MONOTONIC, {87584, 31583008}) = 0
clock_gettime(CLOCK_MONOTONIC, {87584, 31685008}) = 0
clock_gettime(CLOCK_MONOTONIC, {87584, 31785008}) = 0
clock_gettime(CLOCK_MONOTONIC, {87584, 57104008}) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
Process 17185 detached

According to strace, the timers account for a lot of qemu-dm's activity.
Is this polling a bit excessive? 

Tommie McAfee
Xen-Testing 



-----Original Message-----
From: Anthony Liguori [mailto:anthony@xxxxxxxxxxxxx]
Sent: Tue 8/29/2006 7:43 PM
To: McAfee, Tommie M
Subject: Re: qemu-dm cpu utilization
 
McAfee, Tommie M wrote:
> Using an 8-way ES7000 with 32GB of ram, I'm running xen at changset 11217
> with dom0_mem=3092M as a kernel parameter on a x86_64 hyperviser.
> 
> It appears that qemu is adding too much overhead to
> virtual machines to display graphics.
> If I boot a sles9sp3 domVT in runlevel 5 with vga=0x314 for a graphicalboot, 
> and immediately use
> vncviewer simply to watch the virtual machine as it boots,
> qemu-dm consumes 40% cpu as soon as vncviewer is launched and remains that 
> way throughout this entire process  without settling down when the login 
> screen appears.
> Even If I close the console that's viewing the virtual host,  qemu-dm remains 
> at 40-44%.

Almost everything in the VNC code resets when a guest disconnected 
except for the timer.  If a client disconnects, the timer routine should 
be almost a nop but it's possible that it's somehow causing qemu-dm to 
do something funky.

If you delete the timer (and set vs->timer = NULL) in 
vnc_client_io_error(), does it reduce the usage?

BTW, if you're using 800x600, I suspect that you may be falling back to 
MMIO instead of a linear framebuffer.  Try moving to 1024x768 and see if 
that helps.

Regards,

Anthony Liguori

> 
> When booting the same domVT in runlevel 5 without ever attempting to connect 
> to it with
> vncviewer, qemu-dm fluctuated from 1-3% while the host was booting and then 
> settled to 0.2% after 4-5 mins.  Assuming that the boot process was complete, 
> I launched vncviewer and qemu-dm jumped up to a 40-44% range again.
> 
> Lastly I started the same host in runlevel 3 in pure text mode without any
> vga parameters on the kernel line, connected to the virtual machine with
> vncviewer, and watched the machine boot until a login prompt appeared.  At
> this point, top showed qemu-dm as using 0% of the cpu.  Logging into the
> virtual machine and running 'startx' however sent qemu-dm back up to a 40-
> 44% range.
> 
> Why is qemu-dm consuming so much of the cpu?  Why is qemu-dm still high
> even when I close my vncviewer?
> 
> Tommie,
> Xen Test Team
> Unisys 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>