3 ms·
Funnily in linux we've had kind of the opposite problem where dmcrypt at some point was changed to use high-priority, multi-threaded workqueues, creating a prio
by pengaru 4y ago
Funnily in linux we've had kind of the opposite problem where dmcrypt at some point was changed to use high-priority, multi-threaded workqueues, creating a priority inversion situation.
Regular userspace processes, even those with niced/lowered priority, could generate overwhelming amounts of CPU load just by creating a bunch of IO burden on a dmcrypt-backed mountpoint. Far more than their fair share in terms of their own process scheduling.
The effects of this were especially visible when listening to mp3 files on something like a core2duo (or older) machine. Audio buffer underruns galore, just because you had a big git checkout or rsync running.
It took me years to convince upstream to revert the responsible dmcrypt workqueue commit and fix this.
- ChuckNorris89 4y ago>Audio buffer underruns galore AFAIK, this was also due to the disk IO scheduler used in Linux. Back in the late 00's, audio or video playback would skip on Ubuntu if you had a torrent download on the same HDD, an issue not present under Windows or MacOS. AFAIK, desktop Linux distros now have different schedulers to mitigate this issue, but back then, that made it impossible for me to use it.
- pengaru 4y agoBack in the early days that was a problem as well, but things were better for quite some time even with dmcrypt in play. Then someone at Google landed a change prioritizing dmcrypt throughput for their use case, and many on desktop linux using dmcrypt suffered for years because of it.
- ahartmetz 4y agoAh, the "Linux is for servers" problem. Linus thinks the desktop is important, but most contributors work for companies that do server stuff or have mostly server paying customers...
- PaulDavisThe1st 4y agoLinux has better RT performance than windows or macOS (or almost anything else that isn't actually an RT OS). That took a lot of work and it didn't come from the server crowd.
- ChuckNorris89 4y agoSure, but that doesn't necessarily translate into a great desktop experience, for which Windows and MacOS are purposely built.
- PaulDavisThe1st 4y agoDepends on what you run on your desktop. If it's real time audio software, it makes for a great desktop experience.
- ChuckNorris89 4y agoNot if you IO multitask on the same HDD.
- thrwaway9871 4y ago> It took me years to convince upstream to revert the responsible dmcrypt workqueue commit and fix this. As a regular user who would never track an issue like this down i just wanna say thank you!
- judge2020 4y agoFyi you need a fully blank line to separate text into a new paragraph. https://news.ycombinator.com/formatdoc https://news.ycombinator.com/formatdoc
- loeg 4y agoYeah, the dmcrypt queuing is also a nightmare for getting low latency IO out of your SSDs. IIRC dmcrypt ops go through like 2-4 different queues before hitting disk in the default configuration[1]. [1]: https://blog.cloudflare.com/speeding-up-linux-disk-encryption/#:~:text=Digging%20into%20the%20source%20code https://blog.cloudflare.com/speeding-up-linux-disk-encryptio...
- lollsatalls 4y ago
- remuskaos 4y agoI remember that behavior from a few years ago! I also remember the problem "just sort of went away", and I want to thank you for making that happen!