kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomasz Chmielewski <mangoo@wpkg.org>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: 0.11: SMP guests using one host CPU only?
Date: Tue, 20 Oct 2009 15:48:17 +0200	[thread overview]
Message-ID: <4ADDBFA1.3060007@wpkg.org> (raw)
In-Reply-To: <4ADDB95E.6080309@redhat.com>

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?).

 
> 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?


# QEMU_TASKS=$(pgrep qemu)

# for QEMU_TASK in $QEMU_TASKS; do cat /proc/$QEMU_TASK/cmdline ; echo ; ls /proc/$QEMU_TASK/task ; echo ; done
/usr/bin/qemu-system-x86_64-m1024-drivefile=/srv/kvm/images/lvs2,if=virtio,cache=writeback,index=0,boot=on-netnic,vlan=0,model=virtio,macaddr=F2:4A:51:41:B1:3F-nettap,vlan=0,script=/etc/qemu-ifup-localtime-smp4
17687/  19018/  19020/  19069/

/usr/bin/qemu-system-x86_64-m1024-drivefile=/srv/kvm/images/gluster1a,if=virtio,cache=writeback,index=0,boot=on-netnic,vlan=0,model=virtio,macaddr=F2:4A:51:41:B1:3A-nettap,vlan=0,script=/etc/qemu-ifup-localtime
19220/  24857/

/usr/bin/qemu-system-x86_64-m1024-drivefile=/srv/kvm/images/gluster2a,if=virtio,cache=writeback,index=0,boot=on-netnic,vlan=0,model=virtio,macaddr=F2:4A:51:41:B1:3B-nettap,vlan=0,script=/etc/qemu-ifup-localtime
19252/  24896/

/usr/bin/qemu-system-x86_64-m1024-drivefile=/srv/kvm/images/gluster3a,if=virtio,cache=writeback,index=0,boot=on-netnic,vlan=0,model=virtio,macaddr=F2:4A:51:41:B1:3C-nettap,vlan=0,script=/etc/qemu-ifup-localtime
19258/  24934/

/usr/bin/qemu-system-x86_64-m1024-drivefile=/srv/kvm/images/gluster4a,if=virtio,cache=writeback,index=0,boot=on-netnic,vlan=0,model=virtio,macaddr=F2:4A:51:41:B1:3D-nettap,vlan=0,script=/etc/qemu-ifup-localtime
25878/

/usr/bin/qemu-system-x86_64-m1024-drivefile=/srv/kvm/images/lvs1,if=virtio,cache=writeback,index=0,boot=on-netnic,vlan=0,model=virtio,macaddr=F2:4A:51:41:B1:3E-nettap,vlan=0,script=/etc/qemu-ifup-localtime
25920/



No CPU-intensive apps:

/usr/bin/qemu-system-x86_64-m1024-drivefile=/srv/kvm/images/lvs2,if=virtio,cache=writeback,index=0,boot=on-netnic,vlan=0,model=virtio,macaddr=F2:4A:51:41:B1:3F-nettap,vlan=0,script=/etc/qemu-ifup-localtime-smp4
17687/



-- 
Tomasz Chmielewski
http://wpkg.org


  reply	other threads:[~2009-10-20 13:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-20  9:03 0.11: SMP guests using one host CPU only? Tomasz Chmielewski
2009-10-20  9:41 ` Avi Kivity
2009-10-20 10:17   ` Tomasz Chmielewski
2009-10-20 13:16     ` Avi Kivity
2009-10-20 13:19       ` Tomasz Chmielewski
2009-10-20 13:21         ` Avi Kivity
2009-10-20 13:48           ` Tomasz Chmielewski [this message]
2009-10-22  7:05             ` Avi Kivity
2009-10-22  9:28               ` Tomasz Chmielewski
2009-10-22 10:51                 ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ADDBFA1.3060007@wpkg.org \
    --to=mangoo@wpkg.org \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).