Score:0

Virtual Machine doesn't use all RAM allocated to it

gl flag

I am running Ubuntu 20.04 64bit on oracle virtual machine. I am trying to run a physical simulation and I need a lot of RAM for that. I allocated the virtual machine 8GB RAM at the beginning (the host is windows 10 and has 16GB),but the VM didn't take more than 2GB. When I looke at windows, I see that the virtual machine takes 4GB of RAM. I tried to raise the allocated RAM to 11GB to make the simulation running, but the VM still doesn't take more than 2GB, even though the simulation is running and it "needs" this memory. If you guys could help me here that would be awesome. I want I know this question is asked often, but in most cases it is too hard me to understand exactly what I need to do. I am still a beginner so I would appreciate it if you guys could explain it to me like you would have explain it to your mother. A big thanks in advance.

This is the output I get from free:
total used free shared buff/cache available
Mem: 11107920 2085716 7272136 61252 1750068 8672156
Swap: 2097148 0 2097148

David avatar
cn flag
In the VM how much is given to the OS running in the VM?
ChanganAuto avatar
us flag
An often quoted rule for virtualization is to NEVER allocate more than 50% of the resources. Considering you have 16GB RAM total to which you need to deduct the system reserved and eventually a variable amount allocated VRAM if using integrated graphics, you'll soon find out you should allocate LESS than 8GB otherwise you're asking for trouble.
Arad avatar
gl flag
@David are you talking about the "base memory" bar in VM -> setting -> system -> motherboard? if yes, than 11150MB
Arad avatar
gl flag
@changanAuto The simulation doesn't need 8GB RAM. If I allocate to the VM 4GB and from those 4GB the simulation would use 2GB, I suppose it would work. But the VM doesn't use the memory I allocate to it... this is why I raised it more and more, but it doesn't change anything
ChanganAuto avatar
us flag
Any OS "uses" the RAM as it needs. The question is whether or not the amount of RAM you have set in the hypervisor is being recognized by the guest OS.
Arad avatar
gl flag
@changanAuto I suppose it does get recognized no? judging from the output of `free` I have gotten
ChanganAuto avatar
us flag
Yes, so what's the problem?
Arad avatar
gl flag
That I have 7GB free RAM in the VM (judging from the output of `free`) and my simulation is barely moving
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.