Advice for memory optimisation / overcommit

Hi

I imagine some VPS hosting companies have ways to sell more memory than their servers actually have. How do they do this? Any advice for making the most of your server memory?

A few ideas so far:

* Use containers rather than VMs - pretty obvious
* Make sure KSM (Kernel Samepage Merging) is enabled, and try run the same OS in the VMs / containers
* Give each VM some swap space on a fast disk
* In the case of container hosting, give the hostOS swap space on a fast disk
* Use Intel Optane pmem dimms - probably expensive and only really available in their Scalable Xeon range of CPUs
* Install an Optane SSD for swap space, something like the P5800X / PCIe4 (almost 8GB/s read speeds)

Anybody using some of these ideas or have better solutions? Any guidelines to follow or can you point me at things to read?

I'm thinking a server with 128G RAM and Optane SSD with KSM enabled could maybe run 100 x 2GB containers.

Do you know of any extreme cases of VMs or containers per host?
 
Mar 25, 2022
71
19
8
I'm thinking a server with 128G RAM and Optane SSD with KSM enabled could maybe run 100 x 2GB containers.
Optane DC SSDs are quite expensive. I doubt that you get any cost savings by using this approach.
Additional 128GB DDR4 Reg. ECC RAM would cost just around $600 - $800.
 
Last edited:

LnxBil

Famous Member
Feb 21, 2015
6,057
740
133
Germany
AFAIK KSM does not work with LX(C) containers or even normal linux processes due to not using memory that has the MADV_MERGEABLE flag, so you're limite to KVM/QEMU VMs, which does set this flag for alle memory allocated to the guest.
 

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 your own in 60 seconds.

Buy now!