I have a real-time application which always writes data to a RAID 10 HDD configuration in a sequential manner at around ~50 MB/s. It uses mmap and writing should never be blocked due to waiting I/O.
Then sometimes large burst of reading occurs, e.g. I want to read 500GB of sequential data as fast as possible from the drive. However, it may not cause the writing application to be I/O blocked.
We solve this currently by setting the writing application to SCHED_FIFO and then use CFQ I/O Scheduler + I/O nice on the reading applications. This works fine, but it is a bit inefficient as the drives need to do a lot of seeking back and forth to do both writing and reading.
I'm wondering whether there are any strategies to improve this? The system drive is a fast 256GB SSD drive. Could I somehow have Linux write to the SSD while there is space and reads are occurring? Is this achievable with e.g. bcache, dmcache or some other module? i.e. it would only write to the SSD while reads to the HDD are occurring and then later flush it out to the HDD. If the SSD cache is "full" then the writes to the HDD should have full priority over reads.