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:
We covered nice in the introduction.
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 sets the io scheduling class and priority for a program.
Set to null or idle.
rtprio sets the program’s realtime or idletime scheduling priority.
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.
- 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.
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.
Complete list of articles in this series:
|tmux||A terminal multiplexer that offers a massive boost to your workflow|
|lnav||Advanced log file viewer for the small-scale; great for troubleshooting|
|Paperwork||Designed to simplify the management of your paperwork|
|Abricotine||Markdown editor with inline preview functionality|
|mdless||Formatted and highlighted view of Markdown files|
|fkill||Kill processes quick and easy|
|Tusk||An unofficial Evernote client with bags of potential|
|Ulauncher||Sublime application launcher|
|McFly||Navigate through your bash shell history|
|LanguageTool||Style and grammar checker for 30+ languages|
|peco||Simple interactive filtering tool that's remarkably useful|
|Liquid Prompt||Adaptive prompt for Bash & Zsh|
|Ananicy||Shell daemon created to manage processes’ IO and CPU priorities|
|cheat.sh||Community driven unified cheat sheet|
|ripgrep||Recursively search directories for a regex pattern|
|exa||A turbo-charged alternative to the venerable ls command|
|OCRmyPDF||Add OCR text layer to scanned PDFs|
|Watson||Track the time spent on projects|
|fontpreview||Quickly search and preview fonts|
|fd||Wonderful alternative to the venerable find|
|scrcpy||Display and control Android devices|
|duf||Disk usage utility with more polished presentation than the classic df|
|tldr||Simplified and community-driven man pages|
|lsd||Like exa, lsd is a turbo-charged alternative to ls|
|broot||Next gen tree explorer and customizable launcher|
|Deskreen||Live streaming your desktop to a web browser|