Excellent Utilities: Ananicy – auto nice daemon

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 enable ananicy
$ 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.

Next page: Page 3 – Summary

Pages in this article:
Page 1 – Introduction / Installation
Page 2 – In Operation
Page 3 – Summary

Complete list of articles in this series:

Excellent Utilities
tmuxA terminal multiplexer that offers a massive boost to your workflow
lnavAdvanced log file viewer for the small-scale; great for troubleshooting
PaperworkDesigned to simplify the management of your paperwork
AbricotineMarkdown editor with inline preview functionality
mdlessFormatted and highlighted view of Markdown files
fkillKill processes quick and easy
TuskAn unofficial Evernote client with bags of potential
UlauncherSublime application launcher
McFlyNavigate through your bash shell history
LanguageToolStyle and grammar checker for 30+ languages
pecoSimple interactive filtering tool that's remarkably useful
Liquid PromptAdaptive prompt for Bash & Zsh
AnanicyShell daemon created to manage processes’ IO and CPU priorities
cheat.shCommunity driven unified cheat sheet
ripgrepRecursively search directories for a regex pattern
exaA turbo-charged alternative to the venerable ls command
OCRmyPDFAdd OCR text layer to scanned PDFs
WatsonTrack the time spent on projects
fontpreviewQuickly search and preview fonts
fdWonderful alternative to the venerable find
scrcpyDisplay and control Android devices
dufDisk usage utility with more polished presentation than the classic df
tldrSimplified and community-driven man pages
lsdLike exa, lsd is a turbo-charged alternative to ls
brootNext gen tree explorer and customizable launcher
DeskreenLive streaming your desktop to a web browser
Share this article

Share your Thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.