locked
Hyper-V Dynamic memory, Driver Locked RRS feed

  • Question

  • Hello All,

    I've been wondering about the following.

    I have 2 Dell R910 (Windows Server 2008R2 SP1) machines as my Hyper-V host machines, with around 40-50 VMs running on it. For most of my servers I've enabled dynamic memory, but on some of these machines I've seen the following:

    For some reason this machine running Remote Desktop Services (with Web Access) is using around 3.8GB of memory.

    Processes list only a fraction of the actual Memory being used.

    But RAMmap shows that 2.5GB is being used by Kernel Drivers. From what I've read this might be the balooning effect of the dynamic memory. However, the RAM usage was the same yesterday evening (12h before I took these screenshots), when no one was actually working on this server.

    I've seen this happen on multiple of my guest machines, the machines are running Windows Server 2008 R2 SP1 Datacenter Edition.

    Can anyone explain to me why it is doing this?

    Thank you.

    Kind Regards,

    Tom

    Monday, May 14, 2012 9:36 AM

All replies

  • Does memory actually leak? I mean do you have page locked memory size INCREASING all the time or is it changing in both directions?

    -nismo

    Monday, May 14, 2012 1:06 PM
  • Hello Nismo,

    it's increasing and decreasing.. so it's going both ways.


    • Edited by TomRaus Monday, May 14, 2012 2:06 PM
    Monday, May 14, 2012 2:04 PM
  • Hi,

    Please try to use Resource Monitor to check whether there are any processes cause the high usage of the memory.

    Using Resource Monitor to Troubleshoot Windows Performance Issues Part 1
    http://blogs.technet.com/b/askperf/archive/2012/02/01/using-resource-monitor-to-troubleshoot-windows-performance-issues-part-1.aspx

    Thursday, May 17, 2012 7:24 AM
  • Hello Vincent,

    No you cannot see where the memory goes in Task Manager or in Resource Monitor. The only way to see it is by using RAMMAP.

    Friday, May 18, 2012 11:51 AM
  • Hi, 

    I have the same issue. In RamMap I see 18 Gb consumed by Driver locked. I have Hyper-V installed as well. 

    Any idea how to solve it?! I have 24 Gb RAM which is apparently not being used at all! 

    

    Wednesday, July 11, 2012 6:19 PM
  • I'm having the same issue. Has anyone come across anything?
    Friday, August 3, 2012 6:22 PM
  • I had the same issue in Hyper-V 2012. I disabled dynamic memory on the guest VM and the issue has not come back. It's only been a few days so I am not sure if this definitively fixed the issue or it's simply yet to reemerge but it's something.
    Tuesday, December 25, 2012 6:11 AM
  • I am facing same issue.

    Please help.

    Wednesday, May 15, 2013 10:33 AM
  • I have the same issue.  My workstation is windows 7 64bit and running on Hyper-V 2012 by dynamic memory.


    • Edited by FredYU Tuesday, May 21, 2013 2:33 PM
    Tuesday, May 21, 2013 2:33 PM
  • Same issue here. VM has Dynamic Memory; min 2048 max 6144

    Server 2008 R2 Standard running on Hyper-V Server 2012. Latest patches and integration tools on host and guest.

    Wednesday, May 29, 2013 3:32 AM
  • We have the same problem. Server has 24GB, but 18GB is being used by driver locked. Server has been running fine for over a 1 year. Problem started last week.

    Anyone find a fix for this?

    Tuesday, July 23, 2013 11:38 AM
  • We have the same problem. Server has 24GB, but 18GB is being used by driver locked. Server has been running fine for over a 1 year. Problem started last week.

    Anyone find a fix for this?

    Guys. It's not a problem and it don't require any fixes: it's just a way how DM works. This amount of memory allocated by Hypervisor according to VM DM settings - it's locked on one guest OS, but it's available to allocate memory from this pool to another VMs on demand. If source VM will need more memory - hypervisor will give it back and driver locked area will be smaller.

    Active Directory? Ask me how.

    Monday, August 5, 2013 6:49 AM
  • Please check this write up about driver locked memory and what you can do to "solve" it.

    http://blog.luxem.org/2013/05/driver-locked-memory-on-hyper-v-guests.html

    TL:DR

    Basically, it's Hyper-V functionality.

    To "fix" turn of your VM, disable dymamic memory on your VM and set the amount of memory you want to use on your VM. (restart your VM ;) )

    • Proposed as answer by Diablo_rdk Friday, August 30, 2013 8:00 AM
    Friday, August 30, 2013 7:59 AM
  • https://blogs.technet.com/b/vm/archive/2011/01/13/hyper-v-r2-service-pack-1.aspx

    How does a virtual machine memory is taken ?

    The method of " balloon " - in the guest OS specific driver begins to consume the allocated memory , taking it to the OS in a VM could not refer to it , and in fact , giving the allocated memory hypervisor for other virtual machines. The guest OS continues to believe that her "a lot" of memory, it just kind of busy process and marked as «driver locked». When subsequent addenda to the memory of this virtual machine will be added to the memory address space of the process - and released them for the needs of the OS.

    Have a nice day !!!

    Monday, February 24, 2014 11:01 AM
  • It is not a bug. Applications and services that use a static memory allocation model do not work well with Dynamic memory because static and dynamic are antonyms. If you have an application that attempts to acquire a fixed amount of memory at startup, then you must use at least that number for the Startup memory amount, and likely for the Minimum memory amount as well, in order to give that application a fighting chance to allocate the static amount of memory that it needs. Otherwise, what it does is look for that amount of memory, determines that it's not there, and then throws its hands up in futility without ever giving Dynamic Memory the chance to try to allocate it.

    Eric Siron
    Altaro Hyper-V Blog
    I am an independent blog contributor, not an Altaro employee. I am solely responsible for the content of my posts.

    Friday, December 12, 2014 3:02 PM
  • i have the same problem and i have asked it to my vps provider.

    hyper v has enabled dynamic memory. this means that if your vps has max 8gb of ram you can scale to that. otherwise hyper-v will allocate just what your vps needs + a little buffer. this results in 90% ram usage.

    BUT

    windows taskmanager doesnt know this system since it is a simulation. thats why the 90% ramusage is displayed. as soon as you start to use more ram the "Driver locked" usage will drop to make space for actual ramusage for your vps.

    example:

    - De VM has 4 GB RAM
    - De VM needs 1,2 Gb RAM
    - Hyper-V will assign 1,2 GB + Buffer: total arround 1,33 GB
    - In the task manager this results in a huge memory usage (90%). In real time it is 1,2 Gb of total 1,33 Gb RAM usage.
    - Windows assumes there is 4 Gb RAM in the server, so the task manager will show 3,6 Gb RAM in use (90% of 4 Gb).

    Friday, June 12, 2015 1:52 PM
  • I had the same issue and was pulling my hair out trying to figure out what was causing the RAM on my VM to be maxed out.

    Turned off the VM, disabled dymanic memory and poof.  Problem Solved!  VM is now running smoothly.

    Thank you all for sharing your findings!

    Friday, September 15, 2017 5:16 PM
  • Again, this is not a "problem". This is the technique that Dynamic Memory uses to reclaim memory for the host to distribute to other virtual machines. "Fixing" it means permanently allocating memory to virtual machines that you have proof that they're not using. It's a waste.

    Eric Siron
    Altaro Hyper-V Blog
    I am an independent contributor, not an Altaro employee. I accept all responsibility for the content of my posts. You accept all responsibility for any actions that you take based on the content of my posts.

    Friday, September 15, 2017 5:22 PM
  • Again, this is not a "problem". This is the technique that Dynamic Memory uses to reclaim memory for the host to distribute to other virtual machines. "Fixing" it means permanently allocating memory to virtual machines that you have proof that they're not using. It's a waste.

    Eric Siron

    I am an independent contributor, not an Altaro employee. I accept all responsibility for the content of my posts. You accept all responsibility for any actions that you take based on the content of my posts.

    seriously ... thank you

    1. first time logging in to a brand new shiny VM for the first time on 2012.
    2. PANIC ALL THE MEMORY IS IN USE!!! RAMMAP DRIVER LOCKED AHHH
    3. google google google
    4. TADA - perfect, succinct answer. 

    WHEW

    Monday, October 23, 2017 7:05 PM