Info on the virtual memory size


  1. Posts : 307
    Windows 10
       #1

    Info on the virtual memory size


    Hi

    What does the virtual memory size depend on?

    Since I have a notebook with 16GB of RAM and a 1TB SSD disk used for the VMs creation, what would be the recommended virtual memory size to avoid future problems?

    Thanks

    Bye
    Last edited by balubeto; 30 Dec 2020 at 02:52.
      My Computer


  2. Posts : 31,682
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #2

    On my 16GB Hyper-V host machine I leave virtual memory set to 'system managed' which currently uses a 2.4GB swapfile.

    balubeto said:
    ...what would be the recommended virtual memory size to avoid future problems?

    The host machine's virtual memory settings are not really going to cause problems for the VMs. The vRAM allocated to each VM is from the physical RAM, not the host machine's virtual memory. If you are using Hyper-V, then see this tutorial on optimising the memory used by the VMs.

    Hyper-V - Optimizing Virtual Machines
      My Computers


  3. Posts : 11,247
    Windows / Linux : Arch Linux
       #3

    Hi there
    these days the most sensible virtualisation programs use the amount of RAM you set in the VM's config as the MAXIMUM physical RAM that will be allocated to that particular virtual machine -- the amount of real RAM will be allocated dynamically depending on how much the VM wants (up to the maximum specified in the config file).

    If the VM has this maximum set too low then the VM performance (assuming the VM boots at all) will be horrendously hideous -- you may well see HDD / SSD LED light on continuously and the VM doing nothing as it will be "Thrashing" -- that is getting and releasing continuously "RAM page files" from its virtual memory on HDD / SSD.

    Without going bonkers - it's never a problem to slightly over commit physical RAM for VM's as in general the max used will only be required if the VM itself is running a load of applications concurrently.

    For the best performance - especially if using "paravirtualisation methods" for VM's -- e.g not passing thru real hardware in VMWare and VBOX systems is to get the fastest HDD's / SSD's possible (you should also have those in any case on your main OS too).

    Improving HDD's or the Disk I/O subsystem will usually improve performance of both HOST and VM far more than increasing physical RAM size or upgrading the CPU - at least on more modern machines which usually have a minimum of 8GB RAM.

    You will need more physical RAM if you want to run a whole set of VM's concurrently but I believe on this board most who are using VM's probably only ever actually run 1 or at the most 2 concurrently.

    Depending on what you want your VM to do graphics is another case entirely -- but if you have the resources using HYPERVISORS (HYPER-V / KVM-QEMU type VM's) it's possible to get almost 100% Native performance these days.

    VM's have advanced hugely in recent years -- why anybody ever wants to "Double / triple etc boot" with attendant problems any more always amazes me -- a very few who want to test out really specialised graphics / other special purpose hardware OK - but that's not your typical VM user.

    With Graphics passthru even GAMING these days will work decently on VM's if you use HYPER-V or KVM/QEMU but you must allocate the graphics to the VM --this means either you have 2 graphics cards or two independently working graphics ports.

    There's also no 1:1 correspondence between what the REAL OS needs and a VM of that OS -- for example a Windows 10 X-64 Pro VM will run quite OK even with photoshop etc with just 2 GB RAM (slightly better allocate 3 GB) and an XP VM machine will run using 512MB !!!

    That's assuming those VM's are running typical Office type apps, surfing Internet etc. For Multimedia playing you need to ensure hardware acceleration is enabled, 3-D if using things like CAD / some Stock market graphing stuff etc.

    My basic rule of thumb is - Windows 10 VM's -- 4GB RAM max - often 3GB is good enough, W7 and XP 1 GB is fine and for most Linux VM's 1GB also fine. If you have W98/W95/W2K as VM's then on your own but 1GB should be plenty for those.

    Also allocate also half the number of processors or cores to a VM -- e.g if you have 1 processor with 4 cores then allocate 2 cores to the VM -- If you have 2 processors (2 distinct CPU's) with 8 cores - allocate 4 cores to each VM. If the CPU allows it (check in the BIOS) enable HYPERTHREADING - that also speeds up performance no end.

    Cheers
    jimbo
      My Computer


  4. Posts : 41,476
    windows 10 professional version 1607 build 14393.969 64 bit
       #4

    The event viewer is a good place to check for paging problems.

    These are some examples:

    Code:
    Event[4182]:
      Log Name: System
      Source: Microsoft-Windows-Resource-Exhaustion-Detector
      Date: 2020-10-12T23:32:30.6710000Z
      Event ID: 2004
      Task: Resource Exhaustion Diagnosis Events
      Level: Warning
      Opcode: Contains the results of the diagnosis.
      Keyword: Events related to exhaustion of system commit limit (virtual memory).
      Description: 
    Windows successfully diagnosed a low virtual memory condition. The following programs consumed the most virtual memory: StarCitizen.exe (3732) consumed 18865561600 bytes, firefox.exe (9208) consumed 1037934592 bytes, and firefox.exe (10208) consumed 624791552 bytes.
    
    Event[4183]:
      Log Name: System
      Source: Application Popup
      Date: 2020-10-12T23:33:02.8210000Z
      Event ID: 26
      Task: N/A
      Level: Information
      Opcode: Info
      Keyword: N/A
      Description: 
    Application popup: Windows - Out of Virtual Memory : Your system is low on virtual memory. To ensure that Windows runs properly, increase the size of your virtual memory paging file. For more information, see Help.

    See these links:
    https://docs.microsoft.com/en-us/arc...virtual-memory
    Manage Virtual Memory Pagefile in Windows 10

    Suggested settings:
    Place the dot in System managed size.
    Check the box to Automatically manage paging file size for all drives
    Reboot to maintain settings
      My Computer


  5. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #5

    Hello @zbook,

    Do you have a resource where I can find ALL the Event ID numbers with a brief description of what each one is please.

    Thanks.
      My Computer


  6. Posts : 41,476
    windows 10 professional version 1607 build 14393.969 64 bit
       #6

    Paul Black said:
    Hello @zbook,

    Do you have a resource where I can find ALL the Event ID numbers with a brief description of what each one is please.

    Thanks.


    I've not yet seen a database / resource for the event viewer ID's with descriptions.
    https://docs.microsoft.com/en-us/win...-the-event-log

    These may be some alternatives:

    Troubleshooting Information for Windows Events
    Troubleshooting Windows Event ID
    Unlimited Information: Event ID List Error Codes in Windows
      My Computer


 

  Related Discussions
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 18:31.
Find Us




Windows 10 Forums