{"id":13744791,"url":"https://github.com/Nefelim4ag/Ananicy","last_synced_at":"2025-05-09T03:33:23.634Z","repository":{"id":8317518,"uuid":"57414822","full_name":"nefelim4ag/Ananicy","owner":"nefelim4ag","description":"Ananicy - is Another auto nice daemon, with community rules support (Use pull request please)","archived":true,"fork":false,"pushed_at":"2023-03-21T15:03:42.000Z","size":466,"stargazers_count":572,"open_issues_count":56,"forks_count":81,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-07T06:35:39.069Z","etag":null,"topics":["arch","cpu","daemon","linux","priority"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nefelim4ag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-04-29T21:46:46.000Z","updated_at":"2025-03-13T04:34:26.000Z","dependencies_parsed_at":"2024-01-14T15:24:32.580Z","dependency_job_id":"373fc344-09ae-454d-a60b-35cf049fb2ad","html_url":"https://github.com/nefelim4ag/Ananicy","commit_stats":{"total_commits":605,"total_committers":71,"mean_commits":8.52112676056338,"dds":0.631404958677686,"last_synced_commit":"8a1046066fdbf8d374adb323f56db6f5e3ea121e"},"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nefelim4ag%2FAnanicy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nefelim4ag%2FAnanicy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nefelim4ag%2FAnanicy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nefelim4ag%2FAnanicy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nefelim4ag","download_url":"https://codeload.github.com/nefelim4ag/Ananicy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253183307,"owners_count":21867398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arch","cpu","daemon","linux","priority"],"created_at":"2024-08-03T05:01:16.168Z","updated_at":"2025-05-09T03:33:23.017Z","avatar_url":"https://github.com/nefelim4ag.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Ananicy\n\n## Installation\n\n* ![logo](http://www.monitorix.org/imgs/archlinux.png \"arch logo\") Arch: [AUR/minq-ananicy-git](https://aur.archlinux.org/packages/minq-ananicy-git). `paru -S minq-ananicy-git` or `yay -S minq-ananicy-git` should do the trick. Don't forget to start and enable the service by running `sudo systemctl start ananicy.service` and `sudo systemctl enable ananicy.service`.\n\nFor more information [click here](https://github.com/kuche1/minq-ananicy#installation-1)\n\n## What's new?\n\nMore, updated and better organised rules.\n\nSupport for cmdline in rules added. This is particularly useful for applications that share the same name (looking at you Java). See the `freenet` rule as an example:\n```\n{ \"name\": \"java\", \"cmdlines\": [\"freenet.node.NodeStarter\"], \"type\": \"service\" }\n```\nThis translates to: apply the rule to any process named `java`, that received `freenet.node.NodeStarter` as a command line argument. You can add more than one \"cmdlines\" in case you want to fine tune your rules.\n\n# Old description\n\n## Description\nAnanicy (ANother Auto NICe daemon) — is a shell daemon created to manage processes' [IO](http://linux.die.net/man/1/ionice) and [CPU](http://linux.die.net/man/1/nice) priorities, with community-driven set of rules for popular applications (anyone may add their own rule via github's [pull request](https://help.github.com/articles/using-pull-requests/) mechanism). It's mainly for desktop usage.\n\nI just wanted a tool for auto set programs nice in my system, i.e.:\n* Why do I get lag, while compiling kernel and playing games?\n* Why does dropbox client eat all my IO?\n* Why does torrent/dc client make my laptop run slower?\n* ...\n\nUse ananicy to fix these problems!\n\n## Versions\n```\nX.Y.Z where\nX - Major version,\nY - Script version - reset on each major update\nZ - Rules version - reset on each script update\n```\nRead more about semantic versioning [here](http://semver.org/)\n\n## Installation\nTo use ananicy you must have systemd installed.\n\nYou can install ananicy manually by:\n```\n$ git clone https://github.com/Nefelim4ag/Ananicy.git /tmp/ananicy\n$ cd /tmp/ananicy\n$ sudo make install\n```\n* ![logo](http://www.monitorix.org/imgs/archlinux.png \"arch logo\") Arch: [AUR/ananicy-git](https://aur.archlinux.org/packages/ananicy-git).\n* Debian/Ubuntu: use [package.sh](https://raw.githubusercontent.com/Nefelim4ag/Ananicy/master/package.sh) in repo\n```\n$ git clone https://github.com/Nefelim4ag/Ananicy.git\n$ ./Ananicy/package.sh debian\n$ sudo dpkg -i ./Ananicy/ananicy-*.deb\n```\n\nEnable\n```\n$ sudo systemctl enable ananicy\n$ sudo systemctl start ananicy\n```\n## Configuration\nRules files should be placed under `/etc/ananicy.d/` directory and have `*.rules` extension.\nInside .rules file every process is described on a separate line. General syntax is described below:\n\n```\n{ \"name\": \"gcc\", \"type\": \"Heavy_CPU\", \"nice\": 19, \"ioclass\": \"best-effort\", \"ionice\": 7, \"cgroup\": \"cpu90\" }\n```\n\nAll fields except `name` are optional.\n\n`name` used for match processes by exec bin name\n```\n~ basename $(sudo realpath /proc/1/exe)\nsystemd\n```\n\nCurrently matching by other things is not supported.\n\nYou can check what Ananicy sees, by:\n```\nananicy dump proc\n```\n\nAnanicy loads all rules in ram while starting, so to apply rules, you must restart the service.\n\nAvailable ionice values:\n```\n$ man ionice\n```\n\n## Simple rules for writing rules\nCFQ IO Scheduller also uses `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.\n\n1. Avoid changing `nice` of system wide process like initrd.\n2. Please try to use full process name (or name with `^$` symbols like `NAME=^full_name$`)\n3. When writing rule - try to only use `nice`, it must be enough in most cases.\n4. Don't try set to high priority! Niceness can fix some performance problems, but can't give you more.\nExample: pulseaudio uses `nice` -11 by default, if you set other cpu hungry task, with `nice` {-20..-12} you can catch a sound glitches.\n5. For CPU hungry backround task like compiling, just use `NICE=19`.\n\nAbout IO priority:\n\n1. It's useful to use `{\"ioclass\": \"idle\"}` for IO hungry background tasks like: file indexers, Cloud Clients, Backups and etc.\n2. It's not cool to 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 to use ioclass first.\n\n## Debugging\nGet ananicy output with journalctl:\n```\n$ journalctl -efu ananicy.service\n```\n\n### Missing `schedtool`\nIf you see this error in the output\n```\nJan 24 09:44:18 tony-dev ananicy[13783]: ERRO: Missing schedtool! Abort!\n```\nFix it in Ubuntu with\n```\nsudo apt install schedtool\n```\n\n### Submitting new rules\n\nPlease use pull request, thanks\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNefelim4ag%2FAnanicy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNefelim4ag%2FAnanicy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNefelim4ag%2FAnanicy/lists"}