locked
Hyper-V. Is there any way in Hyper-V that we can swp ram utilization Automatically. RRS feed

  • Question

  • Hi,

    Hyper-V. Is there any way in Hyper-V that we can swp ram utilization Automatically.

    Like in VMWare say we have 4 machines and they take ram as per the process utilization within each machine.
    If Machine A is doing a lot of work and Machine B is idle then it pulls the ram to Machine A...Is there a way for this in Hyper-V.

    I have a test setup of 1 machine with 3 OS installed virtually. All 3 have been given 1 gb each.
    When i check the process utilization of the main OS it always shows more than 3 + GB as it fixes the 1 GB to each VM.

    REgards
    Sharath
    Wednesday, July 16, 2008 1:57 PM

Answers

  • This really isn't a swapping action that VMware has going under the hood.

    And, the reason that Hyper-V does not do this now is architecture.  ESX server is a 100% emulated environment, Hyper-V (also XenServer) are a combination of emulated and synthetic devices.

    What VMware does is memory page sharing between VMs of similar operating systems.  This in turn allows VMware the ability of memory over-commitment (to run VMs whose total RAM is actually higher than the physical RAM of the host).

    The memory page sharing works like this:
    You have two VMs, both running Server 2003.  They have many of the same DLLs, same underlying files and programs.  The primary difference is the application that is running within the VM.

    Focusing on a DLL for simplicity - you have a single DLL that is loaded into memory within both VMs, in the Hosts physical RAM, there is one instance of this DLL that is shared between the two guests.  This is the memory sharing feature.

    The other thing that it does is only uses the amount of RAM that is required by the current running programs.  This is a feature of the emulation.  The memory consumed is virtual, not physical.

    In this first release of Hyper-V a physcal slice of RAM is taken and isolated for use of the VM.  This is believed to provide better responce as well as the highest level of security.  The host or any other virtual machines cannot touch or see what another VM has happening in the memory space.

    The limitation is that the memory over-commitment is not available with this model.

    But, I can guarantee that this will most likely change in future releases, it just isn't available in this first release.

    Brian Ehlert (hopefully you have found this useful)
    • Marked as answer by Sharathree Wednesday, July 16, 2008 2:59 PM
    Wednesday, July 16, 2008 2:52 PM

All replies

  • This really isn't a swapping action that VMware has going under the hood.

    And, the reason that Hyper-V does not do this now is architecture.  ESX server is a 100% emulated environment, Hyper-V (also XenServer) are a combination of emulated and synthetic devices.

    What VMware does is memory page sharing between VMs of similar operating systems.  This in turn allows VMware the ability of memory over-commitment (to run VMs whose total RAM is actually higher than the physical RAM of the host).

    The memory page sharing works like this:
    You have two VMs, both running Server 2003.  They have many of the same DLLs, same underlying files and programs.  The primary difference is the application that is running within the VM.

    Focusing on a DLL for simplicity - you have a single DLL that is loaded into memory within both VMs, in the Hosts physical RAM, there is one instance of this DLL that is shared between the two guests.  This is the memory sharing feature.

    The other thing that it does is only uses the amount of RAM that is required by the current running programs.  This is a feature of the emulation.  The memory consumed is virtual, not physical.

    In this first release of Hyper-V a physcal slice of RAM is taken and isolated for use of the VM.  This is believed to provide better responce as well as the highest level of security.  The host or any other virtual machines cannot touch or see what another VM has happening in the memory space.

    The limitation is that the memory over-commitment is not available with this model.

    But, I can guarantee that this will most likely change in future releases, it just isn't available in this first release.

    Brian Ehlert (hopefully you have found this useful)
    • Marked as answer by Sharathree Wednesday, July 16, 2008 2:59 PM
    Wednesday, July 16, 2008 2:52 PM
  • Thanks a lot Brianeh this was very usefull

    One Question..

    Any way to change the Ram size when the VM is on?
    Why does the machine Memory show 3 GB occupied when the VM's are not doing any work.They are idle. Does that mean the the piece of cake given to them 1 * 3 Vm's is there cake and they keep all to themselves?
    Wednesday, July 16, 2008 3:01 PM