I have had this issue for quite some time and tried many times to fix it on my own and it always fails. IP schedulers, ionice and things like that always yield no result. I even went and bought an ssd thinking maybe it would fix the issue. Nope.
The issue is we have a fairly powerful workstation that has data being downloaded to a single disk on it at a rate of about 10-15MB/s consistently. Most of these need to be screened so they tend to be watched as the data is being written to the disk. The performance is atrocious. Audio goes out of sync, large videos fail to load, video will just stop while audio keeps going, corruption. But when you stop the data transfer all is fine.
I opened up iotop and yes the download the writing a lot but the videos even large videos really don't seem to be reading all that much.
I have tried different io schedulers, I have tried ionice, I have tried nice, I have tried buying an ssd to see if the increased performance somehow fixes it! But nope. I have tried different video players like mplayer and vlc. I have tried configuring them to take on more cache so they read ahead and rely on the disk less but nothing works.
It's becoming a really big problem.
The video playing needs to be the priority when it's playing and the data writing should yield. So when the video is being watched the download can be slowed down or the write can be slowed but not overall.
I hope somebody has some ideas.
%Cpu(s): 23.5 us, 5.6 sy, 0.0 ni, 59.1 id, 10.8 wa, 0.0 hi, 1.0 si, 0.0 st