Hi xen-users from what I understood, RAM and the number of CPUs cannot be increased for a running guest, but decreased and re-increased later. So in order to have some headroom later, I want to assign (ie) 2 VCPUs and 512 MB of RAM in the config file, but reduce those settings to 1 VCPU and 256 MB at boot time. So if the machine requires more power, I can assign more RAM or one more VCPU later. So what I''m thinking about is writing a startup script in order to do this if nothing like that is available yet. Another thing I want to integrate is to set sched-credit weight and cap at boot time. It would be even nicer to have this in xm, but unfortunately, I am not a C-programmer myself. Any thoughts/wishes about what else one might want to do with such a script? Regards Dominik _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Petersson, Mats
2007-Mar-15 12:42 UTC
RE: [Xen-users] Dynamically assign Hardware Resources
> -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of > Dominik Klein > Sent: 15 March 2007 10:02 > To: xen-users@lists.xensource.com > Subject: [Xen-users] Dynamically assign Hardware Resources > > Hi xen-users > > from what I understood, RAM and the number of CPUs cannot be > increased > for a running guest, but decreased and re-increased later. > > So in order to have some headroom later, I want to assign > (ie) 2 VCPUs > and 512 MB of RAM in the config file, but reduce those settings to 1 > VCPU and 256 MB at boot time. So if the machine requires more > power, I > can assign more RAM or one more VCPU later.For the memory assignment, there already are two different parameters, maxmem and memory, so it shouldn''t be too difficult to set maxmem to a larger amount than memory. I guess it would need implementing a new variable in the config file, but that''s probably not really difficult. Adding a "max vcpu" value would most likely require a little bit more work, as you''d have to allocate the extra VCPU''s up-front in the domain creation, and just not set them to runnable.> > So what I''m thinking about is writing a startup script in order to do > this if nothing like that is available yet. Another thing I want to > integrate is to set sched-credit weight and cap at boot time. > > It would be even nicer to have this in xm, but unfortunately, > I am not a > C-programmer myself.xm is written in python, so you don''t need to know C (but I guess if you don''t know Python, that''s not really a help). However, some of the work described above would require changing the libxc and perhaps even the core of the hypervisor to allow the functionality to be implemented. -- Mats> > Any thoughts/wishes about what else one might want to > do with such a script? > > Regards > Dominik > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> For the memory assignment, there already are two different parameters, > maxmem and memory, so it shouldn''t be too difficult to set maxmem to a > larger amount than memory. I guess it would need implementing a new > variable in the config file, but that''s probably not really difficult.Okay. Thank you.> Adding a "max vcpu" value would most likely require a little bit more > work, as you''d have to allocate the extra VCPU''s up-front in the domain > creation, and just not set them to runnable. > >> So what I''m thinking about is writing a startup script in order to do >> this if nothing like that is available yet. Another thing I want to >> integrate is to set sched-credit weight and cap at boot time. >> >> It would be even nicer to have this in xm, but unfortunately, >> I am not a >> C-programmer myself. > > xm is written in python, so you don''t need to know C (but I guess if you > don''t know Python, that''s not really a help).True :(> However, some of the work described above would require changing the > libxc and perhaps even the core of the hypervisor to allow the > functionality to be implemented.So I just started writing the (shell)script. I will post it here when I think it''s usable. Regards Dominik _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users