LXCFS 3.1.2 has been released

Introduction

The LXCFS team is pleased to announce the release of LXCFS 3.1.2!

We had to re-roll the 3.1.0 release twice, first because of a bad Makefile causing an invalid release tarball to be generated, then again to fix an upgrade issue affecting some users of LXCFS 3.0.4

New features

Add support for per-container cpu usage in /proc/stat

Newer LXCFS releases make it possible to virtualize cpu usage per container by using the cpuacct cgroup.

Add support for load average (loadavg) virtualization

LXCFS now supports virtualizing /proc/loadavg. It will calculate the loadavg for a container based on the cpu cgroup.

Display cpus in /proc/cpuinfo based on cpu quotas

LXCFS will virtualize the cpus displayed in /proc/cpuinfo using the cpu cgroup and quotas calculated there.

Allow to disable swap in /proc/meminfo output

This adds the -u option to disable swap info output in /proc/meminfo.

Virtualize /sys/devices/system/cpu/online

LXCFS now also partially virtualizes sysfs. The first file to virtualize is /sys/devices/system/cpu/online per container.

Enable higher precision output in /proc/uptime

The calculations for /proc/uptime are now more correct.

Add support for FUSE nonempty option

The lxcfs binary can now be passed the -d option. When passed, lxcfs will also start when the mountpoint is not empty.

Bugfixes

  • bindings: ensure that opts is non NULL
  • Makefile: Fix typo in file name
  • remove unused functions
  • sys dirs do not need to implement ‘read’ method
  • lxcfs: coding style update
  • config: Adds RPM spec file.
  • config: Adds reload mode to sysvinit and systemd scripts.
  • bindings: prevent NULL pointer dereference
  • stat: check for out of bound access to cpuacct usage data
  • calc_hash(): do not apply modulo LOAD_SIZE
  • tests: include missing sys/sysmacros.h header
  • bindings: prevent double free
  • bindings: better logging for write_string()
  • meminfo: set ShmemHugePages and ShmemPmdMapped to zero
  • bindings: fix memory leak in calc_pid()
  • travis: fix .travis.yml
  • bindings: fix memory leak in proc_loadavg_read()

Support and upgrade

LXCFS 3.1.2 is only supported until the next feature release of LXCFS.
For long term support, you should prefer LXCFS 3.0.4 LTS which is supported until June 2023.

Downloads

1 Like

Add support for load average (loadavg) virtualization

YAY!! This is amazing, couple of questions;

  • How can I install this ?
  • Will LXD be exposing any load avg’s (etc) in any endpoints ?
  • Does the user need to do anything special to virtulize the load avg or will it be by default ?

Thanks

I believe it is opt-in, you need to pass a flag to lxcfs to get it as it is expensive for lxcfs to keep track of that data.

Can you be any more specific or does it still require compiling by yourself?

Usage:

lxcfs [-f|-d] -u -l -n [-p pidfile] mountpoint
  -f running foreground by default; -d enable debug output 
  -l use loadavg 
  -u no swap 
  Default pidfile is /run/lxcfs.pid

This shows that you need to pass -l to have loadavg enabled.