From: "Harry Smith" Subject: Re: fair scheduling Date: Thu, 10 May 2007 13:53:42 +0530 Message-ID: <200cfb290705100123o46052058m2b21f9c661eac7bc@mail.gmail.com> References: <200cfb290705092355x19ea0ae3l466f290589ffa445@mail.gmail.com> <200705100745.l4A7j1QB028377@fjmscan502.ms.jp.fujitsu.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1188216554==" Return-path: In-Reply-To: <200705100745.l4A7j1QB028377@fjmscan502.ms.jp.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Atsushi SAKAI Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============1188216554== Content-Type: multipart/alternative; boundary="----=_Part_60602_26042239.1178785422193" ------=_Part_60602_26042239.1178785422193 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, that's true. But dom0 has 4 VCPUs mapped on 2 physical CPU. CPU usage --> case1) when vm2 doesn't have any load dom0 20-25% vm1 100% vm2 0% case2) when vm2 has a compute-intense load dom0 20-25% vm1 100% vm2 100% So my question is that in this case there is 200% of CPU available to dom0, still it is using only 20-25%, but in case2 webserver throughput in vm1 goes down by 15-20%. Why this is so? Why dom0 can't use more CPU to process vm1 & vm2 requests separately ? As we are trying to show that vm1, vm2 are two OS running independetly, why they affect each other's performance ? thanks, Harry On 5/10/07, Atsushi SAKAI wrote: > > Hi, > > You should check I/O behavior. > > If I/O occured, > other domain(vm1, vm2) data is handled by dom0 as driver domain. > > Thanks > Atsushi SAKAI > > > "Harry Smith" wrote: > > > Hi Atsushi & Pradeep, > > > > thanks for replying back. > > I have 4 VCPUs for each of VM. But the point I wanted to stress upon is > - > > "This happened even in the case where CPU usage by both of vm1,vm2 is > > restricted to 100% each. " > > I had pinned all 4 VCPUs of each VM to a single phys. CPU. & I have 4 > phys. > > CPUs > > means my vm1 was using cpu1, vm2 using cpu2 & domain-0 using cpu0,cpu3 > > > > Problem is when there is no load on vm2, webserver performance of vm1 is > > better. But when vm2 has some compute-intense load then vm1 webserver > > performance goes down. > > Please note that CPU consumption of vm1 shown by xentop in both cases is > > 100%, still webserver performance goes down by around 15-20%. > > Even after trying to isolate two VMs, existence of load on one VM is > > affecting other. > > > > so is it expected behavior ? > > > > thanks, > > Harry > > > > > > > > On 5/10/07, pradeep singh rautela wrote: > > > > > > > > > > > > On 5/10/07, Atsushi SAKAI wrote: > > > > > > > > One vcpu can use one pcpu at one time. > > > > It means 100% is maxium for one vcpu domain. > > > > If you want to use cpu resources, you should set more vcpu. > > > > > > > > > Ok, this explains a lot of things. > > > As i understand this , more VCPUs means more freedom to hypervisor to > > > migrate them among physical CPUs, depending on the free PCPUs > available. > > > > > > In general > > > > > > domU1 > > > / | \ > > > vcpu1 vcpu2 vcpu3 > > > > > > pcpu1 pcpu2 pcpu3 pcpu4 pcpu5 pcpu6 > > > > > > I mean ,domU1 can run on any vcpu , right? now vcpu1, vcpu2, vcpu3 > share a > > > one to many reationship between pcpus[1....6]. That is a vcpu can run > on any > > > of the pcus available to the Xen hypervisor(unless i explicitly pin it > to ). > > > > > > > > > Is my naive understanding of what you explained is correct? > > > > > > Thank you > > > ~psr > > > > > > > Thanks > > > > Atsushi SAKAI > > > > > > > > > > > > "pradeep singh rautela" wrote: > > > > > > > > > Hi Atsushi, > > > > > > > > > > On 5/10/07, Atsushi SAKAI < sakaia@jp.fujitsu.com> wrote: > > > > > > > > > > > > > > > > > > You should show detail configuration. > > > > > > Your information is too short. > > > > > > > > > > > > Anyway I guess each domain has one vcpu. > > > > > > If so, this is normal behavior. > > > > > > Because one vcpu cannot allocate two or more pcpu at once. > > > > > > > > > > > > > > > Right, but shouldn't Xen hypervisor be capable of migrating the > VCPU > > > > among > > > > > the available PCPUs on a multiprocessor system, like in this case? > And > > > > > criteria should be the load on the PCPU or the idle PCPUs. > > > > > yes/no? > > > > > > > > > > Am i missing something here? > > > > > > > > > > Thanks > > > > > ~psr > > > > > > > > > > Thanks > > > > > > Atsushi SAKAI > > > > > > > > > > > > "Harry Smith" wrote: > > > > > > > > > > > > > hi all, > > > > > > > > > > > > > > I am using xen3.0.3 on dual core hyperthreaded processor (in > all 4 > > > > > > cores). > > > > > > > There are 2 VMs vm1,vm2 among which vm1 has a webserver > running on > > > > it. > > > > > > > > > > > > > > While testing the performance of webserver, when I introduce > some > > > > load > > > > > > on > > > > > > > vm2 which involves some computations the webserver performance > > > > goes > > > > > > down. > > > > > > > This happened even in the case where CPU usage by both of > vm1,vm2 > > > > is > > > > > > > restricted to 100% each. > > > > > > > > > > > > > > Is it expected behavior ? if yes then how does one can > control > > > > addition > > > > > > of > > > > > > > new virtual machines as adding every new VM will result in > > > > lowering > > > > > > > performance of other VMs. Through scheduling parameters we > can > > > > just > > > > > > specify > > > > > > > amount of CPU to be used in relative sense (weight) & upper > limit > > > > (cap). > > > > > > But > > > > > > > how to tackle this point. > > > > > > > > > > > > > > I am new in this area & wanna set up a lab using > virtualization, > > > > so want > > > > > > to > > > > > > > find solution for this. > > > > > > > > > > > > > > thanks, > > > > > > > Harry > > > > > > > > > > > > > > we always have a choice... > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Xen-devel mailing list > > > > > > Xen-devel@lists.xensource.com > > > > > > http://lists.xensource.com/xen-devel > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > --- > > > > > pradeep singh rautela > > > > > > > > > > "Genius is 1% inspiration, and 99% perspiration" - not me :) > > > > > > > > > > > > > > > > > > > > > -- > > > --- > > > pradeep singh rautela > > > > > > "Genius is 1% inspiration, and 99% perspiration" - not me :) > > > > > > ------=_Part_60602_26042239.1178785422193 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi,

that's true. But dom0 has 4 VCPUs mapped on 2 physical CPU.
CPU usage -->
case1)   when vm2 doesn't have any load 
   dom0 20-25%    vm1  100%       vm2  0%

case2)  when vm2 has a compute-intense load
   dom0  20-25%   vm1  100%        vm2  100%

So my question is that in this case there is 200% of CPU available to dom0, still it is using only 20-25%,  but in case2  webserver throughput in vm1 goes down  by 15-20%. Why this is so?
Why dom0 can't use more CPU to process vm1 & vm2 requests separately ?  As we are trying to show that vm1, vm2 are two OS running independetly, why they affect each other's performance ?

thanks,
Harry



On 5/10/07, Atsushi SAKAI <sakaia@jp.fujitsu.com> wrote:
Hi,

You should check I/O behavior.

If I/O occured,
other domain(vm1, vm2) data is handled by dom0 as driver domain.

Thanks
Atsushi SAKAI


"Harry Smith" < harry.smith272@gmail.com> wrote:

> Hi Atsushi & Pradeep,
>
> thanks for replying back.
> I have 4 VCPUs for each of VM.  But the point I wanted to stress upon is -
> "This happened even in the case where CPU usage by both of vm1,vm2 is
> restricted to 100% each. "
> I had pinned all 4 VCPUs of each VM to a single phys. CPU. & I have 4 phys.
> CPUs
> means my vm1 was using cpu1, vm2 using cpu2 & domain-0 using cpu0,cpu3
>
> Problem is when there is no load on vm2, webserver performance of vm1 is
> better.  But when vm2 has some compute-intense load then vm1 webserver
> performance goes down.
> Please note that CPU consumption of vm1 shown by xentop in both cases is
> 100%,  still webserver performance goes down by around 15-20%.
> Even after trying to isolate two VMs, existence of load on one VM is
> affecting other.
>
> so is it expected behavior ?
>
> thanks,
> Harry
>
>
>
> On 5/10/07, pradeep singh rautela <rautelap@gmail.com> wrote:
> >
> >
> >
> > On 5/10/07, Atsushi SAKAI < sakaia@jp.fujitsu.com> wrote:
> > >
> > > One vcpu can use one pcpu at one time.
> > > It means 100% is maxium for one vcpu domain.
> > > If you want to use cpu resources, you should set more vcpu.
> >
> >
> > Ok, this explains a lot of things.
> > As i understand this , more VCPUs means more freedom to hypervisor to
> > migrate them among physical CPUs, depending on the free PCPUs available.
> >
> > In general
> >
> >                 domU1
> >                /      |       \
> >         vcpu1 vcpu2 vcpu3
> >
> > pcpu1 pcpu2 pcpu3 pcpu4 pcpu5 pcpu6
> >
> > I mean ,domU1 can run on any vcpu , right? now vcpu1, vcpu2, vcpu3 share a
> > one to many reationship between pcpus[1....6]. That is a vcpu can run on any
> > of the pcus available to the Xen hypervisor(unless i explicitly pin it to ).
> >
> >
> > Is my naive understanding of what you explained is correct?
> >
> > Thank you
> > ~psr
> >
> > > Thanks
> > > Atsushi SAKAI
> > >
> > >
> > > "pradeep singh rautela" <rautelap@gmail.com> wrote:
> > >
> > > > Hi Atsushi,
> > > >
> > > > On 5/10/07, Atsushi SAKAI < sakaia@jp.fujitsu.com> wrote:
> > > > >
> > > > >
> > > > > You should show detail configuration.
> > > > > Your information is too short.
> > > > >
> > > > > Anyway I guess each domain has one vcpu.
> > > > > If so, this is normal behavior.
> > > > > Because one vcpu cannot allocate two or more pcpu at once.
> > > >
> > > >
> > > > Right, but shouldn't Xen hypervisor be capable of migrating the VCPU
> > > among
> > > > the available PCPUs on a multiprocessor system, like in this case? And
> > > > criteria should be the load on the PCPU or the idle PCPUs.
> > > > yes/no?
> > > >
> > > > Am i missing something here?
> > > >
> > > > Thanks
> > > > ~psr
> > > >
> > > > Thanks
> > > > > Atsushi SAKAI
> > > > >
> > > > > "Harry Smith" < harry.smith272@gmail.com> wrote:
> > > > >
> > > > > > hi all,
> > > > > >
> > > > > > I am using xen3.0.3 on dual core hyperthreaded processor (in all 4
> > > > > cores).
> > > > > > There are 2 VMs vm1,vm2 among which vm1 has a webserver running on
> > > it.
> > > > > >
> > > > > > While testing the performance of webserver, when I introduce some
> > > load
> > > > > on
> > > > > > vm2 which involves some computations the webserver performance
> > > goes
> > > > > down.
> > > > > > This happened even in the case where CPU usage by both of vm1,vm2
> > > is
> > > > > > restricted to 100% each.
> > > > > >
> > > > > > Is it expected behavior ?  if yes then how does one can control
> > > addition
> > > > > of
> > > > > > new virtual machines as adding every new VM will result in
> > > lowering
> > > > > > performance of other VMs.  Through scheduling parameters we can
> > > just
> > > > > specify
> > > > > > amount of CPU to be used in relative sense (weight) & upper limit
> > > (cap).
> > > > > But
> > > > > > how to tackle this point.
> > > > > >
> > > > > > I am new in this area & wanna set up a lab using virtualization,
> > > so want
> > > > > to
> > > > > > find solution for this.
> > > > > >
> > > > > > thanks,
> > > > > > Harry
> > > > > >
> > > > > > we always have a choice...
> > > > >
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > Xen-devel mailing list
> > > > > Xen-devel@lists.xensource.com
> > > > > http://lists.xensource.com/xen-devel
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > ---
> > > > pradeep singh rautela
> > > >
> > > > "Genius is 1% inspiration, and 99% perspiration" - not me :)
> > >
> > >
> > >
> >
> >
> > --
> > ---
> > pradeep singh rautela
> >
> > "Genius is 1% inspiration, and 99% perspiration" - not me :)
> >



------=_Part_60602_26042239.1178785422193-- --===============1188216554== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1188216554==--