[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-users] Purpose of mem-max command
On Mon, Oct 12, 2015 at 11:01 AM, Ian Campbell <ian.campbell@xxxxxxxxxx> wrote: > On Sun, 2015-10-11 at 19:47 +0100, Simon Hobson wrote: >> Bear in mind that I'm not even an advanced user ... >> >> >> On 11 Oct 2015, at 11:45, Marco Guazzone <marco.guazzone@xxxxxxxxx> >> wrote: >> >> > What I don't understand is how to use it effectively. >> > Could you provide a practical example of how to use it? >> >> I don't know if it works on an already running VM > > You would need a kernel which supports memory hotplug and not just > ballooning. Support for memory hotplug is quite new in Xenified mainline > Linux, I'm not sure when it was added. Hopefully the keywords will be > sufficient for some search engine. > [...] > >> AIUI, when a machine (whether virtual or bare metal) starts up, certain >> memory structures (kernal tables) are setup based on the amount of memory >> installed. > > Correct. > >> I assume that this constrains the machine from dynamically adding memory >> above what was present at startup - or in this context, configured by the >> maxmem argument to Xen. > > Mostly correct, it's this "dynamically adding memory" (or more accurately > "banks of memory") which then requires hotplug and not just regular > ballooning. > > (You can, sort of, think of memory hotplug as being coarse grained and > ballooning more granular, kind of). > > > Ian. Dear all, Thank you for your replies. Your suggestions are clear to me, but I still don't understand the purpose "xl mem-max" command. :-) Also , maybe I misunderstood the memory ballooning and the poplutae-on-demand techniques. From this article, https://blog.xenproject.org/2014/02/14/ballooning-rebooting-and-the-feature-youve-never-heard-of/ it seems that the guest OS should think to have the maximum amount of RAM configured with "maxmen": Instead, from experiments (including the ones you suggested), the amount of memory the guest OS sees is the one configured with "memory" (in the configuration file) or set with "xl mem-set". For instance, in the Simon's example, the guest OS sees 512MB and not 2GB. Similarly, in the Adam's example, the guest OS sees 8GB (or 10GB, after "xl mem-set 10g") and not 20GB. In both cases, if I attempt to allocate (e.g., with calloc) an amount of memory greater than the one specified by "memory" config parameter or set with "xl mem-set" but less than specified by "maxmem" config parameter, the allocation fails (e.g., either calloc returns NULL or the process is killed). For instance, in the Adam's example, if I calloc 12GB of RAM, the process is killed. It is as if "memory" and "xl mem-set" concerned only memory hot-plugging... Is there a way in Xen to control/emulate on-demand memory provisioning like populate-on-demand does without doing memory hot-plug (i.e., guest thinks to have X GB of RAM, but only Y < X GB of RAM is assigned)? Cheers, Marco _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxx http://lists.xen.org/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |