* CPU usage for credit2 @ 2010-09-23 13:48 Yuehai Xu 2010-09-24 11:38 ` George Dunlap 0 siblings, 1 reply; 4+ messages in thread From: Yuehai Xu @ 2010-09-23 13:48 UTC (permalink / raw) To: xen-devel; +Cc: George Dunlap, xen-tools, yhxu Hi, Suppose 2 VMs both of which just has a single VCPU share a single PCPU, if I run CPU intensive program in both of the VMs, the percentage of CPU usage from xentop is almost 100% for both of the VMs. I got confusing because since 2 VCPU shares a single PCPU, the percentage for each one should be around 50%, which is the result if I change the scheduler from credit2 to credit. Does it because credit2 change something or is this a bug for xentop or credit2? Thanks, Yuehai ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: CPU usage for credit2 2010-09-23 13:48 CPU usage for credit2 Yuehai Xu @ 2010-09-24 11:38 ` George Dunlap 2010-09-24 14:14 ` Yuehai Xu 0 siblings, 1 reply; 4+ messages in thread From: George Dunlap @ 2010-09-24 11:38 UTC (permalink / raw) To: Yuehai Xu Cc: xen-tools@lists.xensource.com, xen-devel@lists.xensource.com, yhxu@wayne.edu I assume that your system has more than 1 PCPU, and that you're using pinning to try to limit the VM to 1 PCPU? At the moment, the credit2 scheduler doesn't implement pinning -- cpu affinity is entirely ignored. (It is an experimental scheduler, after all.) I think theoretically making pinning function shouldn't be too hard; but making the credit algorithm work with an arbitrary combination of affinities would require some careful thinking, and might not even be possible. If you want, you can try to use cpu pools to isolate the two VMs to a single PCPU. I haven't tried credit2 with pools yet, but in theory it should work. -George On 23/09/10 14:48, Yuehai Xu wrote: > Hi, > > Suppose 2 VMs both of which just has a single VCPU share a single > PCPU, if I run CPU intensive program in both of the VMs, the > percentage of CPU usage from xentop is almost 100% for both of the > VMs. I got confusing because since 2 VCPU shares a single PCPU, the > percentage for each one should be around 50%, which is the result if I > change the scheduler from credit2 to credit. > > Does it because credit2 change something or is this a bug for xentop or credit2? > > Thanks, > Yuehai ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: CPU usage for credit2 2010-09-24 11:38 ` George Dunlap @ 2010-09-24 14:14 ` Yuehai Xu 2010-09-24 16:24 ` George Dunlap 0 siblings, 1 reply; 4+ messages in thread From: Yuehai Xu @ 2010-09-24 14:14 UTC (permalink / raw) To: George Dunlap; +Cc: xen-tools, xen-devel, yhxu On Fri, Sep 24, 2010 at 7:38 AM, George Dunlap <George.Dunlap@eu.citrix.com> wrote: > I assume that your system has more than 1 PCPU, and that you're using > pinning to try to limit the VM to 1 PCPU? Yes, you are correct. In order to test the performance of credit2 for the problem of mix work load, I pin VCPUs from VMs to a PCPU while the VCPU of Dom0 pins to another PCPU. > > At the moment, the credit2 scheduler doesn't implement pinning -- cpu > affinity is entirely ignored. (It is an experimental scheduler, after all.) > I think theoretically making pinning function shouldn't be too hard; but > making the credit algorithm work with an arbitrary combination of affinities > would require some careful thinking, and might not even be possible. > So, the result that I got, which shows almost 100% usage of CPU for each VCPU, is actually because the VCPUs use different PCPUs instead of a single one, is that correct? > If you want, you can try to use cpu pools to isolate the two VMs to a single > PCPU. I haven't tried credit2 with pools yet, but in theory it should work. Ok, I will try it and tell you the result once I get it. Thanks, Yuehai > > -George > > On 23/09/10 14:48, Yuehai Xu wrote: >> >> Hi, >> >> Suppose 2 VMs both of which just has a single VCPU share a single >> PCPU, if I run CPU intensive program in both of the VMs, the >> percentage of CPU usage from xentop is almost 100% for both of the >> VMs. I got confusing because since 2 VCPU shares a single PCPU, the >> percentage for each one should be around 50%, which is the result if I >> change the scheduler from credit2 to credit. >> >> Does it because credit2 change something or is this a bug for xentop or >> credit2? >> >> Thanks, >> Yuehai > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re: CPU usage for credit2 2010-09-24 14:14 ` Yuehai Xu @ 2010-09-24 16:24 ` George Dunlap 0 siblings, 0 replies; 4+ messages in thread From: George Dunlap @ 2010-09-24 16:24 UTC (permalink / raw) To: Yuehai Xu; +Cc: xen-tools, xen-devel, yhxu On Fri, Sep 24, 2010 at 3:14 PM, Yuehai Xu <yuehaixu@gmail.com> wrote: > So, the result that I got, which shows almost 100% usage of CPU for > each VCPU, is actually because the VCPUs use different PCPUs instead > of a single one, is that correct? Yes, that's right. >> If you want, you can try to use cpu pools to isolate the two VMs to a single >> PCPU. I haven't tried credit2 with pools yet, but in theory it should work. > > Ok, I will try it and tell you the result once I get it. Cool -- good luck! -George ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-09-24 16:24 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-09-23 13:48 CPU usage for credit2 Yuehai Xu 2010-09-24 11:38 ` George Dunlap 2010-09-24 14:14 ` Yuehai Xu 2010-09-24 16:24 ` George Dunlap
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.