News for hackers. Stuff that matters.
Re:The Linux Scheduler: A Decade of Wasted Cores (2016) [pdf] by alexey-salmin on Wednesday December 13, 2023 @05:08PM (#38634880)
A complete nightmare. In the past I had to work on an IO-heavy system with 1-5ms read-latency guarantees and the only working solution was to completely manage all writes in the userspace. Manual buffering, manual throttling, manual fallocate, then either DIRECT_IO or mmap+sync_file_range depending on whether you need the written data to be readily available for reads or not.

There was a kernel patch though that solved around 95% of issues with no userspace changes: vm.dirty_write_behind. Unfortunately it never made it into the mainline kernel. [1] For strong latency guarantees it ws insufficient but it greatly improved the typical network/IO spike alternations described above.

I'm surprised it was never fixed upstream despite that fact that even most basic and simple scenarios like "nginx writes a log file to the disk" sometimes explode with seconds-long lockups on memory-fat machines.

[1] https://lore.kernel.org/linux-fsdevel/156896493723.4334.1334...

Re:The Linux Scheduler: A Decade of Wasted Cores (2016) [pdf] by tux1968 on Wednesday December 13, 2023 @07:50PM (#38636388)
> Unfortunately it never made it into the mainline kernel.

That is unfortunate, and a bit surprising given how positively both Linus Torvalds, and Jens Axboe, responded to the patch.