meta data for this page

Load Average

Issue

Common issue is that la inside LXC shows hosts's loadaverage.

Related info:

Solution

As solution, LXC provide option: -l, –enable-loadavg Enable loadavg virtualization.

This feature doesn't add to the isolation at all. `sysinfo()` will return the host information even when in a container.

/etc/systemd/system/lxcfs.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/bin/lxcfs -l /var/lib/lxcfs

NOTE: After restarting lxcfs.service, running containers lost /proc access. Restart of containers is required.

systemctl restart lxcfs