Re: [Fwd: [linux-audio-dev] info point on linux hdr]

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [Fwd: [linux-audio-dev] info point on linux hdr]
From: Stephen C. Tweedie (sct_AT_redhat.com)
Date: Mon Apr 17 2000 - 20:24:59 EEST


Hi,

On Mon, Apr 17, 2000 at 01:10:41PM -0400, Paul Barton-Davis wrote:
>
> I had a question about this. Doug Gilbert told me that he heard using
> multiple threads to schedule I/O requests could be a win, and that was
> also my intuition. Other people have claimed that its often not a win,
> and that the kernel's I/O scheduling algorithm is not well-suited for
> the particular case in question here, making it better to just queue
> them up serially by blocking a single thread in a read/write call.

It depends. Using more threads can lead to more conflicting IO seeks
unless you can schedule enough IOs at once to give the scheduler a good
chance to sort the IOs into decent-sized blocks.

The objective should probably be to make sure that you have a few hundred
KB of outstanding IO requests on each stream at any one time. That can
be done either with lots of threads submitting small IOs, or a few
threads submitting large IOs. Just adding a few more threads but
still performing small IOs will definitely not help.

> As for O_DIRECT, yes, its clearly orthogonal, but as BeOS points out
> rather nicely, incredibly valuable when doing streaming media since it
> doesn't (or shouldn't) pollute the buffer cache, which would be
> pointless in this situation. This would also remove the buffer cache
> batching write-behinds too, which would fix that problem for those who
> suffer from it, no ?

Yes, it would, but O_SYNC also fixes the write-behind case.

--Stephen


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Mon Apr 17 2000 - 21:04:18 EEST