Chris Musty's picture

Hi all,

I have just noticed something perculiar with Proxmox running a File Server Image.

I am using decent hardware - Dell r310 with 8Gb ram and xeon 4 core @2.66Ghz.'

I figure this gives me 2 largish appliances (2Gb RAM) and a few smaller (512Mb RAM).

So the file server install was painless and took a few minutes, I installed patches, setup file sharing settings and tested it all out - perfect! Then I rebooted. To my surprise the RAM usage was about 70-80%. On a seperate machine (Dell T110 with 4Gb) I tested this with a 1Gb (RAM) file server install and it took the same proportion of RAM, the same was true with 512Mb.

I was testing a PBX (Askozia) under virtualisation which was exceeding my expectations when I decided to reboot the whole gig to reset a persistent non login issue with the Askozia VM. On reboot I was amazed that the RAM usage was a lowely 188Mb which is more in line with what I have experienced to date.

While I agree that 2Gb is excessive for Samba it was interesting that during install it used as much as it could - the image is only something like 200Mb!

Anyone have experience with this? I have a solution - rebooting proxmox but rebooting the VM does not work. Is there some mechanism in Proxmox or the appliance that does not let go of memory. I cant say its a memory leak but its more like a static memory leak.

Fianlly I am going to ask on the prox forums too and see what answer I get there.

Forum: 
Liraz Siri's picture

A few random guesses on what might be going on. Maybe VMs are still running in the background or the memory they are using hasn't been freed back to the system. I'm not sure if this is still true but it used to be the case that processes in Linux were not capable of freeing memory back to the system. In other words a process can only grow, not shrink in memory usage. When it frees memory, what's really happening is that memory goes back to the process-level memory pool, but not the system-level memory pool.
Jeremy Davis's picture

I am assuming that this is running as a KVM VM? I have heard of similar issues with Win OSs but not Linux. IIRC the problem is that once the VM grabs the RAM it doesn't let it go. It's not actually using it, just not giving it back to the system when it's finished so PVE reports it as in use. If that's the bug then apparently it's a combo of a KVM/kernel bug and the way PVE reports the VM memory usage. The bug in KVM has apparently been fixed upstream by RedHat and it has been ported to the PVE kernel, but only the latest kernel branch (2.6.35 from memory) but as that's based on an Ubuntu kernel, it doesn't have OVZ support (KVM only).

Add new comment