State of per-container load average?

Hi everyone,

As of LXD 4.0.8 LTS would it be possible to confirm on the stability of the snap lxcfs.loadavg=true flag?

I found some scary threads here:

which I am not sure if still apply to 4.0.8.

Also, far as I could tell, as of 4.0.8 the default configuration already tracks processes and CPU usage per container… it is only load average that is read from the server instead. Can you confirm?

Thanks in advance,

Here is a reference discuss thread:

Looking forward for an update on the stability of this. Thank you in advance.

I’ve been running several clusters with it enabled for over a year now and haven’t seen any obvious issue. The main problem is that a misbehaving/attacking guest could cause lxcfs on the host to use up more and more memory.

If you’re dealing with mostly trusted workloads and/or have good monitoring of the memory usage on the host to detect potential attacks, it should be fine to turn on.

1 Like

Thank you @stgraber . The cases I have in mind have both permanent memory monitoring (host included) and trusted workloads so we will probably try this.

One more thing: after running

snap set lxd lxcfs.loadavg=true

what do we need to restart for make the change active?

The simple answer would be to restart the entire system.

LXCFS cannot be restarted unless all containers are stopped so we pretty actively stay away from it in the snap logic. If you absolutely must avoid a full system restart, you could stop all containers, then run snap stop lxd and check if lxcfs is still running, if it is, kill it and do snap start lxd.

1 Like

Thanks again @stgraber .