diff options
author | Vincent Grande | 2021-01-21 09:03:30 -0500 |
---|---|---|
committer | Vincent Grande | 2021-01-21 09:03:30 -0500 |
commit | eea9b08f3f1e76f018681872b13b89f35e335457 (patch) | |
tree | 46515da73c5d0f8a575d16911160355eb61fb127 | |
parent | ca536b21f0c02b0c38acb098d54c334922b8f54b (diff) | |
download | aur-eea9b08f3f1e76f018681872b13b89f35e335457.tar.gz |
start and finish added
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 13 | ||||
-rw-r--r-- | README.md | 82 | ||||
-rw-r--r-- | ananicy.finish | 3 | ||||
-rw-r--r-- | ananicy.start | 3 |
5 files changed, 20 insertions, 85 deletions
@@ -14,8 +14,12 @@ pkgbase = ananicy-s6 depends = schedtool source = ananicy.type source = ananicy.run + source = ananicy.start + source = ananicy.finish b2sums = 0d8b60c573270d0117b3613fa99b65d94b1a91c0029a07bfb1157d2a990e59636c4785b67dbf64bdf1cd17a77c55f71a041170c9a6edb81689053e6ee158d46e b2sums = 25551175031c7426bcb0a4169960a464494a0e16908865d9bd8abed8bb6ffb4958ebeded19fccd7483387f9ce02336582aa587ff7284ec85ae2ccfa663ffc89b + b2sums = SKIP + b2sums = SKIP pkgname = ananicy-s6 install = ananicy-s6.install @@ -1,6 +1,7 @@ # Maintainer: Vincent Grande <shoober420@gmail.com> -# Contributor: linuxer <linuxer@artixlinux.org> +# Contributor: Eli Schwartz <eschwartz@archlinux.org> # Contributor: Timofey Titovets <nefelim4ag@gmail.com> +# Contributor: linuxer <linuxer@artixlinux.org> pkgname=ananicy-s6 _alias=ananicy @@ -13,14 +14,20 @@ license=('ISC') depends=('ananicy' 's6' 'bash' 'schedtool') makedepends=('git' 'make') source=("ananicy.type" - "ananicy.run") + "ananicy.run" + "ananicy.start" + "ananicy.finish") b2sums=('0d8b60c573270d0117b3613fa99b65d94b1a91c0029a07bfb1157d2a990e59636c4785b67dbf64bdf1cd17a77c55f71a041170c9a6edb81689053e6ee158d46e' - '25551175031c7426bcb0a4169960a464494a0e16908865d9bd8abed8bb6ffb4958ebeded19fccd7483387f9ce02336582aa587ff7284ec85ae2ccfa663ffc89b') + '25551175031c7426bcb0a4169960a464494a0e16908865d9bd8abed8bb6ffb4958ebeded19fccd7483387f9ce02336582aa587ff7284ec85ae2ccfa663ffc89b' + 'SKIP' + 'SKIP') install=$pkgname.install 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 + cp ananicy.start $pkgdir/etc/s6/sv/$_alias/start + cp ananicy.finish $pkgdir/etc/s6/sv/$_alias/finish install=ananicy-s6.install } diff --git a/README.md b/README.md deleted file mode 100644 index 97999e63834d..000000000000 --- a/README.md +++ /dev/null @@ -1,82 +0,0 @@ -# `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.finish b/ananicy.finish new file mode 100644 index 000000000000..28dbd7a3db7d --- /dev/null +++ b/ananicy.finish @@ -0,0 +1,3 @@ +#!/bin/sh + +exec /sbin/sysctl -e kernel.sched_autogroup_enabled=1 diff --git a/ananicy.start b/ananicy.start new file mode 100644 index 000000000000..28dbd7a3db7d --- /dev/null +++ b/ananicy.start @@ -0,0 +1,3 @@ +#!/bin/sh + +exec /sbin/sysctl -e kernel.sched_autogroup_enabled=1 |