5 ms·
I run KUbuntu, how can I enable this? EDIT: I searched a bit and, although I haven't found instructions anywhere, I did find people saying that the low-latency
by StavrosK 5y ago
I run KUbuntu, how can I enable this?
EDIT: I searched a bit and, although I haven't found instructions anywhere, I did find people saying that the low-latency kernel decreases throughput as a tradeoff to lower latency. Have you found this to be the case?
Also, another source says that the preempt kernel might be better for some workloads: https://itectec.com/ubuntu/ubuntu-choose-a-low-latency-kernel-over-a-generic-or-realtime-one/ https://itectec.com/ubuntu/ubuntu-choose-a-low-latency-kerne...
Can anyone comment on these?
- pizza234 5y agoThere's an interesting Stack Overflow question/answers: https://askubuntu.com/q/126664 https://askubuntu.com/q/126664. In general terms, one either just installs the specifically recompiled package (-preempt, -lowlatency etc.), or recompiles their own. The related parameters can't be enabled, because they're chosen as kernel configuration, and compiled in. I'd take such changes with a big grain of salt, because they're very much subject to perceptive bias.
- adrianN 5y agoIf there were one simple trick to make your computer feel faster without downsides, defaults would change.
- ahartmetz 5y agoTrue in general, but there is seriously little downside to using a low-latency kernel. Sometimes it even improves throughput, usually the effect is tiny either way. I think most people just don't care or don't know that they care about responsiveness.
- deleted 5y ago[deleted]
- ahartmetz 5y agoBasically you install linux-lowlatency and reboot. Grub will prefer it over the generic kernel. Make sure that you also get linux-modules-extra in the lowlatency version or you might boot into a system with missing drivers. Happened on my laptop when I switched to lowlatency.
- cout 5y agoI have not tried the preempt kernel. I have tried the lowlatency kernel and found that it improved overall performance, not just latency. Turns out that the cost of NUMA balancing (https://www.kernel.org/doc/Documentation/sysctl/kernel.txt https://www.kernel.org/doc/Documentation/sysctl/kernel.txt) was outweighing any benefit we might get from it. The problem is that NUMA balancing is implemented by periodically unmapping pages, triggering a page fault if the page is accessed later. This lets the kernel move the page to the NUMA node that is accessing the memory. The page fault is not free, however; it has a measurable cost, and happens even for processes that have never migrated to another core. The lowlatency kernel turns off NUMA balancing by default. Instead of switching to the lowlatency kernel, we set `kernel.numa_balancing = 0` in `sysctl.conf` and accepted the consequences.