Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JXxik-0001Es-Pu for qemu-devel@nongnu.org; Sat, 08 Mar 2008 07:00:10 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JXxij-0001Dz-3s for qemu-devel@nongnu.org; Sat, 08 Mar 2008 07:00:10 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXxii-0001Dc-Br for qemu-devel@nongnu.org; Sat, 08 Mar 2008 07:00:08 -0500 Received: from wa-out-1112.google.com ([209.85.146.177]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JXxih-0000Fq-Pk for qemu-devel@nongnu.org; Sat, 08 Mar 2008 07:00:07 -0500 Received: by wa-out-1112.google.com with SMTP id k22so1203929waf.18 for ; Sat, 08 Mar 2008 04:00:04 -0800 (PST) Message-ID: <219e947f0803080400w627e0804qe365410ece0ce7a4@mail.gmail.com> Date: Sat, 8 Mar 2008 14:00:04 +0200 From: "Ivan Kalvachev" Subject: Re: [Qemu-devel] High CPU Usage with Linux 2.6.24 and Windows XP Guest (but not with 2.6.23) In-Reply-To: <20080306105838.0ce99a16.lists@pelvoux.nildram.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080306105838.0ce99a16.lists@pelvoux.nildram.co.uk> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Thu, Mar 6, 2008 at 12:58 PM, Steve Fosdick wrote: > Guys, > > If I run Linux kernel 2.6.24.3 and then start a qemu virtual machine running Windows XP as the guest operating system the CPU usage is high, always close to 100%, and the virtual machine slower than normal. > > Once I am able to log in to windows, task manager shows the CPU usage permanently at 100%, even when Windows should be idle, and higher than normal usage from the csrss process. I attach a screen shot of task manager showing this. Looking at the CPU usage from Linux when windows is idle it is notable that most of the CPU usage is user-mode. > > By comparison, with exactly the same virtual hard disk image and the same version of qemu (and kqemu) and kernel 2.6.23.12 the CPU usage is much lower and windows runs faster. When windows is idle the CPU usage is low and when Windows is active the CPU usage is approximately 2/3 user and 1/3 system. > > The qemu versions concerned are as follows: > > qemu 0.9.0 > kqmeu 1.3.0pre11 > > The hardware is an AMD64 processor and 1GB RAM. > > The problem with 2.6.24 seems only to occur with kqemu and also appears in dependant of whether dynamic ticks is enabled. A couple of timings should illustrate the difference. > > From VM start to login prompt: no kqemu=2m0s, 2.6.23=1m2s, 2.6.24=1m27s. > From login to last systray icon: no kqemu=6m25s, 2.6.23=1m47s, 2.6.24=4m46s > > Does anyone have any insight as to what may be happening or what tools I could use to gather enough information to help you guys diagnose the problem? > > Regards, > Steve. It may be bug, but I'd go with simpler possibilities. 4x slowdown is about the one you get when going from virtualization to emulation. In other words, your new kernel may not have kqemu compiled. The slowdown may make the usage of csrss more obvious. The Client/Server Runtime Server Subsystem is usual target of multiple viruses and trojans, so check your windows and the network activities.