1.    08 Oct 2014 #1

    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
    Attached Thumbnails Attached Thumbnails memory.png  
    Last edited by jimbo45; 08 Oct 2014 at 11:42.
      My ComputerSystem Spec
  2.    08 Oct 2014 #2
    Join Date : Oct 2013
    A Finnish expat in Germany
    Posts : 13,112
    Windows 10 Pro

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

    Click image for larger version. 

Name:	2014-10-08_18h52_07.png 
Views:	103 
Size:	59.6 KB 
ID:	6483
    Last edited by Kari; 08 Oct 2014 at 11:53.
      My ComputerSystem Spec
  3.    08 Oct 2014 #3
    Join Date : Oct 2014
    Posts : 770
    Windows 7

    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.
      My ComputerSystem Spec
  4.    08 Oct 2014 #4
    Join Date : Oct 2013
    A Finnish expat in Germany
    Posts : 13,112
    Windows 10 Pro

    Quote Originally Posted by LMiller7 View Post
    I don't know if this dynamic behavior is ultimately under the control of HYPER-V or the system memory manager.
    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.
    Last edited by Kari; 08 Oct 2014 at 14:38.
      My ComputerSystem Spec
  5.    08 Oct 2014 #5
    Join Date : Oct 2013
    Penns Forrest
    Posts : 3,506
    Win_8.1-Pro, Win_10.1607-Pro, Mint_17.3

    Quote Originally Posted by Kari View Post
    Jimbo, set the max RAM value lower, you have now the default value of 1 TB there!
    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)
      My ComputerSystem Spec
  6.    08 Oct 2014 #6
    Join Date : Oct 2013
    A Finnish expat in Germany
    Posts : 13,112
    Windows 10 Pro

    Quote Originally Posted by Slartybart View Post
    I don't think Jim set the max that high
    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.
      My ComputerSystem Spec
  7.    08 Oct 2014 #7

    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
      My ComputerSystem Spec
  8.    08 Oct 2014 #8

    Quote Originally Posted by Kari View Post
    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.
    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
      My ComputerSystem Spec
  9.    08 Oct 2014 #9
    Join Date : Nov 2013
    Posts : 804
    10 Pro Preview x64

    Quote Originally Posted by Kari View Post
    Jimbo, set the max RAM value lower, you have now the default value of 1 TB there!
    Click image for larger version. 

Name:	2014-10-08_18h52_07.png 
Views:	103 
Size:	59.6 KB 
ID:	6483
    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.
      My ComputerSystem Spec
  10.    08 Oct 2014 #10
    Join Date : Oct 2013
    A Finnish expat in Germany
    Posts : 13,112
    Windows 10 Pro

    Quote Originally Posted by adamf View Post
    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.
    I most politely disagree, my esteemed fellow geek, for two reasons:

    1. 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.
    2. 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.

    Kari
    Last edited by Kari; 08 Oct 2014 at 17:45.
      My ComputerSystem Spec

 


Similar Threads
Thread Forum
Hyper-V does not allow my VM to the internet
When I was at build 10074 I had Hyper-V working and the Virtual Machine (also at build 10130 but several days before the host upgraded) had LAN and internet access. After the upgrade to 10130 the VM can see the host on in the Network, but not the...
Virtualization
Improved Skype desktop clients for dynamic new chat experi
Source...
Windows 10 News
Solved Hyper Links
Having trouble with Outlook 2013 and Edge. Outlook will not open hyper links. This problem used to be solved by setting IE as default browser. How is this done with Edge? Solved the problem using the Microsoft Fix It program.
Browsers and Email
Solved Hyper-V
Hi, As anyone tried Hyper-V yet, as isn't it suppose to be an emulator so we can play old games like Silver etc...
Gaming
Solved Audio in hyper-v
So how do I get my headset which is usb to work in hyper-v?
Virtualization
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 05:19.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums