Proxmox runs out of RAM because it says a VM (MacOS) is using everything when it is not

manguy

New Member
Jul 5, 2024
6
0
1
My setup
CPU 13700k
RAM 64GB
One MacOS VM (otherwise working)
One Ubuntu VM

I initially had both VMs with "ballooning" on and all 64GB available to each (I had read that this would "just work" and would just let each VM use as much RAM as it wants as long as it is available). I started getting restarts/crashes (no obvious place to see crash logs?) after running some rsync from the MacOS Vm to the Ubuntu via smb. I noticed that rsync makes the RAM for the MacOS VM in the proxmox "summary" go up immediately a few GBs every other minute until it reaches its max (and I assume tries to use more RAM than exists). However, htop inside the MacOS VM shows it is only using like 13GB (and the Ubuntu is only using like 3GB), so why is Proxmox running out of RAM? I have also read about "ZSH" and ram issues, but I havent made any ZSH disks (dont know if proxmox is using zsh under the hood). Nonetheless, arcstat shows

Code:
 time  read  ddread  ddh%  dmread  dmh%  pread  ph%   size      c  avail
00:16:48     0       0     0       0     0      0    0   5.6K   2.0G  -576M

Dont know if the negative value in "avail" is normal or not. Either way, I have 2 questions:
1) Why is Proxmox using all RAM and blaming the MacOS VM when the MacOS VM itself only claims to be using a small amount of RAM? I looked at my "swap" in the MacOS, and it is 0. However, "cached files" (which I thought was "swap", but I guess not) is very high. How do I fix this?
2) Is my setup correct (with the RAM and ballooning)? I dont want OOM crashes. I have 64GB. If I think my Ubuntu only needs 8GB, and I want my MacOS to have all else available, how much to I set it to? Do I have to account for RAM proxmox is using? If so, how much should I allocate to proxmox? Do I even have to allcoate any to proxmox, or do I just subtract it from the "else remaining" I am giving the MacOs?
 
Hi,
MacOS is not officially supported by Proxmox and has no guest side support for ballooning, which would be required to shrink the memory usage on demand. In our system requirements, we recommend that around 2GB of memory is left to the hypervisor, the rest can be allocated to the guests [0]. The cache is memory that is used to 'buffer' file system data in RAM, so that repeated access is faster. The swap could almost be described as the opposite, it writes rarely used memory to disk and only loads it back into ram when needed.
The easiest solution would be to limit the macOS VM to around 54GB (64GB - 2GB (PVE) - 8GB (Ubuntu)).

[0] https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_system_requirements
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!