Linux reports a reduced amount of memory whenever I run memory intensive apps inside the virtual machine and sometimes after that.
The Memory of the Linux virtual machine is set to a yellow-red zone in the virtual machine Configuration -> Hardware -> CPU & Memory
- Before running the memory intensive app:
- After running the memory intensive app:
All the Memory assigned to your virtual machine is virtual, and there is no guarantee that the virtual machine gets exactly the same amount of Mac physical RAM as its virtual RAM size.
When the virtual machine is provided with Memory, its maximum size cannot exceed the physical RAM installed on the Mac. Moreover, no matter how much Memory is assigned for the virtual machine in the virtual machine Configuration, some significant amount of Mac RAM (usually not less than 2 Gb) should still be left for the OS X to guarantee its performance and stability.
That is why Parallels Desktop manages the virtual machine memory assignment in a way that it sometimes "steals" memory from a virtual machine in order to meet the OS X (host system) memory needs.
The reduction of the RAM size reported by Linux inside the virtual machine indicates that that this kind of "theft" was done.
The workaround below should only be applied if you really need to have exactly the same amount of virtual RAM in your virtual machine as you specified in your virtual machine's Configuration. For example if some specific Linux application requires the certain amount of RAM in Linux.
The workaround could probably affect the virtual machine's performance.
Open your virtual machine's Configuration window -> Hardware -> Boot order.
Insert the following boot flag into the Boot flags: text field:
Now the memory size used by Linux inside the virtual machine will stay the same as you specified in the virtual machine's Configuration.