All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Avi Kivity <avi@redhat.com>, Ryan Harper <ryanh@us.ibm.com>,
	Anthony Liguori <aliguori@linux.vnet.ibm.com>,
	bharata@in.ibm.com,
	"Nikunj A. Dadhania" <nikunj@linux.vnet.ibm.com>,
	Balbir Singh <balbir@in.ibm.com>,
	kmr@us.ibm.com
Subject: Effect of nice value on idle vcpu threads consumption
Date: Sat, 19 Feb 2011 17:12:48 +0530	[thread overview]
Message-ID: <20110219114248.GA19999@linux.vnet.ibm.com> (raw)

Hello,
	I have been experimenting with renicing vcpu threads and found some
oddity. I was expecting a idle vcpu thread to consume close to 0% cpu resource
irrespective of its nice value. That was true when nice value was 0 for vcpu
threads. However altering nice value of (idle) vcpu threads is causing its cpu 
consumption to shoot up. Does anyone have a quick answer to this behavior?

More details.

	Machine : x3650-M2 w/ 2 Quad-core CPUs (Intel Xeon X5570), HT enabled
	Host    : RHEL 6 distro w/ 2.6.38-rc5 kernel
	Single Guest : w/ 4vcpus (all vcpus pinned to physical cpu 0), 1GB mem
			Sles11 distro w/ 2.6.37 kernel

Single guest is booted and kept idle.


When all vcpu threads are at nice 0, here's the consumption (close to 0 for all
vcpu threads).


  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+   P COMMAND                                                                   
 5642 qemu      20   0 1567m 381m 3048 S  1.2  1.2   0:02.56  0 qemu-kvm
 5640 qemu      20   0 1567m 381m 3048 S  0.8  1.2   0:12.74  0 qemu-kvm
 5641 qemu      20   0 1567m 381m 3048 S  0.8  1.2   0:02.60  0 qemu-kvm
 5643 qemu      20   0 1567m 381m 3048 S  0.6  1.2   0:02.76  0 qemu-kvm

Changing nice value for one of the vcpu threads to -20:


  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+   P COMMAND                                                                   
 5640 qemu       0 -20 1567m 381m 3048 R 45.5  1.2   0:19.67  0 qemu-kvm
 5641 qemu      20   0 1567m 381m 3048 R  0.4  1.2   0:03.33  0 qemu-kvm
 5642 qemu      20   0 1567m 381m 3048 R  0.4  1.2   0:03.16  0 qemu-kvm
 5643 qemu      20   0 1567m 381m 3048 R  0.4  1.2   0:03.36  0 qemu-kvm
	
Changing nice value for another of the vcpu threads to -20:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+   P COMMAND                                                                   
 5640 qemu       0 -20 1567m 381m 3048 S 35.7  1.2   0:30.92  0 qemu-kvm
 5641 qemu       0 -20 1567m 381m 3048 S 26.1  1.2   0:04.77  0 qemu-kvm
 5642 qemu      20   0 1567m 381m 3048 S  0.2  1.2   0:03.29  0 qemu-kvm
 5643 qemu      20   0 1567m 381m 3048 S  0.2  1.2   0:03.50  0 qemu-kvm

Is this behavior expected? Any explanation for this behavior?

- vatsa
 


                 reply	other threads:[~2011-02-19 11:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20110219114248.GA19999@linux.vnet.ibm.com \
    --to=vatsa@linux.vnet.ibm.com \
    --cc=aliguori@linux.vnet.ibm.com \
    --cc=avi@redhat.com \
    --cc=balbir@in.ibm.com \
    --cc=bharata@in.ibm.com \
    --cc=kmr@us.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikunj@linux.vnet.ibm.com \
    --cc=ryanh@us.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.