Sample Header Ad - 728x90

How to tune BFQ schduler to prevent a single low priority process from severely degrading system performance?

2 votes
1 answer
129 views
I have been trying to use nice/ionice for a while and it turns out that bfq ignores ionice parameters. So how do I prevent a low priority process from consuming all the io bandwith to the detriment of high priority processes? Even nice -n -20 high_priority_cmd;nice -n 19 low_priority_cmd;taskset -a -p 1 $(pgrep high_priority_cmd);taskset -a -p 2 $(pgrep low_priority_cmd); will result in the high_priority_cmd suffering severe latency/bandwidth issues for as long as low_priority_cmd runs. Some [documentation](https://github.com/torvalds/linux/blob/master/Documentation/block/bfq-iosched.rst#per-process-ioprio-and-weight) mentions a per process ioprio but provides no mention of how to change it. [Likely the same issue](https://unix.stackexchange.com/q/164244/529119) , with no answers that actually address the fundamental problem. There are no background services taking up io, cpu, memory, or swap. Just vlc and ffmpeg, if ffmpeg is running then vlc becomes next to unresponsive and I have to play videos at 0.5x speed to prevent skips, stalls, and garbled async(?) decoding. However if I do have lots of cpu and memory intensive services in the background then some thing as simple as md5suming a 1 GB file can stall the system to the point that not even the mouse will move on the screen. Windows OS has never had these issues with shitty incompetent IO scheduling (though to be fair my Windows system has an SSD instead of an HDD, but that is no excuse for incompetence).
Asked by Morrison (21 rep)
Nov 15, 2023, 02:56 AM
Last activity: Mar 11, 2025, 12:19 PM