Re: [RFC] Memory controller exploitation in libvirt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 24 Aug 2010 13:05:26 +0530, Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> wrote:
> * Nikunj A. Dadhania <nikunj@xxxxxxxxxxxxxxxxxx> [2010-08-24 11:53:27]:
> 
> > 
> >  Subject: [RFC] Memory controller exploitation in libvirt
> > 
> >  Corresponding libvirt public API:
> >  int virDomainSetMemoryParamters (virDomainPtr domain, 
> >      				  virMemoryParamterPtr params, 
> >       		                  unsigned int nparams);
> >  int virDomainGetMemoryParamters (virDomainPtr domain, 
> >      				  virMemoryParamterPtr params, 
> >       		                  unsigned int nparams);
> > 
> > 
> 
> Does nparams imply setting several parameters together? Does bulk
> loading help? I would prefer splitting out the API if possible
> into
Yes it helps, when parsing the parameters from the domain xml file, we can call
this API and set them at once. BTW, it can also be called with one parameter
if desired.

> 
>         virCgroupSetMemory() - already present in src/util/cgroup.c
>         virCgroupGetMemory() - already present in src/util/cgroup.c
>         virCgroupSetMemorySoftLimit()
>         virCgroupSetMemoryHardLimit()
>         virCgroupSetMemorySwapHardLimit()
>         virCgroupGetStats()
This is at the cgroup level(internal API) and will be implemented in the way
that is suggested. The RFC should not be specific to cgroups. libvirt is
supported on multiple OS and the above described APIs in the RFC are public
API.

> >     SwapHardLimits (memory.memsw_limit_in_bytes) - Maximum swap 
> >     SwapSoftLimits (Currently not supported by kernel) - Desired swap space 
> > 
> 
> We *dont* support SwapSoftLimits in the memory cgroup controller with
> no plans to support it in the future either at this point. The
Ok.

> >     Tunables memory.limit_in_bytes, memory.softlimit_in_bytes and
> >     memory.memsw_limit_in_bytes are provided by the memory controller in the
> >     Linux kernel.
> >     
> >  I am not an expert here, so just listing what new elements need to be added
> >  to the XML schema:
> > 
> >  <define name="resource">
> >     <element memory>
> >     	<element memoryHardLimit/>
> >     	<element memorySoftLimit/>
> >         <element memoryMinGaurantee/>
> >         <element swapHardLimit/>
> >         <element swapSoftLimit/>
> >     </element>
> >  </define>
> > 
> 
> I'd prefer a syntax that integrates well with what we currently have
> 
>         <cgroup>
>                 <path>...</path>
>                 <controller>
>                 <name>..</name>
>                 <soft limit>...</>
>                 <hard limit>...</>
>                 </controller>
>         ...
>         </cgroup>

Again this is a libvirt domain xml file, IMO, it should not be cgroup specific.

Nikunj

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]