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

Re: [libvirt] [PATCH] Update docs for memory parameters and memtune command



2010/10/18 Nikunj A. Dadhania <nikunj linux vnet ibm com>:
> From: Nikunj A. Dadhania <nikunj linux vnet ibm com>
>
> docs/formatdomain.html.in: Add memtune element details
> src/libvirt.c: Update virDomainGetMemoryParameters api description, make it
> more clear that the user first needs to call the api to get the number of
> parameters supported and then call again to get the values.
> tools/virsh.pod: Add usage of new command memtune in
> virsh manpage
>
> Signed-off-by: Nikunj A. Dadhania <nikunj linux vnet ibm com>
> ---
>  docs/formatdomain.html.in |   21 +++++++++++++++++++++
>  src/libvirt.c             |   20 +++++++++++++++++---
>  tools/virsh.pod           |    8 ++++++++
>  3 files changed, 46 insertions(+), 3 deletions(-)
>
> diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
> index 8ec7446..9b4c6d7 100644
> --- a/docs/formatdomain.html.in
> +++ b/docs/formatdomain.html.in
> @@ -194,6 +194,11 @@
>   &lt;memoryBacking&gt;
>     &lt;hugepages/&gt;
>   &lt;/memoryBacking&gt;
> +  &lt;memtune&gt;
> +    &lt;hard_limit&gt;1048576&lt;/hard_limit&gt;
> +    &lt;soft_limit&gt;131072&lt;/soft_limit&gt;
> +    &lt;swap_hard_limit&gt;2097152&lt;/swap_hard_limit&gt;
> +  &lt;/memtune&gt;
>   &lt;vcpu cpuset="1-4,^3,6"&gt;2&lt;/vcpu&gt;
>   ...</pre>
>
> @@ -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?

> +      <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)?

How does this relate to the memory and currentMemory element? How does
it related to the min_guarantee element?

> +      <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.

Matthias


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