nefelim4ag / Ananicy

Ananicy - is Another auto nice daemon, with community rules support (Use pull request please)
GNU General Public License v3.0
567 stars 79 forks source link

Latest major update breaks user defined rules #461

Open tonibgd opened 1 year ago

tonibgd commented 1 year ago

Description

Steps to reproduce

Example errors:

Error: "type": "Game" not defined
Error: "type": "BG_CPUIO" not defined
Error: "type": "LowLatency_RT" not defined
Error: "type": "Doc-View" not defined
...
ExistingExpert commented 1 year ago

Any workaround for this?

RubenKelevra commented 1 year ago

@tonibgd

That's not "broken rules"... Only custom user created rules using old keywords no longer works.

I would recommend to rename this ticket - to reflect that :)

tonibgd commented 1 year ago

@RubenKelevra I wrote in the description that it's related to user rules, but you are right, title should also make that clear, so I renamed it.

@ExistingProgrammer You can see what the old types were in this diff: ananicy.d/00-types.types

There are two ways to make your rules work again:

Type: Player Audio/Video

Try to add more CPU power to decrease latency/lags

Try to add real time io for avoiding lags

{ "type": "Player-Audio", "nice": -3, "ioclass": "realtime" } { "type": "Player-Video", "nice": -3, "ioclass": "realtime" }

Must have more CPU/IO time, but not so much as other apps

{ "type": "Image-View", "nice": -3 } { "type": "Doc-View", "nice": -3 }

Type: Low Latency Realtime Apps

In general case not so heavy, but must not lag

{ "type": "LowLatency_RT", "nice": -10, "ioclass": "realtime" }

Type: BackGround CPU/IO Load

Background CPU/IO it's needed, but it must be as silent as possible

{ "type": "BG_CPUIO", "nice": 19, "ioclass": "idle", "sched": "idle", "cgroup": "cpu80" }

Type: Heavy CPU Load

It must work fast enough but must not create so much noise

{ "type": "Heavy_CPU", "nice": 19, "ioclass": "best-effort", "ionice": 7, "cgroup": "cpu90" }

Type: Chat

{"type": "Chat", "nice": -1, "ioclass": "best-effort", "ionice": 7 }

Type: Adj OOM Score

{ "type": "OOM_KILL", "oom_score_adj": 1000 } { "type": "OOM_NO_KILL", "oom_score_adj": -1000