0

I have been using Virtual-Box off and on for 4 years now. A problem I have always had is that when you start a VM, Virtual-Box immediately takes the designated amount of RAM from my physical computer's overall RAM. Is there anyway to have Virtual-Box not take all the designated RAM at once? My current host OS is Linux Mint 19.3, and I have a VM with Windows 7 with 8 GB of RAM specified in Settings. I would like Virtual-Box to set aside about the same as the VM is using at that moment, is this possible?

Thanks in advance

1 Answers1

0

You could add memory module zram to Your system by modprobe zram num_modules=1 and configure this /dev/zram0 device for having a share of Your RAM capacity.
So with starting a VM like VirtualBox it would take its defined amount of RAM capacity, but if it is above swap triggering level it would compress or (then have to) decompress parts of RAM content.

This might be a workaround for limited RAM capacity by increased cpu compression and decompression activity (if RAM shortage occurs) for "newer" cpu&memory&chipset systems.

( Examples for zram initializing script file: init-zram-swapping sets up less RAM than configured
and distribution of swap load: Is distributing load in a balanced way between swap partitions possible? )

VMware (on workstation) supports sharing memory between several VMs: https://www.vmware.com/support/ws5/doc/ws_performance_mem_host.html

beyondtime
  • 405
  • 4
  • 12