Ananicy - is Another auto nice daemon, with community rules support (Use pull request please)
Go to file
Timofey Titovets 65b7eb59db Update debian package info
Signed-off-by: Timofey Titovets <>
2018-02-15 01:01:57 +03:00
ananicy.d Thunderbird (#78) 2018-02-06 16:44:14 +03:00
LICENSE ananicy created 2016-04-30 04:36:46 +03:00
Makefile Cleanups makefile 2017-03-13 03:21:30 +03:00 typo fixed (#42) 2017-11-07 14:29:37 +03:00
ananicy Regen rules to cache instead of just move it, that allow preset PGREP_ARGS & make dump of rules looks nice 2018-01-09 21:52:25 +03:00
ananicy.service Revert "Unit capability" (#81) 2018-02-09 21:21:04 +03:00 Update debian package info 2018-02-15 01:01:57 +03:00



Ananicy (ANother Auto NICe daemon) — is a shell daemon created to manage processes' IO and CPU priorities, with community-driven set of rules for popular applications (anyone may add his own rule via github's pull request mechanism).

I think it's only for desktop usage.

I just wanted a tool for auto set programs nice in my system, i.e.:

  • Why do I have a lags, while compiling kernel and playing a game?
  • Why does dropbox client eat all my IO?
  • Why does torrent/dc client make my laptop run slower?
  • ...

Use ananicy to fix this problems!


X.Y.Z where
X - Major version,
Y - Script version - reset on each major update
Z - Rules version - reset on each script update

Read more about semantic versioning here


To use ananicy you must have systemd installed.

You can install ananicy manually by:

$ git clone /tmp/ananicy
$ cd /tmp/ananicy
$ sudo make install
$ git clone
$ ./Ananicy/ debian
$ sudo dpkg -i ./Ananicy/ananicy-*.deb


$ sudo systemctl enable ananicy
$ sudo systemctl start ananicy


Rules files should be placed under /etc/ananicy.d/ directory and have *.rules extension. Inside .rules file every process is described on a separate line, general syntax is described below:

NAME=<process_name> NICE=cpu_nice SCHED=cpu_sched IOCLASS=io_class IONICE=io_nice_value

All fields except NAME are optional.

NAME used for pgrep -f -w, so you can test your rules manually.

Example configurations:

NAME=cron NICE=-1
NAME=pulseaudio IOCLASS=realtime

Ananicy load all rules in ram while starting, so to apply rules, you must restart service.

Available ionice values:

$ man ionice

Simple rules for writing rules

CFQ IO Scheduller also use 'nice' for internal scheduling, so it's mean processes with same IO class and IO priority, but with different nicceness will take advantages of 'nice' also for IO.

  1. Try don't chage 'nice' of system wide process like initrd.
  2. Please try use full process name (or name with ^ symbols like NAME=^full_name)
  3. When writing rule - try use only 'nice', it must be enough in most cases.
  4. Don't try set to high priority! Niceness can fix some performance problems, but can't give you more. Example: pulseaudio uses 'nice' -11 by default, if you set other cpu hungry task, with 'nice' {-20..-12} you can catch a sound glitches.
  5. For CPU hungry backround task like compiling, just use NICE=19.

About IO priority:

  1. It's usefull use IOCLASS=idle for IO hungry background tasks like: file indexers, Cloud Clients, Backups and etc.
  2. It's not cool set realtime to all tasks. The RT scheduling class is given first access to the disk, regardless of what else is going on in the system. Thus the RT class needs to be used with some care, as it can starve other processes. So try use ioclass first.


Get ananicy output with journalctl:

$ journalctl -efu ananicy.service

Missing schedtool

If you see this error in the output

Jan 24 09:44:18 tony-dev ananicy[13783]: ERRO: Missing schedtool! Abort!

Fix it in Ubuntu with

sudo apt install schedtool

Submitting new rules

Please use pull request, thanks