If the system could detect when low latency is important they could get away with a single kernel. Or even simply enable low latency by default for the desktop version of ubuntu.
Why aren't modern systems just statically divided up, with known throughput-oriented junk homed on "efficiency cores" and known latency-sensitive tasks isolated on "performance cores", where each class of CPUs can use an optimal thread scheduler for its tasks? I know thread scheduling isn't the only thing users of lowlatency want, but I bet it solves the bulk of interactivity issues for desktop users.
How’d the BeOS scheduler work? Every desktop OS should just copy that. It felt like magic. Only thing I’ve seen since that even comes close is iOS, and it cheats by killing programs left and right (and has lost a little ground on that front over the years, anyway).
QNX Photon wasn’t far off but was never a realistic option for an everyday desktop (even less so than BeOS, which was at least intended as such).
Why not just give the latency sensitive processes a higher priority than those that aren't? If there are extra cycles on the latency sensitive cores you wouldn't want them to be idling. Trying to outsmart the scheduler can lead to worse scheduling so you have to measure the real world performance.
You can't just wave your hands about having a scheduler that magically optimizes throughput and also promptly switches to a low-latency task as soon as it becomes runnable. There isn't one, because the way of sending the low-latency task to the CPU right away costs the throughput task some of its time.
You actually want the opposite for power saving. (Sometimes) Pipewire got a change recently from Asahi Linux to ensure that relatively rare audio interrupts don't wake up the performance cores and are left on efficiency ones.
> If the system could detect when low latency is important they could get away with a single kernel.
I'm not sure this makes sense, especially in the context of modern power management. I mean -- even re: latency sensitive stuff, you probably don't want to be waking everything up at the granularity of a rt kernel.
> If someone has a server and there are no humans interacting with it the the computer should realize that it is a good time to sacrifice latency.
I think this is kinda the problem. Box: "Now is a good time to sleep for 1 ms." User: "Here I am and not so fast! This is supposed to be a rt kernel with a granularity of less than .002 ms."
Even with that available, scheduling things optionally is not easy. You always sacrifice latency for throughput (or the other way around). Any gains across the board we keep getting in the base kernel from time to time.
I skimmed through the tests in the benchmark and it seems like they’re testing based on throughput and I didn’t see any tests specifically to measure latency. It would have been really useful to see that.
20 comments
[ 1.4 ms ] story [ 54.9 ms ] threadQNX Photon wasn’t far off but was never a realistic option for an everyday desktop (even less so than BeOS, which was at least intended as such).
Yeah, just copy BeOS.
I was wondering if someone had a good link to a book or paper or blog or something.
I'm not sure this makes sense, especially in the context of modern power management. I mean -- even re: latency sensitive stuff, you probably don't want to be waking everything up at the granularity of a rt kernel.
I think this is kinda the problem. Box: "Now is a good time to sleep for 1 ms." User: "Here I am and not so fast! This is supposed to be a rt kernel with a granularity of less than .002 ms."
Even with that available, scheduling things optionally is not easy. You always sacrifice latency for throughput (or the other way around). Any gains across the board we keep getting in the base kernel from time to time.
"to be expected" with no explanation.
What makes this benchmark perform so poorly with the rt kernel?