meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
vm:proxmox:lxc:load_average [2022/04/21 20:20] – created niziakvm:proxmox:lxc:load_average [2022/04/21 21:27] (current) niziak
Line 1: Line 1:
 ====== Load Average ====== ====== Load Average ======
 +
 +===== Issue =====
  
 Common issue is that ''la'' inside LXC shows hosts's loadaverage. Common issue is that ''la'' inside LXC shows hosts's loadaverage.
 +
 +
 +Related info:
 +  * [[https://bugzilla.proxmox.com/show_bug.cgi?id=1870|Bug 1870 - test and potentially enable lxcfs loadavg feature ]]
 +  * [[https://forum.proxmox.com/threads/separate-loadavg-for-individual-containers.44460/|Separate loadavg for individual containers]]
 +
 +===== Solution =====
 +
  
 As solution, LXC provide option: ''-l, --enable-loadavg Enable loadavg virtualization''. As solution, LXC provide option: ''-l, --enable-loadavg Enable loadavg virtualization''.
Line 7: Line 17:
 ''This feature doesn't add to the isolation at all. `sysinfo()` will return the host information even when in a container.'' ''This feature doesn't add to the isolation at all. `sysinfo()` will return the host information even when in a container.''
    
 +<file conf /etc/systemd/system/lxcfs.service.d/override.conf>
 +[Service]
 +ExecStart=
 +ExecStart=/usr/bin/lxcfs -l /var/lib/lxcfs
 +</file>
 +
 +NOTE: After restarting lxcfs.service, running containers lost /proc access. Restart of containers is required.
 +<code bash>
 +systemctl restart lxcfs
 +</code>
 +
  
-Related info: 
-  * [[https://bugzilla.proxmox.com/show_bug.cgi?id=1870|Bug 1870 - test and potentially enable lxcfs loadavg feature ]] 
-  * [[https://forum.proxmox.com/threads/separate-loadavg-for-individual-containers.44460/|Separate loadavg for individual containers]]