[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-users] Purpose of mem-max command
On 11/10/15 21:45, Marco Guazzone wrote: On Sat, Oct 10, 2015 at 6:36 PM, Simon Hobson <linux@xxxxxxxxxxxxxxxx> wrote:Marco Guazzone <marco.guazzone@xxxxxxxxx> wrote:I don't understand the behavior of the "xl mem-max" command. The help says: "Set the maximum amount reservation for a domain." But if I try to use it I see no effect on the target domain. It seems that only the "xl mem-set" command has effect on the VM.That sounds correct. mem-max sets the maximum that mem-set can configure. I can't see that it's that useful from the command line, but I have mem-max set is several of my config files where I want to start a machine with a configured amount of ram, but have the option to increase it later (typically because I've had to cut some machines down to shoehorn another VM onto the host)Hi Simon, What I don't understand is how to use it effectively. Could you provide a practical example of how to use it? Let me show you some of tests I've done (sorry for the length of the message). Before performing a test, I always reboot the VM to cancel the effects of previous tests My CentOS 7 VM, called 'memtest', is statically configured (in the config file) to have 8GB of memory: maxmem = 8192 memory = 8192 Indeed, once booted I get $ xl list Name ID Mem VCPUs State Time(s) Domain-0 0 71845 16 r----- 12630.1 memtest 35 7935 4 -b---- 10.0 and inside the VM [root@memtest ~]# free -h total used free shared buff/cache available Mem: 7.5G 106M 7.4G 8.3M 89M 7.3G Swap: 1.0G 0B 1.0G - TEST #1 $ xl mem-max memtest 3g libxl: error: libxl.c:3916:libxl_domain_setmaxmem: memory_static_max must be greater than or or equal to memory_dynamic_max : Success cannot set domid 35 static max memory to : 3g Try this test, in the config file: maxmem = 20480 memory = 8192 When you start the VM, it should have 8GThen, you can allocate some extra RAM (note, you are changing the amount of memory, not the "maximum" amount that could be allocated. xl mem-set memtest 10g Now you should see the VM has extra RAM available. So, from these test it seems that the take-home lesson is to never use "xl mem-max" since it has no effect. Where am I wrong? Thank you very much for your help. Best, Marco _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxx http://lists.xen.org/xen-users Regards, Adam -- Adam Goryachev Website Managers www.websitemanagers.com.au _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxx http://lists.xen.org/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |