cpuunits defaults to 100, not 1024

Matt Corallo pvccuibs at mattcorallo.com
Wed Aug 3 08:09:05 CEST 2022


(note, not subscribed, please keep me on CC)

The Proxmox UI describes the default for cpuunits as 1024, however the code 
(https://github.com/proxmox/pve-container/blob/d387c0be9b8cf1d39fbe6e88f01ef45cde2aa1b0/src/PVE/LXC.pm#L714 
and 
https://github.com/proxmox/pve-common/blob/194f706b5db696cf8f689237ffd8dc95aa771492/src/PVE/CGroup.pm#L503) 
actually default to 100 when no value is set in the config.

eg
# cat /sys/fs/cgroup/lxc/1013/cpu.weight # config set to 1025
1025
# cat /sys/fs/cgroup/lxc/1013/cpu.weight # config set to 1024
100
# cat /sys/fs/cgroup/lxc/1013/cpu.weight # config set to 1023
1023

Matt




More information about the pve-devel mailing list