[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 4 of 4] xenpaging: initial libxl support
Lets resume this discussion now to get it sorted out for 4.2. On Tue, Nov 22, George Dunlap wrote: > On Mon, Nov 21, 2011 at 3:13 PM, Olaf Hering <olaf@xxxxxxxxx> wrote: > > On Mon, Nov 21, Stefano Stabellini wrote: > > > >> what if tot_memkb is bigger than target_memkb? Or even bigger than > >> max_memkb? > > > > tot_memkb is unrelated to target_memkb, also somewhat unrelated to > > max_memkb. > > It seems to me the opposite: tot_memkb (as you're describing here) and > target_memkb both mean, "How much Xen memory the administrator wants > allocated to the VM." Before either paging or PoD, the only way to > modify the amount of memory allocated to a VM was via the balloon > driver. PoD introduced a mechanism that allows the domain builder to > start a VM with less memory than static_max, and allow the VM to run > until balloon driver can normalize things. Paging introduces a > separate mechanism for the administrator to modify the amount of > memory allocated to the VM. > > It seems to me like paging and ballooning should both use > target_memkb. We just need to figure out how to make sure that paging > only comes on when it's needed. When it might be needed includes: > * For guests that don't have a balloon driver > * For guests whose balloon driver is not meeting target_memkb (either > because it's unresponsive, rebellious, or because it can't get more > memory from the guest OS) > * Potentially, between domain creation and the time the balloon driver > comes up (i.e., replacing PoD). > > It seems like having some kind of a flag or setting would be better. > Various factors: > * Do we start the paging daemon? > * Do we use paging during boot? Only matters if max_memkb != > target_memkb. If no, the domain builder uses PoD mode. If yes, the > domain builder will fill in target_memkb worth of guest memory, and > then fill the rest with swapped-out entries. (If max_memkb == > target_memkb, domain builder fills in all entries.) > * When does the paging daemon respond to changes to target_memkb? > This could be: > - Immediately (assume no balloon driver) > - PoD mode: Start immediately, but when you notice the balloon driver > reaching the initial target_memkb, turn off, or switch into the next > mode > - Fallback mode: Pay attention to changes in target_memkb, but don't > act immediately. Wait for paging_delay secs for the balloon driver to > handle it; if it doesn't respond, then start paging (and perhaps > switch to "Immediately" mode). > > What do you think? 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)? If a guest OS is configured with maxmem=4096, but then restricted with memory=3072 in the next line, why is maxmem= there in the first place? Would it clearer to say: The guest OS has a certain workload which requires 3072MB. But maybe at some point the guest needs the full 4096MB, then it can access all of it at the cost of some IO due to swapping in dom0. I think the balloon driver in the guest is not really needed anymore, it could just be there and do nothing. IF there is physical memory to release to the host, the pager can do it on behalf of the balloon driver. 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) And have mem-set adjust memory/target-tot_pages to tell pager about the new target. The builder could create some sort PoD for a paged guest so that during startup only the amount of memory= needs to be allocated. This needs to be implemented, right now a starting guest needs the full amount of memory until the pager starts to page-out pages. Olaf _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |