Subhabrata Bhattacharya
2006-Mar-13 06:07 UTC
[Xen-users] [PATCH] Displaying scheduler related information using xm
Hi All, The attached patch adds two simple scheduler related capabilities to the xm tool. $ xm sched-info ## Displays the name of the current scheduler (sedf/bvt) $ xm sched-param [domid] ## If domid is supplied, then the scheduler parameters for the corresponding domain is displayed, else scheduler parameters for all the domains are displayed. Example: [root@tux06 ~]# xm sched-info Domain Scheduler : bvt [root@tux06 ~]# xm sched-param Scheduler : bvt --------------- Domain MCuAdv WarpBack WarpValue WarpL WarpU 0 20 80 99 2000000 9000000 88 20 80 91 2000000 9000000 90 10 0 0 2000000000000000 1000000000000000 The above commands will aid an administrator in monitoring and modifying scheduler related parameters for a pool of Xen virtual machines. Please review and let me know your comments on this patch. Regards, Subh _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Daniel Stekloff
2006-Mar-13 16:41 UTC
Re: [Xen-users] [PATCH] Displaying scheduler related information using xm
On Mon, 2006-03-13 at 11:37 +0530, Subhabrata Bhattacharya wrote:> Hi All, > > The attached patch adds two simple scheduler related capabilities to > the xm tool. > > $ xm sched-info > ## Displays the name of the current scheduler (sedf/bvt) > > $ xm sched-param [domid] > ## If domid is supplied, then the scheduler parameters for the > corresponding domain is displayed, else scheduler parameters for all > the domains are displayed. > > Example: > > [root@tux06 ~]# xm sched-info > Domain Scheduler : bvt > > [root@tux06 ~]# xm sched-param > > Scheduler : bvt > --------------- > Domain MCuAdv WarpBack WarpValue WarpL WarpU > 0 20 80 99 > 2000000 9000000 > 88 20 80 91 > 2000000 9000000 > 90 10 0 0 > 2000000000000000 1000000000000000 > > > The above commands will aid an administrator in monitoring and > modifying scheduler related parameters for a pool of Xen virtual > machines. > > Please review and let me know your comments on this patch.If you''re going to patch xm, could you please also update the man page and the documentation? Thanks, Dan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Subhabrata Bhattacharya
2006-Mar-14 03:59 UTC
Re: [Xen-users] [PATCH] Displaying scheduler related information using xm
> If you''re going to patch xm, could you please also update the man page > and the documentation?Yeah Sure. Regards, Subh On 3/13/06, Daniel Stekloff <dsteklof@us.ibm.com> wrote:> On Mon, 2006-03-13 at 11:37 +0530, Subhabrata Bhattacharya wrote: > > Hi All, > > > > The attached patch adds two simple scheduler related capabilities to > > the xm tool. > > > > $ xm sched-info > > ## Displays the name of the current scheduler (sedf/bvt) > > > > $ xm sched-param [domid] > > ## If domid is supplied, then the scheduler parameters for the > > corresponding domain is displayed, else scheduler parameters for all > > the domains are displayed. > > > > Example: > > > > [root@tux06 ~]# xm sched-info > > Domain Scheduler : bvt > > > > [root@tux06 ~]# xm sched-param > > > > Scheduler : bvt > > --------------- > > Domain MCuAdv WarpBack WarpValue WarpL WarpU > > 0 20 80 99 > > 2000000 9000000 > > 88 20 80 91 > > 2000000 9000000 > > 90 10 0 0 > > 2000000000000000 1000000000000000 > > > > > > The above commands will aid an administrator in monitoring and > > modifying scheduler related parameters for a pool of Xen virtual > > machines. > > > > Please review and let me know your comments on this patch. > > > If you''re going to patch xm, could you please also update the man page > and the documentation? > > Thanks, > Dan > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ewan Mellor
2006-Apr-04 13:02 UTC
[Xen-users] Re: [Xen-devel] [PATCH] Displaying scheduler related information using xm
On Mon, Mar 13, 2006 at 11:37:51AM +0530, Subhabrata Bhattacharya wrote:> Hi All, > > The attached patch adds two simple scheduler related capabilities to > the xm tool. > > [Snip] > > diff -Naurp xen-3.0.0/tools/python/xen/xend/XendClient.py xen-3.0.0-sched-param/tools/python/xen/xend/XendClient.py > --- xen-3.0.0/tools/python/xen/xend/XendClient.py 2005-12-05 04:06:31.000000000 +0530 > +++ xen-3.0.0-sched-param/tools/python/xen/xend/XendClient.py 2006-03-09 12:58:36.000000000 +0530 > @@ -291,6 +291,31 @@ class Xend: > ''extratime'' : extratime, > ''weight'' : weight }) > > + ##Scheduler information interface > + def xend_sched_id(self): > + import xen.lowlevel.xc > + xc = xen.lowlevel.xc.xc() > + sched_id = xc.sched_id() > + return sched_id > + > + def xend_sched_param(self, id): > + > + sched_param = {} > + import xen.lowlevel.xc > + xc = xen.lowlevel.xc.xc() > + if id != -1: > + sched_param[0] = xc.sched_param(id) > + else: > + domid = 0 > + icnt = 0 > + domlist = xc.domain_getinfo() > + for d in domlist: > + domid = d[''dom''] > + sched_param[icnt] = xc.sched_param(domid) > + icnt += 1 > + > + return sched_param > + > def xend_domain_maxmem_set(self, id, memory): > return self.xendPost(self.domainurl(id), > { ''op'' : ''maxmem_set'',Hi Subhabrata, What you''ve done here is put the actual interfacing with Xen (i.e. the xc calls) into XendClient, the code running as the client (xm). This will mean that this code will work fine when you are running xm on the machine that you are monitoring, but it won''t work at all in other situations. In the long run, people will be using libvirt, for example, to talk XML-RPC to Xend to manage a machine remotely, and your code won''t work in that situation, because you have no server-side aspect to your code. Follow the path for something like getVCPUInfo from main.py into XMLRPCServer.py and XendDomainInfo.py -- you ought to be doing something like that, I think. Note also that XMLRPCServer is new since your patch and more or less removes the need for XendClient.py. It''s hopefully simpler, so shouldn''t give you any difficulty. The rest of your patch looked good to me. I''m not an expert on the scheduler side of things, so someone else might comment, but it looked OK to me. Thanks, Ewan. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users