Last Updated on May 22, 2022
In Operation
Here’s the available arguments.
Start the daemon as a one-off with $ sudo ananicy start
, as you’ll need root privileges to run the program. Better to enable the software to start with your system boot:
$ sudo systemctl start ananicy
Ananicy load all rules in RAM while starting, so to apply rules, you must restart the service.
For each application, the daemon applies settings for the following parameters:
nice
We covered nice in the introduction.
ioclass
Most of the applications are given idle, null, or best-effort. The latter warrants an explanation.
best-effort is the effective scheduling class for any process that has not asked for a specific I/O priority. This class takes a priority argument from 0-7, with a lower number being higher priority. Programs running at the same best-effort priority are served in a round-robin fashion.
ionice
ionice sets the io scheduling class and priority for a program.
sched
Set to null or idle.
rtprio
rtprio sets the program’s realtime or idletime scheduling priority.
oom_score_adj
If a machine runs out of memory, the kernel calls Out of Memory (OOM) killer. The kernel gives a score to each running process called oom_score which indicates how likely it’s to be terminated in case of low available memory.
The oom_score of a process can be found in the /proc directory. oom_score_adj has a range of -1000 to 1000. Assigning -1000 means the process can use 100% memory and won’t be terminated by OOM killer. Alternatively, with a 1000 score, the Linux kernel will keep killing the process even if it’s only using minimal memory.
type
- Game – use more CPU time if possible.
- Player Audio/Video – to add more CPU power to decrease latency/lags, to add real time IO for avoiding lags.
- Image-View – allocates nice to -3 reflecting they need more CPU/IO time, but not so much as other apps.
- Doc-View – allocates nice to -3 reflecting they need more CPU/IO time, but not so much as other apps.
- Low Latency Realtime Apps – sets nice to -10, and ioclass to realtime.
- Background CPU/IP load – where background CPU/IO is needed, but must be as silent as possible.
- Heavy CPU load – programs that must work fast enough without creating so much noise.
- Chat – sets nice to -1, ioclass to best-effort and ionice to 7.
- Adj OOM score – sets it either to 1000 or -1000.
cgroup
A Linux kernel feature that limits, accounts for, and isolates the resource usage (CPU, memory, disk I/O, network, etc.) of a collection of processes. Here cgroup is used for group CPU intensive tasks. It defines the maximum % for all CPUs, not one core.
Pages in this article:
Page 1 – Introduction / Installation
Page 2 – In Operation
Page 3 – Summary
Complete list of articles in this series:
Excellent Utilities | |
---|---|
AES Crypt | Encrypt files using the Advanced Encryption Standard |
Ananicy | Shell daemon created to manage processes’ IO and CPU priorities |
broot | Next gen tree explorer and customizable launcher |
Cerebro | Fast application launcher |
cheat.sh | Community driven unified cheat sheet |
CopyQ | Advanced clipboard manager |
croc | Securely transfer files and folders from the command-line |
Deskreen | Live streaming your desktop to a web browser |
duf | Disk usage utility with more polished presentation than the classic df |
eza | A turbo-charged alternative to the venerable ls command |
Extension Manager | Browse, install and manage GNOME Shell Extensions |
fd | Wonderful alternative to the venerable find |
fkill | Kill processes quick and easy |
fontpreview | Quickly search and preview fonts |
horcrux | File splitter with encryption and redundancy |
Kooha | Simple screen recorder |
KOReader | Document viewer for a wide variety of file formats |
Imagine | A simple yet effective image optimization tool |
LanguageTool | Style and grammar checker for 30+ languages |
Liquid Prompt | Adaptive prompt for Bash & Zsh |
lnav | Advanced log file viewer for the small-scale; great for troubleshooting |
lsd | Like exa, lsd is a turbo-charged alternative to ls |
Mark Text | Simple and elegant Markdown editor |
McFly | Navigate through your bash shell history |
mdless | Formatted and highlighted view of Markdown files |
navi | Interactive cheatsheet tool |
noti | Monitors a command or process and triggers a notification |
Nushell | Flexible cross-platform shell with a modern feel |
nvitop | GPU process management for NVIDIA graphics cards |
OCRmyPDF | Add OCR text layer to scanned PDFs |
Oh My Zsh | Framework to manage your Zsh configuration |
Paperwork | Designed to simplify the management of your paperwork |
pastel | Generate, analyze, convert and manipulate colors |
PDF Mix Tool | Perform common editing operations on PDF files |
peco | Simple interactive filtering tool that's remarkably useful |
ripgrep | Recursively search directories for a regex pattern |
Rnote | Sketch and take handwritten notes |
scrcpy | Display and control Android devices |
Sticky | Simulates the traditional “sticky note” style stationery on your desktop |
tldr | Simplified and community-driven man pages |
tmux | A terminal multiplexer that offers a massive boost to your workflow |
Tusk | An unofficial Evernote client with bags of potential |
Ulauncher | Sublime application launcher |
Watson | Track the time spent on projects |
Whoogle Search | Self-hosted and privacy-focused metasearch engine |
Zellij | Terminal workspace with batteries included |