"Safe" Overselling?


#1

Hey all,

This topic is just for me to get a little smarter on what would be considered “safe” overselling/overcommitting of resources on a Proxmox host. Not asking for you guys to divulge your industry secrets or anything like that – just trying to get a general idea.

Some context - I currently run a small free VPS host (FreeMach). With my first box, I commit memory ~1:1, meaning each guest’s allocation is dedicated (or near-dedicated). But after running this node for over a year, I’ve noticed that RAM usage really hasn’t ever exceeded ~60%, so I’m thinking perhaps there is room to overcommit.

The second node for this service is going live shortly and I wanted to get some opinions on whether overcommit memory would be safe. The host has 24GB of RAM and I’m intending to allocate 16 2GB KVM guests on the box. So this would result in 1.33:1 of allocated memory to physical memory. Ignoring other factors, such as network and cpu (which I think will be fine under my proposed config), would I be safe in doing this?

I know it’s easier to oversell with containers, but am unfamiliar with KVM guest’s resource usage. Any insight provided would be helpful! I use ZFS on my Proxmox hosts, if that changes the equation at all.

Cheers,
-Mason


#2

I never overcommit memory on KVM, but I’ll drive containers into the damn swap. I don’t know if proxmox just has a really well optimized stack but my efforts with KSM have proven to be ineffective and at too high of a cost.


#3

Hmm, okay. Maybe I’ll reconsider my approach and cut down the number of VMs then to be closer to 1:1.

Edit: Also might be a smarter move to not oversell since I’m finding users who will actually be utilizing their VMs as opposed to just letting them idle.


#4

This is my current node’s usage with 10x 3GB KVM guests running. ZFS, KSM, and ballooning all enabled.

caesar-usage

The ~60% memory usage is what makes me feel like I could possibly stuff more VMs on and still be safe. But maybe there’s something I’m not seeing that would cause issues if I did that.


#5

LES resellers 64MB up to 6 times, with OVZ.
I would say +5 should be still okay.

Can you upgrade the memory on demand?
So You could go for +10 and ask for a memory upgrade if needed.


#6

+5 as in 5x’s overselling with KVM or +5 as in 5GB of overcommitted memory? Sounds a little much for KVM, I think.

Nah, these are free boxes so I’m working with what I’m given and keeping costs to 0.


#7

+5 Machines, I would not expect that someone uses all the 3GB.
Overselling is always risky, LET I would expect that 50% of the machines are at idle or more.

Ask them, tell them, big big interest, we need more memory.
“Can you steal a 32gig stick and put it into my server?”


#8

Ahh okay, that makes sense. I think I have IPs to add another couple guests, but available IPs would be my limiting factor.

Haha perhaps. I tend to try to keep a low profile for free shit so I don’t give the provider any second doubts. :stuck_out_tongue:


#9

I am sure VirMach got enough back already, so you could ask nicely for more memory maybe a few more IP’s.


#10

“Yes sir, this product that is in direct competition with your own services and that I give away for free to your potential clients which won’t buy from you when they get their service from me needs more stuff. Give me more stuff so I can steal more clients away from you kthxbai”


#11

Oversell the heck of it so that I can say, “The end is nigh.”


#12

Its a free product, with limited support, so no.
Its not in direct competition, its more like a free taste of Virmach.
Before you buy the real stuff.


#13

seems fine to me. of course it might get harder the smaller the guests are, because you’ll always need a static minimum and can only balloon into buffers/cache. though setting memory to dynamic 1.5/2GB should have you covered, KSM will take care of the rest.


#14

I don’t overcommit memory on KVM, KSM is always tricky - but if you have Proxmox taking care of it and it works, why not. Ensure you ALWAYS have enough free swap space.

Also KSM can result in a slightly lower overall performance, so if you are CPU bound, it may bring more problems than it solves.

OVZ is a totally different beast than KVM and memory overcommit works differently.
What is possible with containerization isn’t possible with KVM.


#15

ZFS complicates things slightly.
proxmox ZoL allocates 50% of host memory to ARC.
I reduce arc-max to 8GB on my 32GB RAM kvm boxen.

So your current numbers look good by that metric I guess.

What you can oversell slightly on zfs is ZVOL disk sizes. (zfs lz4 is amazing)
IIRC You want to target a MAX of 85% zfs pool true space utilization to prevent everything from crumbling.
Maybe restrict users to template images instead of ISO installs to keep utilization predictable.


#16

Proxmox / KSM default is to enable itself @ 80% (this can be changed easily in a config), if your RAM use is sitting under 80% and KSM reports 0 this means all RAM use is non compressed / dedupe.

If your running alot of Linux VM’s KSM can have a big impact on lowering RAM due to alot of the RAM use being simular enabling the dudupe function of KSM to have a big effect.

If your just using standard mdadm raid then your memory usage shouldn’t have a big impact during rebuild’s e.t.c however if your using ZFS or something else you will need to account for extra RAM there.

As noted by others KSM does have a CPU overhead, so if your node’s are already heavy CPU wise then may not be a good idea. But if load is always light you’d hardly notice the couple of extra CPU % used.


#17

1:1.
Post must be at least 5 characters.


#18

I recently started doing this using solusvm, thanks everyone for the insights for now I’m keeping it 1:1 too but we’ll see after few months if there’s room to expand


#19

The only LES Provider who offers 64mb is David.
128mb is the smallest package for Anthony and I.


#20

Ah okay then.