achieving smooth sustained writing to hdd

Nov 20, 2007 1 Replies

I have a video capture app which is streaming video to hdd.



We tried using both write and fwrite, but if we don't fsync() every few kbs or tune bdflush to very aggressive settings, when kjournald jumps in we have lost frames.



We're using real time threads on linux 2.4.32 and one of the threads is continuously sigwait()ing for an interrupt from the capture device driver.



Why is kjournald getting more priority than that? Actually, we have a fifo running from the capture thread to the thread that does the writes, and it doesn't even get filled, which is the opposite of what we were planning to get: we thought the fifo would absorb the buffering while the disk was being written.



We're forced to use pio on the disk, so that's definitely dragging us down...



Any clue?



Thanks a lot, M


Kernel 2.6 (especially > 2.6.22) is said to be a lot better for soft realtime applications like media stuff than Kernel 2.4.x

-Michael

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required