Observing Dynamic Memory in Linux VMs on WS2012 R2 Hyper-V

There are a number of improvements to Linux Support in Windows Server 2012 R2 Hyper-V.  One of the ones we figured out before the announcements, thanks to the public nature of the Linux builds (Linux Integration Services are in the kernel), was the added support for Dynamic Memory in Linux guest OSs … only supported on WS2012 R2 Hyper-V, even if you can get it working on WS2012 Hyper-V.

I set up a Ubuntu 13.04 VM … the install on my virtual SOFS via SMB 3.0 was quick because I was using iWARP NICs with vRSS enabled in the guest OS of the virtual file servers.  I configured the memory of the VM as follows.  Note that the Minimum RAM (if idle and the guest OS is able) is 32 MB.


I booted the Ubuntu VM up, let it sit for a couple of minutes, and this is what I saw:


The memory pressure was low, so the VM ballooned down from the Startup RAM of 1024 MB down to 150 MB, then 144 MB, and then 139 MB.  I’m not even going to say that this would be the lowest point; the memory demand (95 MB above) and assignment (139 MB above) dropped every few minutes while writing this post.  Nice Smile  This will be very good news for hosting companies and large enterprises that want to use Hyper-V to run lots of Linux guests, in addition to the other features that WS2012 R2 Hyper-V can offer.

FYI: do not set up DM for Linux guest as I did.  I suspect a bug (and have logged one): DM and the the guest OS will do their best to get the VM down to the minimum RAM.  So much so, that the OS kills processes one by one until the kernel panics, somewhere at around 121 assigned MB RAM Smile  So be a little more realistic with the minimum RAM setting.

5 thoughts on “Observing Dynamic Memory in Linux VMs on WS2012 R2 Hyper-V”

  1. Aidan, can show system load ‘w command’? When I enable dynamic memory, I see load 1. When the system doesn not work, load should be 0. I think here is a bug.

  2. I believe what Artenmonk meant was something I experienced on WS 2012 (R1) and Centos 6.4. I noticed that dynamic memory was functioning and it seemed to adjust reasonably well. However, when you looked at an idle system, the load via ‘w’ or ‘uptime’ was always 1.00 rather than 0.00, but only when dynamic memory was enabled. Inside the WS2012 host, there did not appear to be any CPU load. I also experienced a few crashes of that VM. Disabling dynamic memory made it function normally and stable. I hope to re-test it with R2 soon.

  3. instead the LIS was installed some Linux versions like CentOS 5.x or 6.x did say they have this support I don`t foud working because:

    – After the Hyper-V recover the memory not used from Guest (Balloon), the Kernel see too much pressure on physical memory because all of these memory catched by Hypervisor goes to a unknown memory area, so the Kernel thinks the virtual memory are with too much pressure where they cannot do too much “cache disk”, they start consume SWAP memory after a time some app are killed by OOM-Killer (Out-of-Memory Killer) just to keep the system running.

    Yes, we are in 2015 and I don’t found a real answer or good solution to solve this, instead of reinstall the system with a new version (like RHEL 7.x , CentOS 7.x or Ubuntu 14.04 LTS)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.