First Commit

This commit is contained in:
2025-11-18 23:00:30 -07:00
parent 4117d0afcf
commit f5a3c78aee
15 changed files with 1105 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
# Cgroups definitions
# Currently very simple, only for group CPU intensive tasks
# cpuquota same as systemd CPUQuota,
# only difference is - meaning of N% is all CPUs, not one core.
{ "cgroup": "cpu90", "CPUQuota": 90 }
{ "cgroup": "cpu85", "CPUQuota": 85 }
{ "cgroup": "cpu80", "CPUQuota": 80 }

View File

@@ -0,0 +1,39 @@
# 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", "latency_nice": -5 }
# 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": -4, "latency_nice": -4 }
{ "type": "Player-Video", "nice": -4, "latency_nice": -4 }
# Must have more CPU/IO time, but not so much as other apps
{ "type": "Image-View", "nice": -4, "latency_nice": -4 }
{ "type": "Doc-View", "nice": -4, "latency_nice": -4 }
# Type: Low Latency Realtime Apps
# In general case not so heavy, but must not lag
{ "type": "LowLatency_RT", "nice": -12, "ioclass": "best-effort", "latency_nice": -9 }
# Type: BackGround CPU/IO Load
# Background CPU/IO it's needed, but it must be as silent as possible
{ "type": "BG_CPUIO", "nice": 16, "ioclass": "idle", "sched": "idle", "latency_nice": 11 }
# Type: Heavy CPU Load
# It must work fast enough but must not create so much noise
{ "type": "Heavy_CPU", "nice": 9, "ioclass": "best-effort", "ionice": 7, "latency_nice": 9 }
# Type: Chat
{ "type": "Chat", "nice": -3, "ioclass": "best-effort", "ionice": 7 , "latency_nice": -3 }
# Type: Service
{ "type": "Service", "nice": 10, "ioclass": "best-effort", "ionice": 6 , "latency_nice": 10 }
# Type: Indifference
{ "type": "IN_DIFF", "nice": 0, "ioclass": "best-effort", "ionice": 7 , "latency_nice": 0 }
# Type: Adj OOM Score
{ "type": "OOM_KILL", "oom_score_adj": 1000 }
{ "type": "OOM_NO_KILL", "oom_score_adj": -1000 }

View File

@@ -0,0 +1,28 @@
## Ananicy 2.X configuration
# Ananicy run full system scan every "check_freq" seconds
# supported values 0.01..86400
# values which have sense: 1..60
check_freq = 15
# Disables functionality
cgroup_load = true
type_load = true
rule_load = true
apply_nice = true
apply_latnice = true
apply_ionice = true
apply_sched = true
apply_oom_score_adj = true
apply_cgroup = true
# Loglevel
# supported values: trace, debug, info, warn, error, critical
loglevel = info
# If enabled it does log task name after rule matched and got applied to the task
log_applied_rule = false
# It tries to move realtime task to root cgroup to be able to move it to the ananicy-cpp controlled one
# NOTE: may introduce issues, for example with polkit
cgroup_realtime_workaround = false