3 ms·
Try a low latency kernel on your desktop if you use Linux, that should improve responsiveness some more. Apparently the increase in power consumption is minimal
by ahartmetz 5y ago
Try a low latency kernel on your desktop if you use Linux, that should improve responsiveness some more. Apparently the increase in power consumption is minimal - I use (K)Ubuntu's low-latency kernel even on laptops these days.
- StavrosK 5y agoI 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.
- jorvi 5y agoI feel it's kind of sad this doesn't happen automatically for distros specially geared to be installed on workstations. You sacrifice a tiny bit of throughput for making the computer continually smooth even under heavy load. This, automatically turning on battery optimizations when an internal battery is detected, and automatically applying a 'small speaker' EQ to internal speakers are a few changes that would make Linux feel so much better on a laptop.
- jerf 5y agoYou can also do some "nice"-level management. My XMonad environment is simpler than most, so it's easier for me than someone running a full desktop environment with dozens of processes running around, but I got a lot of responsiveness improvements by nice-ing and ionice-ing my browser down in priority. It does mean that occasionally I switch back to it and it hiccups, but on the flip side it has stopped consuming so many resources and everything else feels much more responsive. I'm actually not sure why it has the effect it does, entirely, because at least in terms of raw resource use the browser doesn't seem to be eating that much stuff, but the effect in practice has been well beyond what can be explained by perceptual placebo. (Maybe there's too many things competing to get the processor at the VBlank interval or something? Numerically, long before the CPUs are at 100% they act contended, even in my rather simple setup here.) Or, to perhaps put it another way, Linux already has this sort of prioritization built in, and it works (though it's obviously not identical since we don't have split cores like that), but it seems underutilized. It's split into at least two parts, the CPU nice and the IO nice. CPU nice-ing can happen somewhat automatically with some heuristics on a process over time, but doing some management of ionice can help too, and in my experience, ionice is very effective. You can do something like a full-text index on the "idle" nice level and the rest of the system acts like it's hardly even happening, even on a spinning-rust hard drive (which is pretty impressive).
- CitizenKane 5y agoOh very cool! I had no idea about this. I'm traveling for awhile but I'll definitely check that out once I'm back and working with my desktop machine again!