* Nikunj A. Dadhania <nikunj(a)linux.vnet.ibm.com> [2010-10-18 14:03:53]:
On Mon, 18 Oct 2010 09:55:46 +0200, Matthias Bolte
<matthias.bolte(a)googlemail.com> wrote:
> 2010/10/18 Nikunj A. Dadhania <nikunj(a)linux.vnet.ibm.com>:
> > From: Nikunj A. Dadhania <nikunj(a)linux.vnet.ibm.com>
> >
> > docs/formatdomain.html.in: Add memtune element details
[...]
> > @@ -211,6 +216,22 @@
> > <code>hugepages</code> element set within it. This tells
the
> > hypervisor that the guest should have its memory allocated using
> > hugepages instead of the normal native page size.</dd>
> > + <dt><code>memtune</code></dt>
> > + <dd> The optional <code>memtune</code> element
provides details
> > + regarding the memory tuneable parameters for the domain. If this is
> > + omitted, it defaults to the OS provided defaults.</dd>
> > + <dt><code>hard_limit</code></dt>
> > + <dd> The optional <code>hard_limit</code> element is
the maximum memory
> > + the guest can use. The units for this value are kilobytes (i.e. blocks
> > + of 1024 bytes)</dd>
>
> Well, the maximum of memory a guest can use is also controlled by the
> memory and currentMemory element in some way. How does hard_limit
> relate to those two?
>
memory and currentMemory are related to balloon size, while these are operating
system provided limits.
> > + <dt><code>soft_limit</code></dt>
> > + <dd> The optional <code>soft_limit</code> element is
the memory limit to
> > + enforce during memory contention. The units for this value are
> > + kilobytes (i.e. blocks of 1024 bytes)</dd>
>
> Is this an upper or a lower limit? Does it mean in case of contention
> this guest may only use up to soft_limit kilobytes of memory (upper
> limit)? Or does it mean in case of contention make sure that this
> guest can access at least soft_limit kilobytes of memory (lower
> limit)?
>
Upper limit of memory the guest can use(i.e upto soft_limit) during
contention. Balbir, correct me if this isn't correct.
Yes, that interpretation is correct. We try to push back the guest to
soft limit on contention, this is typically the case when the guest
uses more than the assigned soft limit.
> How does this relate to the memory and currentMemory element?
>
At present no relation, they are implemented by the OS.
This feature allows us to set useful limits, on lack of contention no
limits are enforced (IOW, this is work conserving so to speak).
> How does it related to the min_guarantee element?
>
It is not related to min_guarantee.
> > + <dt><code>swap_hard_limit</code></dt>
> > + <dd> The optional <code>swap_hard_limit</code> element
is the maximum
> > + swap the guest can use. The units for this value are kilobytes
> > + (i.e. blocks of 1024 bytes)</dd>
>
> What about the min_guarantee element anyway? It's not implemented in virsh.
>
Missed it, I will add the docs about min_gaurantee and send the updated
patch. It is not implemented in virsh. However, I have taken care of parsing
them in domain configuration.
--
Three Cheers,
Balbir