Mailing List Archive

auto adjusting memory (was: system suggestion)
Mark Williamson wrote:
>>IMO, the limiting factor is not CPU but RAM available to a virtual
>>machine. it would be nice if there were some way to let memory float
>>between virtual machines based on need. In the other hand, it may be
>>there already and I just haven't figured it out.
>
> It doesn't happen automatically - you'd have to use the balloon driver
> to shrink one domain and grow another one. A feature we'd like to see
> is "auto-ballooning" where dom0 will adjust domU memory footprints
> based on their current utilisation. This is likely to appear at some
> stage in the future...

How would you determine actual utilisation when linux likes to eat all
the ram available?

Would you go by swap file usage, or something else?

(Feel free to tell me I'm under-educated about *nix systems, if necessary.)

--
Andrew Thompson
http://aktzero.com/
Re: auto adjusting memory (was: system suggestion) [ In reply to ]
> > It doesn't happen automatically - you'd have to use the balloon driver
> > to shrink one domain and grow another one. A feature we'd like to see
> > is "auto-ballooning" where dom0 will adjust domU memory footprints
> > based on their current utilisation. This is likely to appear at some
> > stage in the future...
>
> How would you determine actual utilisation when linux likes to eat all
> the ram available?
>
> Would you go by swap file usage, or something else?

You could try to monitor the domain's "activeness" purely externally (e.g. by
monitoring CPU usage, disk and net usage, etc.) and then speculatively give
the domain more RAM (you could even monitor whether the activity changed, so
as to infer whether the extra RAM made a difference). This is probably not
the most effective way to go about things, however.

A more complete solution would be to add a "domain load" control message, to
allow domains to explicitly report various load statistics back to a daemon
in domain 0. This daemon would implement policy for how to balloon the
guests based on:
* reported loads to all guests
* configurable minimum / maximum memory limits per domain
* (perhaps) configuration details regarding the relative "importance" of
domains

The daemon could also kill domains if they don't co-operate with the
ballooning process (e.g. take excessively long in returning memory to the
system).

This sort of flexible memory allocation policy will improve utilisation and
may be particularly desirable where all domUs are owned by the same entity
(e.g. in a corporate cluster). In a virtual hosting scenario, you can still
have static memory allocations to ensure users get the amount of memory they
pay for (or you could have the daemon record auto-ballooning, so you can
charge by actual memory usage).

HTH,
Mark

_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users