Bustd
bustd
https://github.com/vrmiguel/bustd
bustd is a lightweight process killer daemon for out-of-memory scenarios for Linux!
- Features
Insignificant memory usage!
bustd seems to use less memory than some other lean daemons such as earlyoom.
Also quite insignificant CPU usage
Much like earlyoom and nohang, bustd uses adaptive sleep times during its memory polling. Unlike these two, however, bustd does not read from /proc/meminfo, instead opting for the sysinfo syscall. This approach has its up- and downsides. The amount of free RAM that sysinfo reads does not account for cached memory, while MemAvailable in /proc/meminfo does. The sysinfo syscall is one order of magnitude faster, at least according to this kernel patch: https://sourceware.org/legacy-ml/libc-alpha/2015-08/msg00512.html (granted, from 2015). As bustd can't solely rely on the free RAM readings of sysinfo, we check for memory stress through Pressure Stall Information.
bustd locks all pages mapped into its address space
Much like earlyoom, bustd uses mlockall to avoid being sent to swap, which allows the daemon to remain responsive even when the system memory is under heavy load and susceptible to thrashing.
Checks for Pressure Stall Information
The Linux kernel, since version 4.20 (and built with CONFIG_PSI=y), presents canonical new pressure metrics for memory, CPU, and IO. In the words of Facebook Incubator:
- PSI stats are like barometers that provide fair warning of impending resource
- shortages, enabling you to take more proactive, granular, and nuanced steps
- when resources start becoming scarce.
More specifically, bustd checks for how long, in microseconds, processes have stalled in the last 10 seconds. By default, bustd will kill a process when processes have stalled for 25 microseconds in the last ten seconds.
Download
https://github.com/vrmiguel/bustd/archive/refs/tags/v0.1.1.tar.gz
VCS Checkout
git clone https://github.com/vrmiguel/bustd
Categories
Licensing
License
Verified by
Verified on
Notes
License
Verified by
ksiewicz
Verified on
9 August 2024
Leaders and contributors
Contact(s) | Role |
---|---|
Vinícious Miguel | Bustd's Creator |
José Luis (Chronos504) | Contact |
Resources and communication
Software prerequisites
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the page “GNU Free Documentation License”.
The copyright and license notices on this page only apply to the text on this page. Any software or copyright-licenses or other similar notices described in this text has its own copyright notice and license, which can usually be found in the distribution or license text itself.