Virtual Machine not using full amount of RAM given

0

I'm very new to the world of computing and have started to use virtual machines. However, the one thing I don't understand is why my virtual machines dont use all the RAM I provide for them. I have a debian OS(64 bit) running on a windows 10(64 bit) host, and I have assigned the guest 2 gigabytes of RAM. When I boot on the OS, the virtual machine is experiencing some performance problems(eg. tabs and windows lagging, screen periodically freezes). I suspected I might not have enough RAM for it to run smoothly so I run the command:

free -m

from the info I gather, the vm has a total of 1956 megabytes of RAM however only seems to be using 729 megabytes of RAM.This is less than half of what I assigned it. Running on this low RAM would cause performance issues so I want the vm to be able to use more RAM at a time. Is there a reason why the vm is using so little RAM at a time and what can I do to make it use all the RAM assigned to get rid of performance problems?

user767415

Posted 2017-09-25T11:12:56.113

Reputation:

1VirtualBox configures the maximum RAM that a VM can use. But it does not mean that VM will always use full RAM. – Biswapriyo – 2017-09-25T11:16:44.297

How much RAM has the HOST computer ? How much of that is free ? – Tonny – 2017-09-25T11:35:12.623

Care to post the full output of free -m (including the Swap line, if any)? Otherwise, RAM may not be the issue, you could be I/O bound (using VBox shared folders? What is the disk I/O like form the Windows standpoint?) – xenoid – 2017-09-25T12:14:30.893

Answers

0

You may want to check your swap usage. If it's higher than a few MB, you may want to re-check your configuration. This is a surefire way to tell your system was short on memory somewhere between the latest reboot and now.

If your swap usage is low, where do you get your available memory reading from ?

  • If you're getting this number from the guest OS, it's simply that your guest OS is only using this much memory, but it has the full 2 GB at its disposal, just like your host OS doesn't always use the entire physical memory. Around 800 MB seems on par with the memory usage of a fresh debian install on the desktop.

  • If you're looking at the memory used by the virtual machine from your host OS, it is probably because the hypervisor you're using uses "thin provisioning". In this case, the hypervisor only "reserves" as few resources as possible and allocates more resources if and only if the guest needs it. The configured amount is only a maximum value here, not a constant.

About your performance problems, I'd have a look at your disk usage instead.

anto418

Posted 2017-09-25T11:12:56.113

Reputation: 22