[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 4 of 4] xenpaging: initial libxl support
On Tue, Jan 10, George Dunlap wrote: > On Mon, 2012-01-09 at 19:21 +0000, Olaf Hering wrote: > > So there is that maxmem= setting to let the guest OS configure itself > > for a given amount of pseudo-physical memory. Then there is a way to cut > > down the guest OS memory usage, both with balloon driver in guest and > > later with PoD. > > Isnt paging a better (or: just different) way to control the memory > > usage of a guest OS (It costs diskspace in dom0)? > > On the contrary, hypervisor swapping is definitely *much worse* than > using a balloon driver. The balloon driver was an innovation developed > specifically to avoid hypervisor swapping if at all possible[1]. We > need hypervisor swapping as a back-stop for situations where the balloon > driver is non-existent, or can't function immediately for some reason > (e.g., we've been using page-sharing to do memory overcommit and > suddenly have a bunch of pages un-shared); but it should always be a > last resort, and would ideally be mitigated by the balloon driver as > soon as possible. Isnt that up to the host admin to decide where to take the memory from? So if its acceptable to swap parts of a VM (independent from what the guest OS thinks it has), so be it. We just need to right knobs. So far we have two knobs: maxmem= xl mem-max memory= xl mem-set (and guest OS balloon driver via sysfs) Another knob for paging is needed. A while ago you proposed two new commands: mem-balloon_target and mem-swap_target. Perhaps these terms should be used also in the config file to set the initial memory/target and memory/target-tot_pages values. If the latter is set, start the pager. And if the latter is called, start the pager if it doesnt run already. At some point we will have the code ready so that PoD and paging can coexist, so that the guests memory usage can grow on guests demand as it does now. This is just a detail, independent from config options and commands. To summarize: maxmem= ; xl mem-max memory= mem-balloon_target= ; xl mem-balloon_target, xl mem-set mem-swap_target= ; xl mem-swap_target The rule could be like this: mem-swap_target <= mem-balloon_target <= mem-max > > What if the config format is like this: > > > > Do things as they were done until now (PoD + balloon driver): > > memory=3072 > > maxmem=4096 > > paging=0 (or not specified at all) > > > > Do things with pager instead of balloon driver and/or PoD: > > memory=3072 > > maxmem=4096 > > paging=1, or xenpaging=1 > > xenpaging_extra=[ '-f', '/path/to/pagefile_guestname' ] (optional) > > Except that this makes paging and ballooning mutually exclusive. What > we want is to make them work together -- to have paging as a back-up > when ballooning fails (or isn't fast enough). ballooning in the guest will still work. For example via sysfs, the guest driver can release pages any time it wants to. But with the above knobs the balloon driver can still be tweaked from the host. Olaf _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |