[linux-audio-dev] Fwd: [[NO] PATCH] cfq + io priorities

Benno Senoner sbenno at gardena.net
Thu Nov 13 17:57:09 UTC 2003


Paul Davis wrote:

>>Perhaps it would help programs that does everything inside one process,
>>like snd.
>>    
>>
>
>not very likely. the problem with disk i/o is that it actually takes a
>long time to read the data even without OS scheduling delays. you can
>see this in snd relatively easily: keep adding more channels to a
>soundfile, and snd has a harder and harder time keeping up. after
>about 12 channels (YMMV), snd can't keep up at all. its not that the
>streaming rate from the hardware isn't good enough, its that the seek
>time makes it effectively much lower. 
>
>realtime i/o priority will help a bit, but it won't change the basic
>fact that you cannot do disk i/o within a realtime audio thread (unless
>you want it not to work :)
>
>  
>
I agree with Paul here: a two threaded model with relatively large 
buffers will be always needed,
perhaps the real time disk scheduler can help to shorten these buffers.
For example in LinuxSampler we preload a chunk of each sample and this 
part must be big enough
to overcome disk latency when loading the rest from disk.
Perhaps this disk scheduler can help to reduce those buffers a bit but I 
don't think you will be able
to reduce them significantly.
A disk is and will remain a slow beast when it comes to seek times, 
especially on a multi tasking system.

Benno
http://www.linuxsampler.org





More information about the Linux-audio-dev mailing list