Attaching new hard drive and server memory usage


Dec 25, 2022

I'm starting this thread to explain a possible issue in server memory usage hoping it is useful for other people

I found one of my servers using 87% of the available memory while it normally uses 36% of the available memory. I managed to discover what happened so let me describe the process:

1. My server has 32 Gb of RAM and memory usage is around 36% it runs 2 virtual machines and 5 containers
2. I needed to migrate one virtual machine from proxmox to virtualbox, so
3. I installed a new virtual machine and installed virtualbox for linux in order have access to the VBoxManage executable and transform a raw image to vdi
4. IMPORTANT: I added a new local virtual hard drive to the virtualbox VM of 60Gb in order to have sufficient space for the raw image and the vdi. The raw image size was 26Gb
5. I managed to run the entire process: in short: Copy the 26Gb raw to the new virtual hard drive, execute the VBoxManage to transform the image, delete the raw file, compress the vdi generated to a ZIP file, delete the vdi file, copy the ZIP file out of the temporary hard drive and delete the ZIP file. and STOP the virtualbox VM
6. IMPORTANT: at this point, the memory usage on the server rises from 36% to 87% even if the created virtual machine was not running anymore
7. I detached the 60Gb hard drive from the VM. The memory was still indicating 87%
8. I deleted the unused drive. The memory drop down to 36% again

So, there might be something in the host server that consumes memory related with local hard drives of virtual machines that remains in memory even when the server is shut off and the drive is detached. The memory is only liberated when the drive is completely deleted.
Was this installed to a ZFS partition? If so, you're observing the Arc cache caching the disk concerned, which will disappear when the cached drive is deleted. It's completely harmless.

You can see how much the arc cache uses by issuing the command arc_summary on the Proxmox shell. (Do this from the web interface, you will have to scroll up a lot.)
  • Like
Reactions: ihr
Was this installed to a ZFS partition?
Does not matter, also LVM and ext4 are caching data. Full memory is not bad, it's what you want. Every file that is read is afterwards in the cache independet of the filesystem (yes, there are exceptions ...) . This is how memory works and please read LinuxEatMyMemory or read the forums, where it has been discussed a lot.


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!