Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Latest major update breaks user defined rules #461

Open
tonibgd opened this issue Jan 2, 2023 · 3 comments
Open

Latest major update breaks user defined rules #461

tonibgd opened this issue Jan 2, 2023 · 3 comments

Comments

@tonibgd
Copy link

tonibgd commented Jan 2, 2023

Description

  • Latest Major update (Major Updates #457) modified ananicy.d/00-types.types
    • Types got renamed and are not backward compatible
      • users that have rules that are not in this repository will break
      • Game -> game, Doc-View -> document-viewer etc.
    • Heavy_CPU, BG_CPUIO and LowLatency_RT got removed, breaking all the rules that use them

Steps to reproduce

  • systemctl start ananciy.service
  • journalctl -efu ananicy.service

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
...
@ExistingProgrammer
Copy link

Any workaround for this?

@RubenKelevra
Copy link

RubenKelevra commented Feb 25, 2023

@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 tonibgd changed the title Broken rules since last major update Latest major update breaks user defined rules Feb 25, 2023
@tonibgd
Copy link
Author

tonibgd commented Feb 25, 2023

@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:

  • Opiton 1: Modify all your rules to use the new types
  • Option 2: Edit /etc/ananicy.d/00-types.types and add back those types that were removed
    • Keep in mind that types are case sensitive so Game and game are two different types
# Type: Game
# Use more CPU time if possible
# Games do not always need more IO, but in most cases can be hungry for CPU
{ "type": "Game", "nice": -5, "ioclass": "best-effort" }

# 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 

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants