Windows 10: VM's Don't Over commit RAM ( set Dynamic RAM on HYPER-V)

Discus and support VM's Don't Over commit RAM ( set Dynamic RAM on HYPER-V) in Windows 10 Virtualization to solve the problem; Hi there Even if you are using a 64 Bit OS don't over commit RAM when the VM starts - HYPER-V allows you to set DYNAMIC RAM which means the OS will... Discussion in 'Windows 10 Virtualization' started by jimbo45, Oct 7, 2014.

  1. jimbo45 Win User

    VM's Don't Over commit RAM ( set Dynamic RAM on HYPER-V)


    Hi there

    Even if you are using a 64 Bit OS don't over commit RAM when the VM starts - HYPER-V allows you to set DYNAMIC RAM which means the OS will grab more when it needs it - and then of course you can run MORE VM's or have a better throughput on your HOST.

    If you are using HYPER-V set DYNAMIC RAM - check the box on Memory configuration for the VM.

    Here's my current memory use on a W10 HYPER-V VM -- running a 32 bit version of OFFICE 2010 (EXCEL).

    Maybe I should have used 500MB as start up instead of 2000 MB - (2GB).

    Cheers.

    jimbo

    :)
     
    jimbo45, Oct 7, 2014
    #1

  2. delete this

    Install the hyper-v manager through windows features (if your hardware supports it and you are running win 10 PRO)>create a new VM>give it 25% or your ram.>install an OS>etc, etc, etc
     
    ZigZag3143 (MS -MVP), Oct 7, 2014
    #2
  3. Hyper-V on Windows 10 version 1703 - VM's freeze for 2-3 minutes during each Turn Off, Shut Down, Pause, Reset, or Restart, whether initiated from Host or Guest

    I think you are on the right track!

    I just tried switching my Windows 8 VM's Automatic Stop Action to
    Turn off the virtual machine
    and it only took 7 seconds to Shut Down this time. I will try this on my other VM's.

    Still there may have been a change along the way with Hyper-V. I have traditionally specified 4GB RAM on most of my VM's. 3+ minutes seems like a long time to write out 4GB of RAM, and why it would need to do so during a Restart, Pause or Reset is a mystery
    to me.

    Another thing that I could try is to relocate the Smart Paging File Location to my SSD, instead of to the hard disk where my Hyper-V VHD's are stored.
     
    Don Cuthbert, Oct 7, 2014
    #3
  4. Kari Win User

    VM's Don't Over commit RAM ( set Dynamic RAM on HYPER-V)

    Jimbo, set the max RAM value lower, you have now the default value of 1 TB there!


    VM's Don't Over commit RAM ( set Dynamic RAM on HYPER-V) [​IMG]
     
    Kari, Oct 7, 2014
    #4
  5. LMiller7 Win User
    Jimbo45 and Kari understand this well but others may have difficulty.

    With most virtual machines such as VirtualPC and VirtualBox you must specify how much memory will be assigned to the client OS. When the client OS starts the virtual machine grabs this amount of RAM from the host and keeps it until it terminates. This is simple but has a serious potential problem. If the client OS isn't actively using the memory assigned it will be depriving it's use to the host system which may run short. The host memory manager can't use this memory because it belongs to the virtual machine. This permanent allocation of RAM is a very system unfriendly thing to do but that is the way most virtual machines are designed. With normal applications the system memory manager has almost full control over how much memory each application will get and how long it can keep it.

    HYPER-V has a better way. You can specify a minimum and maximum range of memory the virtual machine can use. The memory usage of the client varies dynamically according to it's needs, not some fixed value set by the user. The problem occurs when you set the upper limit too high.

    I don't know if this dynamic behavior is ultimately under the control of HYPER-V or the system memory manager. Maybe Jimbo or Kari knows.
     
    LMiller7, Oct 7, 2014
    #5
  6. Kari Win User
    Not completely, the system has some design flaws. An example scenario;

    I run Windows 7 Ultimate vm in Hyper-V with dynamic memory, startup 2 GB, min 512 MB max 4 GB. In this Windows 7 vm I have installed Virtual PC and XP Mode (yes, just for fun of it!). XP Mode has 1 GB RAM assigned to it.

    When I launch XP Mode immediately after booting the Win7 vm, it has enough RAM to run. The same if I launch it after first having a bunch of apps open in Win 7 vm and then closing them all. In these both cases Win 7 vm has enough RAM to give 1 GB to XP Mode and let it run.

    However, if the Win 7 vm is idle a few minutes, it drops excessive RAM and only uses something in between the min assigned 512 MB and 1 GB. Launching XP Mode now fails due "Not enough memory", (as far as I have noticed) Hyper-V can only assign more RAM on the run slowly; launching apps which bring the used RAM close to what the vm at that point has to offer, Hyper-V gives more bit by bit.

    The above example might not be a very good one, usually Hyper-V is quite good with RAM allocating, the problem is apps and programs like XP Mode in my example which require more than usual startup RAM.
     
    Kari, Oct 7, 2014
    #6
  7. I don't think Jim set the max that high, but he should set it lower than the physical memory, leaving some memory for the host and other machines.

    I noticed that Hyper-V sets an unrealistic max memory - so users have to explicitly lower it when they choose dynamic memory. I don't recall this when I first started playing with Hyper-V, but noticed it after a few VM were built.

    I think that was because I initially set up the machne(s) with a fixed amount and then changed it to dynamic in the VM settings. In other words, if I set dynamic memory in the VM wizard, the max is crazy high. If I set a fixed memory amount and after the VM is created, change it to dynamic the max is ???? (I forget if it was blank or the physical memory amount).

    Host OS is Win8 with two guest machines (Win7 Home Premium & Win10 preview)
     
    Slartybart, Oct 7, 2014
    #7
  8. Kari Win User

    VM's Don't Over commit RAM ( set Dynamic RAM on HYPER-V)

    I don't think that either, as I mentioned in the post you quoted it looks as he was using the default value which is 1 TB.

    Especially some Linux guests take incredible amount of RAM if allowed. My rule of thumb is to always leave 2 GB minimum for host, setting the max value in virtual machines never higher than host RAM minus 2 GB.
     
    Kari, Oct 7, 2014
    #8
  9. jimbo45 Win User
    Hi there.

    Thanks everybody --

    I left the default -- wish I did have 1TB of RAM in the system -- have changed it now.

    However the point was that if you CAN set dynamic RAM (as in HYPER-V) then the VM will normally only use what it needs rather than being fixed at start time.

    VM's on the whole will EAT RAM for breakfast if they are allowed to.

    Cheers
    jimbo
     
    jimbo45, Oct 8, 2014
    #9
  10. jimbo45 Win User
    Hi there

    I think that's the problem of running a 2nd level Virtual Machine -- The HYPER-V only has knowledge of what your W7 wants - when it's idle the RAM will reduce until it's just enough for the minimum of your W7 guest.

    Now starting XP mode in a W7 VIRTUAL Machine - well the XP machine thinks ITS HOST is the W7 machine which is a virtual machine - and currently only has say the idle RAM - 512MB or so -- so the XP mode fails since in ITS HOST there isn't enough RAM.


    I remember playing around with this sort of stuff when I was messing around with ESXI in a Virtual machine and then running 2nd level VM's in the ESXI virtual machine.

    Cheers

    jimbo
     
    jimbo45, Oct 8, 2014
    #10
  11. adamf Win User
    Careful setting the startup value higher than minimum also Kari. It may not boot at all if you have insufficient avaliable RAM on your system. Generally you should set the startup to the minimum.
     
    adamf, Oct 8, 2014
    #11
  12. Kari Win User
    I most politely disagree, my esteemed fellow geek, for two reasons:

    • Setting the values as in my screenshot (I use those values in Seven and Linux virtual machines) I force system to check that there's sufficient RAM available to run vm smoothly. In case of Seven and most Linux distros 1 GB is enough whereas 512 MB makes them "sticky", especially when booting up. If the assigned 1 GB is not available I don't even want to run my vm, it would be slow as hell with a 512 MB vm and less than that available on host. When booted up, I then allow the RAM be dropped to 512 MB when the vm is idle; when idle I am usually working on host which then have more resources.
    • I quite often trust default settings in most Microsoft programs. The 1 GB startup and 512 MB minimum are both default Hyper-V values when setting up a new vm.
     
Thema:

VM's Don't Over commit RAM ( set Dynamic RAM on HYPER-V)

Loading...
  1. VM's Don't Over commit RAM ( set Dynamic RAM on HYPER-V) - Similar Threads - VM's Don't commit

  2. Hyper-V VM can't ping another Hyper-V VM

    in Windows 10 Gaming
    Hyper-V VM can't ping another Hyper-V VM: Hello all,I've been working on a lab network attempting to perform a test live migration. Here is my current setup:Host 1: STAN- VM COSTELLOHost 2: OLLIE Joined to the Domain- VM ABBOTT Current Domain Controller DNS ServerI have set static IP addresses for all of these...
  3. Hyper-V VM can't ping another Hyper-V VM

    in Windows 10 Software and Apps
    Hyper-V VM can't ping another Hyper-V VM: Hello all,I've been working on a lab network attempting to perform a test live migration. Here is my current setup:Host 1: STAN- VM COSTELLOHost 2: OLLIE Joined to the Domain- VM ABBOTT Current Domain Controller DNS ServerI have set static IP addresses for all of these...
  4. V ram

    in Windows 10 Software and Apps
    V ram: Hi, what is virtual ram and how can I use it and the affects on it? Thanks. https://answers.microsoft.com/en-us/windows/forum/all/v-ram/37c5b97b-a6e0-415b-af45-108138bfa955
  5. v ram

    in Windows 10 Network and Sharing
    v ram: so i have a very low end hard drive. 57 gigabites. v ram used to take up 1 gb, now it takes up 5 gb. how do i stop it from doing this? https://answers.microsoft.com/en-us/windows/forum/all/v-ram/0001c064-b109-4f1c-b476-7a0480ae887a
  6. RAM 'Commit' issue?

    in Windows 10 Drivers and Hardware
    RAM 'Commit' issue?: Hi all - just installed Win10's latest 64-bit version (1909) on an older Toshiba Satellite C650D. Windows seems to be working fine, but is really slow. The machine has 4GB of RAM and a dual-core 2.1GHz AMD Athlon II P320 processor, so, yes, I know it's old, but it should be...
  7. RAM 'Commit' issue?

    in Windows 10 Support
    RAM 'Commit' issue?: Hi all - just installed Win10's latest 64-bit version (1909) on an older Toshiba Satellite C650D. Windows seems to be working fine, but is really slow. The machine has 4GB of RAM and a dual-core 2.1GHz AMD Athlon II P320 processor, so, yes, I know it's old, but it should be...
  8. Hyper-V VM

    in Windows 10 Updates and Activation
    Hyper-V VM: With the Hyper-V session running on my local machine. Am I allowed to create a VM using the DVD I used on the machine? https://answers.microsoft.com/en-us/windows/forum/all/hyper-v-vm/2b8f2e09-28ab-4e98-bba3-f835ac67d542"
  9. Exporting VM with hyper-v

    in Windows 10 Virtualization
    Exporting VM with hyper-v: When you export a VM with Hyper-v, does the exported VM retain the same hardware identifier as the original? I know with VMware, when you open up a backed up VM, you select "I moved it" to retain hardware identifier, and "I copied it" if you want a new identifier. Is it...
  10. Hyper-V VM has no sound

    in Windows 10 Virtualization
    Hyper-V VM has no sound: This is my first attempt at using Hyper-V. Installation in my Win 10 Pro worked well right up until I tried using the virtual machines sound. No sound device reported. I opened device manager the only option I could see was Audio inputs and outputs. Expanding and a device...
Tags: