summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Grande2021-01-17 13:28:59 -0500
committerVincent Grande2021-01-17 13:28:59 -0500
commit52e8e68ec1b5dc50f16b6061ab7368d0bbdc52cf (patch)
treec043237a9c087f966db70e3f1d02bfe6cdd2d9fe
downloadaur-52e8e68ec1b5dc50f16b6061ab7368d0bbdc52cf.tar.gz
initial upload
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD31
-rw-r--r--README.md82
-rw-r--r--ananicy-s6.install3
-rw-r--r--ananicy.run3
-rw-r--r--ananicy.type1
6 files changed, 142 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4783beaf1a42
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = ananicy-s6
+ pkgdesc = Ananicy - is Another auto nice daemon, with community rules support
+ pkgver = 2.2.0.r55.g5559e01
+ pkgrel = 1
+ url = https://github.com/Nefelim4ag/Ananicy.git
+ install = ananicy-s6.install
+ arch = any
+ license = ISC
+ makedepends = git
+ makedepends = make
+ depends = ananicy
+ depends = s6
+ depends = bash
+ depends = schedtool
+ source = ananicy.type
+ source = ananicy.run
+ b2sums = 0d8b60c573270d0117b3613fa99b65d94b1a91c0029a07bfb1157d2a990e59636c4785b67dbf64bdf1cd17a77c55f71a041170c9a6edb81689053e6ee158d46e
+ b2sums = 25551175031c7426bcb0a4169960a464494a0e16908865d9bd8abed8bb6ffb4958ebeded19fccd7483387f9ce02336582aa587ff7284ec85ae2ccfa663ffc89b
+
+pkgname = ananicy-s6
+ install = ananicy-s6.install
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7e4fbe5758b4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: Vincent Grande <shoober420@gmail.com>
+# Contributor: linuxer <linuxer@artixlinux.org>
+# Contributor: Timofey Titovets <nefelim4ag@gmail.com>
+
+pkgname=ananicy-s6
+_alias=ananicy
+pkgver=2.2.0.r55.g5559e01
+pkgrel=1
+pkgdesc="Ananicy - is Another auto nice daemon, with community rules support"
+arch=('any')
+url="https://github.com/Nefelim4ag/Ananicy.git"
+license=('ISC')
+depends=('ananicy' 's6' 'bash' 'schedtool')
+makedepends=('git' 'make')
+source=("ananicy.type"
+ "ananicy.run")
+b2sums=('0d8b60c573270d0117b3613fa99b65d94b1a91c0029a07bfb1157d2a990e59636c4785b67dbf64bdf1cd17a77c55f71a041170c9a6edb81689053e6ee158d46e'
+ '25551175031c7426bcb0a4169960a464494a0e16908865d9bd8abed8bb6ffb4958ebeded19fccd7483387f9ce02336582aa587ff7284ec85ae2ccfa663ffc89b')
+install=$pkgname.install
+
+pkgver() {
+ cd "$pkgname"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+package() {
+ mkdir -p "$pkgdir/etc/s6/sv/$_alias"
+ cp ananicy.run $pkgdir/etc/s6/sv/$_alias/run
+ cp ananicy.type $pkgdir/etc/s6/sv/$_alias/type
+ install=ananicy-s6.install
+}
diff --git a/README.md b/README.md
new file mode 100644
index 000000000000..97999e63834d
--- /dev/null
+++ b/README.md
@@ -0,0 +1,82 @@
+# `ananicy-s6` is a fork of ananicy for Artix Linux s6 Init
+
+## Description
+Ananicy (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 his own rule via github's [pull request](https://help.github.com/articles/using-pull-requests/) 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!
+
+## Versions
+```
+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](http://semver.org/)
+
+## Configuration
+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": "gcc", "type": "Heavy_CPU", "nice": 19, "ioclass": "best-effort", "ionice": 7, "cgroup": "cpu90" }
+```
+
+All fields except 'name' are optional.
+
+'name' used for match processes by exec bin name
+```
+~ basename $(sudo realpath /proc/1/exe)
+systemd
+```
+
+Currently match by other things, not supported.
+
+You can check what Ananicy see, by:
+```
+ananicy dump proc
+```
+
+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.
+
+### 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
diff --git a/ananicy-s6.install b/ananicy-s6.install
new file mode 100644
index 000000000000..debfec6d0a58
--- /dev/null
+++ b/ananicy-s6.install
@@ -0,0 +1,3 @@
+post_install() {
+ echo "Configs in /etc/ananicy.d/"
+}
diff --git a/ananicy.run b/ananicy.run
new file mode 100644
index 000000000000..4e282f18e7af
--- /dev/null
+++ b/ananicy.run
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec /usr/bin/ananicy start
diff --git a/ananicy.type b/ananicy.type
new file mode 100644
index 000000000000..1780f9f44efd
--- /dev/null
+++ b/ananicy.type
@@ -0,0 +1 @@
+longrun \ No newline at end of file