| 22 Jul 2024 |
K900 | nice is kind of the wrong tool these days | 10:49:13 |
K900 | In reply to @atemu12:matrix.org So if you have one context with a compositor running and another where you run some compute, the compositor starts lagging? No, the compositor context gets priority | 10:49:25 |
K900 | "Context" here is generally more granular than "process" because a process can create more than one context | 10:49:47 |
Atemu | In reply to @k900:0upti.me You want SCHED_FIFO/SCHED_RR for actually-RT stuff Forgot to reply to the RT stuff: AFAIK, RT prio is meant for computationally "small" tasks that have strict deadlines | 11:10:06 |
K900 | Well yes, that's why I said actually-Rt | 11:10:19 |
K900 | * Well yes, that's why I said actually-RT | 11:10:21 |
Atemu | It does not help in games in my testing | 11:10:20 |
K900 | So like, you want your compositor to run at SCHED_RT | 11:10:28 |
Atemu | Right but that doesn't help the game, does it? | 11:10:43 |
K900 | And your background tasks to run at SCHED_BATCH | 11:10:52 |
Atemu | Other than being composited on time | 11:10:55 |
Atemu | I run them as SCHED_IDLE | 11:11:04 |
K900 | Then it's definitely not an issue of niceness | 11:11:20 |
Atemu | In reply to @atemu12:matrix.org Try running a game with something compiling in the background at """"idle"""" priority. It'll reduce to 1/2 the frame rate and be a stuttery mess. . | 11:11:30 |
K900 | Because SCHED_IDLE will literally only be scheduled when there is absolutely nothing else to schedule | 11:11:33 |
Atemu | That's the theory | 11:12:02 |
K900 | Are you sure it's not actually bottlenecking on I/O? | 11:12:05 |
K900 | That would be my guess | 11:12:08 |
Atemu | I'd expect more severe lag spikes if IO was involved | 11:12:29 |
Atemu | The frame rate is just generally lower and spikier but not binary | 11:12:50 |
Atemu | * The frame rate is just generally lower and spikier but not binary (either high or lagspike) | 11:13:06 |
Atemu | W.r.t. nice, what I mean is that it still does not work across cgroups IIRC | 11:14:10 |
K900 | It's very likely just the game attempting to stream assets | 11:14:30 |
K900 | And getting stuck on iops | 11:14:36 |
K900 | So things get spikier when more assets are streamed | 11:14:45 |
Atemu | So I can't tell Linux that my general purpose (non-RT) process is higher priority than some other general purpose process when it's running in another cgroup | 11:15:06 |
Atemu | I know how asset streaming lag feels like | 11:15:17 |
Atemu | This ain't it | 11:15:19 |
Atemu | I'm also standing still | 11:15:29 |
Atemu | And everything relevant is in the page cache | 11:15:49 |