Forum archive
MediaServer v16.1 RAM Usage and Proxmox
BLUF - Mediaserver VM usage not dropping as expected according to PVE GUI during idle periods.
Alright, first off, these images are awesome. The MediaServer got me off the ground and running way faster than the last one I tried building from instructions.
The data:
Server is Supermicro X10DRL-i with 2x E5-2670 and 256GB RAM, running Proxmox 5.4.124.
Hypervisor on a two-drive SSD ZFS mirror configuration.
The four spinning disk drives in hotswap bays are setup in a raidz2 configuration. Test VM's are then allocated storage from this pool.
No ZFS cache disk setup at this time.
Currently, two VMs setup. MediaServer v16.1 and Linux Mint 20.2.
Now the issue I'm observing.
Linux Mint (and other VMs in the past) seem to report accurate RAM usage. It goes up and down with demand.
MediaServer does not. I've allocated 48GB to the VM and during a file upload (using WinSCP), the usage will climb to 97% (if I'm moving more than ~50GB) and stay there, even well after the transfer is done.
I recall reading that ZFS will hold data to write to the pool in RAM, if there is no cache disk. But I would have figured once all data was uploaded that as the data is written, the usage would drop back down. It does not. 4hrs after transfer complete, the VM still shows 97% of allocated RAM in use, despite sitting at idle the entire time.
Possibly unrelated (but I'll mention anyway in case it is helpful) is the VM does not respect Proxmox command to shutdown/restart from the PVE gui. Shutdown/reboot at command line inside of VM works.
I've only been working in Proxmox for a few months (as I have time) and I've spun up a number of VMs. This is the first and only time I've observed this issue. I have kept Proxmox up-to-date but I can't point to any specific updates that might have triggered this behavior. And the fact it seems unique only to the Turnkey VM makes me think there is some issue between the two in their configuration.
To be honest, I'm not sure.
I have a Media Server instance running on my Proxmox server too. Mine is an LXC container and only has 4GB assigned to it and idles at 1GB usage. Mine isn't backed by ZFS. I have the OS filesystem running from a thin LVM volume on a SSD, with the media storage provided by a number of WD red HDDs in a singe logical volume, bind mounted into my Media Server instance at /srv/storage.
Neither my TurnKey Media Server nor Proxmox are the latest release, which may or may not have any relevance.
I'd be inclined to try to pin down what is actually chewing up the RAM. From within the VM/container run:
For example, here's my Media Server:
total used free shared buff/cache available Mem: 4.0Gi 978Mi 56Mi 16Mi 3.0Gi 3.0Gi Swap: 6.0Gi 349Mi 5.7GiNote that you need to read the 'available' column. As you can see buffer/cache is "using" most of my RAM leaving only 56MB 'free', but that would be cleared immediately if it's required, so there is actually 3GB available.
If yours is showing lots of free RAM internally, but not within Proxmox, then I'm not sure what's going on there. Personally, I'd be inclined to ask on the Proxmox forums. I suspect that they'd have more insight into what might cause that. If you do post over there, please feel free to post a link to that here.
As to not responding to the Promxox interface for shutdown/restart, it depends. If yours is also an LXC container, then I'm not clear what could cause that. If you have installed to a "proper" VM (i.e. KVM) then there is more that can go wrong there, but generally it should "just work". I vaguely recall someone else having an issue with that ages ago and it was some setting within Proxmox that they changed that fixed it. If yours is the same case, then IIRC that was a setting about using ACPI calls?! If Proxmox is sending ACPI calls, then TurnKey should respond to those. However, there is also a way it can be handled via the QEMU guest agent. And TurnKey doesn't include the agent by default, so installing that is a possible alternate route.
If you want to install the qemu-guest-agent package, do this (includes a reboot):
Please let me know if that helps.