From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: 0.11: SMP guests using one host CPU only? Date: Thu, 22 Oct 2009 10:05:10 +0300 Message-ID: <4AE00426.3030404@redhat.com> References: <4ADD7CFF.1080003@wpkg.org> <4ADD85D3.7000004@redhat.com> <4ADD8E56.5030409@wpkg.org> <4ADDB813.5010004@redhat.com> <4ADDB8F0.5010709@wpkg.org> <4ADDB95E.6080309@redhat.com> <4ADDBFA1.3060007@wpkg.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Tomasz Chmielewski Return-path: Received: from mx1.redhat.com ([209.132.183.28]:17473 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751980AbZJVHFK (ORCPT ); Thu, 22 Oct 2009 03:05:10 -0400 In-Reply-To: <4ADDBFA1.3060007@wpkg.org> Sender: kvm-owner@vger.kernel.org List-ID: On 10/20/2009 04:48 PM, Tomasz Chmielewski wrote: > Avi Kivity wrote: >> On 10/20/2009 10:19 PM, Tomasz Chmielewski wrote: >>>> >>>> I meant, how many qemu threads are there, and how much cpu does >>>> each take? >>> >>> >>> There is only one qemu thread for the 4-cpu guest. >> >> Not possible. Even a single-cpu guest has two threads. > > "ps auxH" shuld show me all threads? I started it multiple times, and > it shown 1 thread for the 4-CPU guest > (with no CPU intensive tasks running - could this be a reason?). No. kvm implies 2+ threads. > > >> What does 'ls /proc/$(pgrep qemu)/task' show? > > Running several CPU-intensive processes on this guest uses only one > CPU on the host. > > Both "ps auxH" and /proc confirm that this guest has 4-5 threads when > I run several CPU-intensive apps. > > Only one thread for this guest uses 100% CPU time; other threads use ~0%. > > If I don't run any CPU-intensive tasks on this guests, it only runs > one thread (unless I misinterpret something here). > > > Some 1-CPU guests have only one thread though? > Are you sure they're using kvm? Try 'info kvm' in the monitor. tcg will only use on thread (more will be spawned for I/O, but will eventually die). -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.