memavaild is a daemon that tries to keep amount of available memory to improve system responsiveness during heavy swapping.
Default behavior: the control groups specified in the config (
system.slice) are swapped out when MemAvailable is low by reducing
memory.high (values change dynamically). memavaild tries to keep about 3% available memory.
Effects: tasks are performed at less I/O and memory pressure (and this may be detected by PSI metrics). At the same time, performance may be increased in tasks that requires heavy swapping, especially in I/O bound tasks. Using memavaild has no effect without swap space.
path to the config file
- Python (>= 3.3)
- systemd with unified cgroup hierarchy
- The documentation is terrible (no config keys description, for example);
- The ZFS ARC cache is memory-reclaimable, like the Linux buffer cache. However, in contrast to the buffer cache, it currently does not count to MemAvailable (see <https://github.com/openzfs/zfs/issues/10255>). Don't use
- Seems like
memavaildviolates the second rule (https://systemd.io/CGROUP_DELEGATION/):
memavaildmanipulates the attributes of cgroups created by systemd (
path to configuration file
Restore Default Config
To resore config file with default values execute
sudo cp /usr/share/memavaild/memavaild.conf /etc/memavaild.conf
How to Configure
Edit the config and restart the service.
Feel free to ask any questions and report bugs at <https://github.com/hakavlad/memavaild/issues>.
Written by Alexey Avramov <email@example.com>.
Homepage is <https://github.com/hakavlad/memavaild>.