Faeture Request - virtualize the load average for container

hi,

The load average is calculated by using the process and thread number in the system.

It can be “virtualized” as we have the container number by using the process/threads numbers from the cgroup instead of the complete process/thread numbers.

the call is loadavg_proc_show in ./fs/proc/loadavg.c and weshould be able to switch nr_proc by the cgroup.procs number and nr_thread by cgroups.threads of the container to have a load average that is containerized.

Could be usefull !

regards,
Ghislain.

seems there is an option in lxcfs that is not in lxd for this.

snap set lxd lxcfs.loadavg=true && systemctl restart snap.lxd.daemon

regards,
Ghislain.

1 Like