RamJet is a small C daemon inspired by Rice/Ananicy. It scans /proc and applies Ananicy-style .rules, .types definitions.
Dependencies are only the C toolchain and Linux headers:
make
make testInstall:
sudo make installThe daemon reads configuration from /etc/ananicy.d and runs in the foreground, which makes it suitable for systemd and runit.
Rules support:
nametypenice(-20to19)io-classorioclass(realtime,best-effort,idle)ionice(0to7)cgroup(Not working and maybe will be deprecated in a future)oom_score_adj(-1000to1000)
Types support the same scheduling fields and are inherited by rules when a rule does not define the corresponding value itself.
Cgroup handling remains intentionally limited to the legacy v1 CPU controller at /sys/fs/cgroup/cpu. On systems using cgroup v2 only, RamJet starts normally but reports cgroups as unavailable (and maybe will be deprecated in a future).
Systemd:
sudo install -m 644 systemd/ramjet.service /etc/systemd/system/ramjet.service
sudo systemctl daemon-reload
sudo systemctl enable --now ramjet.serviceFor runit, place the runit/ directory under the appropriate service directory.
- Fixed Linux
ioniceclass numbers. - Fixed the valid
nicerange. - Stopped processing the main thread twice.
- Hardened
/procPID parsing against malformed/overflowing directory names. - Propagated scheduling/application errors instead of always returning success.
- Added
oom_score_adjapplication and inheritance. - Replaced shell-based
ioniceinvocation with directexecvp. - Removed the bundled cJSON dependency in favor of a small parser for the flat Ananicy JSON objects RamJet consumes.
- Made duplicate rule/type/cgroup definitions replace previous entries deterministically.
- Prevented shutdown from deleting pre-existing cgroups.
- Rejected unsafe cgroup names containing path separators.
- Fixed stale systemd/runit paths and arguments.