more than 128 cores for LXCs

illustris

Member
Sep 14, 2018
22
4
23
34
There appears to be a cap of 128 cores for LXCs in proxmox. I can manually edit the confs, but not having that restriction on the web interface would be nice. Given the way AMD is going, this cap ought to be raised.

I tried modifying the hardcoded limit (and restarting pveproxy/pvedaemon), but there seems to be some client-side JS validation for the web interface too. Can anyone point me to what else needs to be modified?
 
We recently got some shiny new 7h12 dual-socket servers. Most of those cores need to go to a large container running YARN, and the rest go to smaller containers running other services.

The limit is not just for the GUI, some PCT commands fail without increasing the limit on LXC/Config.pm. Start/stop/restart work fine though.

I will fill out the enhancement request now. I would also be happy to submit the patch if anyone could point me to the client-side form validation code.
 
the GUI code lives in pve-manager (PVE specific) and proxmox-widget-toolkit (used across PVE, PBS, PMG)
 
Ah okay. And yes, usually patches like these can easily become rabbit holes of what needs to be changed and considered.

In general for Patches have a look at our development documentation [0].

A quick look in the GUI code showed that the GUI side limit is in the www/manager6/lxc/ResourceEdit.js file in the pve-manager repo.

But no guarantees that this is the only place that needs to be touched.

[0] https://pve.proxmox.com/wiki/Developer_Documentation
 
Required changes look simple enough.

Diff:
From 44e7d5709d1ea1ae0040af1132af8e321019d25a Mon Sep 17 00:00:00 2001
From: "harikrishnan.r" <harikrishnan.r@media.net>
Date: Thu, 13 Aug 2020 17:20:50 +0530
Subject: [PATCH container] lxc: Close #2938: increase upper limit of LXC core
 count to 512

Signed-off-by: harikrishnan.r <harikrishnan.r@media.net>
---
 src/PVE/LXC/Config.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index 5bf12d56..41eba342 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -401,7 +401,7 @@ my $confdesc = {
        type => 'integer',
        description => "The number of cores assigned to the container. A container can use all available cores by default.",
        minimum => 1,
-       maximum => 128,
+       maximum => 512,
     },
     cpulimit => {
        optional => 1,
--
2.27.0

From 3e684c1aa8f0d80403b3cf779e0e460b733fb951 Mon Sep 17 00:00:00 2001
From: "harikrishnan.r" <harikrishnan.r@media.net>
Date: Thu, 13 Aug 2020 17:10:11 +0530
Subject: [PATCH container] ui: lxc: Close #2938: increase upper limit of LXC
 core count to 512

Signed-off-by: harikrishnan.r <harikrishnan.r@media.net>
---
 www/manager6/lxc/ResourceEdit.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/manager6/lxc/ResourceEdit.js b/www/manager6/lxc/ResourceEdit.js
index 476a9a284..0e110e607 100644
--- a/www/manager6/lxc/ResourceEdit.js
+++ b/www/manager6/lxc/ResourceEdit.js
@@ -88,7 +88,7 @@ Ext.define('PVE.lxc.CPUInputPanel', {
                xtype: 'proxmoxintegerfield',
                name: 'cores',
                minValue: 1,
-               maxValue: 128,
+               maxValue: 512,
                value: me.insideWizard ? 1 : '',
                fieldLabel: gettext('Cores'),
                allowBlank: true,
--
2.27.0

With this, I'm able to modify core counts from the web UI and PCT. Is there anything I might have missed that I should check for?
 

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!