WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

Re: [Xen-API] [XCP] Frequently-Asked Questions (FAQ) for Dynamic Memory

To: <xen-api@xxxxxxxxxxxxxxxxxxx>, <george.shuklin@xxxxxxxxx>
Subject: Re: [Xen-API] [XCP] Frequently-Asked Questions (FAQ) for Dynamic Memory Control (DMC)
From: Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>
Date: Fri, 17 Sep 2010 14:57:00 +0100
Cc:
Delivery-date: Fri, 17 Sep 2010 06:57:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1284723524.23497.23.camel@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <4C90A80A.5030305@xxxxxxxxxxxxx> <1284566396.11256.73.camel@xxxxxxxxxxxxxxxxxxxxx> <4C93249A.9030800@xxxxxxxxxxxxx> <1284723524.23497.23.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.1.5) Gecko/20091204 Lightning/1.0b1 Thunderbird/3.0
Jonathan Knowles пишет:
However one thing not obvious from the FAQ is that the memory
ballooning daemon is a replaceable component, built separately
from Xapi, and running as a separate service on each XCP host.

George Shuklin replied:
I'm sorry, I think this point is wrong.
Balloon is not a server/dom0 component, it is a kernel module
for domU kernel. It reads from XenStore variables:

static-max = "4194304"
target = "1048576"
dynamic-min = "1048576"
dynamic-max = "1048576"

When I talk about the "memory ballooning daemon", I'm referring
to the following service that runs within domain 0:

    /etc/init.d/squeezed

The ballooning daemon is reponsible for choosing, for every VM
running on a host, a target that lies between dynamic-min and
dynamic-max. The ballooning daemon writes targets into XenStore.

The ballooning daemon's default behaviour is to assign targets
proportionally, as described in the previous mail. You can find
more information about it its design here:

    http://wiki.xensource.com/xenwiki/squeezed
    (courtesy of Dave Scott)

Of course, DMC also relies on each guest having a balloon driver
that responds appropriately to changes in its XenStore target.

So when someone set xe vm-memory-target-set (or dynamic) it
simply order to xapi master to order xapi slaves change those
values and balloon driver in domU will do all work.

The default behaviour of:
    xe vm-memory-target-set target=<x>

is equivalent to:
    xe vm-memory-dynamic-range-set min=<x> max=<x>

They both directly update the VM.memory-dynamic-{min,max} fields
with the same value.

See the following FAQ section for more details:

    http://wiki.xensource.com/xenwiki/Dynamic_Memory_Control

    Is there an equivalence between target mode and
    dynamic range mode?

George Shuklin replied:
I'd like to announce our own system named MOD (Memory on Demand)
wich one use xenballoon for graceful memory allocating to guest
machines.
Right now it under research and testing, but it looks really
good: it never steal memory to cause oom killer doing it dirty
job.

Main idea: we looking to memory data, calculating free memory
and setting target for xenballoon to preserve some amount of
free memory (We use static-min static-max values as borders
for allowed changes).

I'm intrigued.

Have you considered using dynamic-{min, max} for limits, rather
than static-{min, max}?  Using dynamic limits instead of static
limits may give administrators a little more flexibility when
constraining their VMs' memory allocations. (The current design
of XCP allows you to change the dynamic limits while a VM is
running, but changing the static limits requires you to reboot
the VM.)

Right now we using strightforward algorithm 'preserve X MiB of
free memory', in future I think we can switch to some more
intellectual algorithm with prediction system.

Out of interest, how do you measure "free" memory? Do you intend
to count buffer memory as "free"?

I'd be very interested to learn more about your design.

Cheers,
Jonathan

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api