a better, nicer nice daemon
- Rust 35.3%
- C 34%
- Nix 24.5%
- Makefile 5.9%
- Shell 0.3%
| contrib | fix(nix): use the path /etc/better.toml | |
| libparse | fix!: it is better.toml, not better.conf | |
| man | docs: better.toml | |
| src | ||
| .gitignore | ||
| flake.lock | ||
| flake.nix | fix: forAllSystems | |
| LICENSE | ||
| Makefile | ||
| README.md | ||
Better
Better is a better nice daemon for Linux1 .
Features
- Proudly no C++ code
- can be configured after build time (looking at you, suckless)
- (re)nicing processes
- process spawn detection (duh)
- via netlink (listens for exec(2) events)
- potentially even more efficient event delivery via eBPF?
- polling /proc
- changing scheduler (i.e. SCHED_BATCH)
- you can set realtime priority level too
- changing IO class & priority
- none
- realtime
- best-effort
- idle
- cgroups
- v1
- v2
- easy PGO/BOLT/AutoFDO..?
- memory safe (it has Rust components)
- memory unsafe (it has C components)
Compile
You will need a Rust compiler, clang3 , lld, C headers and of course make(1). An internet connection might be needed to build the Rust portion4 .
# debug
make
# release
make release
# smol binary (you need rust nightly, and rust-src)
make release_small
Install
Follow directions in Compile, and then:
$ sudo make install
-
If you want this to work on one of the BSDs or some other Unix2 , raise an issue and i'll work on it. I daily drive Linux and if there is no demand on the BSD side, there's no real point. ↩︎
-
Except anything that runs XNU. I don't have Apple products. ↩︎
-
You can tweak the Makefile to not use clang if you so desire. The final resultant binary may benefit less from LTO if this is the case. ↩︎
-
To download a toml parser. ↩︎