Utilities

Excellent Utilities: Ananicy – auto nice daemon

Last Updated on May 22, 2022

In Operation

Here’s the available arguments.

Ananicy

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:

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.

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
AES CryptEncrypt files using the Advanced Encryption Standard
AnanicyShell daemon created to manage processes’ IO and CPU priorities
brootNext gen tree explorer and customizable launcher
CerebroFast application launcher
cheat.shCommunity driven unified cheat sheet
CopyQAdvanced clipboard manager
crocSecurely transfer files and folders from the command-line
DeskreenLive streaming your desktop to a web browser
dufDisk usage utility with more polished presentation than the classic df
ezaA turbo-charged alternative to the venerable ls command
Extension ManagerBrowse, install and manage GNOME Shell Extensions
fdWonderful alternative to the venerable find
fkillKill processes quick and easy
fontpreviewQuickly search and preview fonts
horcruxFile splitter with encryption and redundancy
KoohaSimple screen recorder
KOReaderDocument viewer for a wide variety of file formats
ImagineA simple yet effective image optimization tool
LanguageToolStyle and grammar checker for 30+ languages
Liquid PromptAdaptive prompt for Bash & Zsh
lnavAdvanced log file viewer for the small-scale; great for troubleshooting
lsdLike exa, lsd is a turbo-charged alternative to ls
Mark TextSimple and elegant Markdown editor
McFlyNavigate through your bash shell history
mdlessFormatted and highlighted view of Markdown files
notiMonitors a command or process and triggers a notification
NushellFlexible cross-platform shell with a modern feel
nvitopGPU process management for NVIDIA graphics cards
OCRmyPDFAdd OCR text layer to scanned PDFs
Oh My ZshFramework to manage your Zsh configuration
PaperworkDesigned to simplify the management of your paperwork
pastelGenerate, analyze, convert and manipulate colors
PDF Mix ToolPerform common editing operations on PDF files
pecoSimple interactive filtering tool that's remarkably useful
ripgrepRecursively search directories for a regex pattern
RnoteSketch and take handwritten notes
scrcpyDisplay and control Android devices
StickySimulates the traditional “sticky note” style stationery on your desktop
tldrSimplified and community-driven man pages
tmuxA terminal multiplexer that offers a massive boost to your workflow
TuskAn unofficial Evernote client with bags of potential
UlauncherSublime application launcher
WatsonTrack the time spent on projects
Whoogle SearchSelf-hosted and privacy-focused metasearch engine
ZellijTerminal workspace with batteries included
Subscribe
Notify of
guest

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

0 Comments
Inline Feedbacks
View all comments