"CPU limit" should be set rather than "Cores" when creating CTs

harvie

Well-Known Member
Apr 5, 2017
137
22
58
34
The default CT creation dialog offers us to set number of CPU cores, but not CPU limit. However that causes CT to be locked on specific cores preventing it to use other cores under load, which might result in load spikes when two or several CTs get loaded on the same core. It somewhat tries to distribute CTs evenly across cores on start, however that does not allow dynamic remaping under load.

I have 12 core machine and here you can see the difference.

load-pinpoint=1512263627,1515114827.png

At first i was limiting "cores" and having unlimited "cpu limit" (this is default when you click "create CT")
Then i limited "cpu limit" and unlimited "cores" (this has to be manualy done after creation in CT resources tab)
You can clearly see huge improvement in performance.

I think that CT creation dialog should set "cpu limit" rather than "cores". Or at least enable me to set both to my liking.

I also think that CT creation dialog should give me choice to enable "start at boot" option when creating CT.
 
the reason why 'cores' is the default is that when using plain cpulimit, the container sees all host cpus in /proc, as many users wanted the container to only see the 'virtual cores' (like in kvm) we decided to use
cores by default

my long-term plan includes some changes to the gui regarding input values (including a simple/advanced toggle for some of the lesser needed settings) and i think
including cores and cpulimit/shares will make it in (no promises on a timeframe though ;) )
 
What's the point? User of CT will see less cpus, but with higher load. Unfortunately loadavg and CPU load is not overrided by lxcfs right now.
My users prefer CTs that are not overloaded (and report lower load). Not seing proper core count is more of cosmetic problem. Doesn't really make sense to show proper number CPUs in htop when they are loaded by other CTs. That only confuses users and they keep asking where the load comes from. That means you will not get proper numbers anyway... So i guess reliability is more important than showing proper statistics until LXC guys get this fixed.
 

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 yours easily in our online shop.

Buy now!