Re: How to get a sustained read speed under OS X
Re: How to get a sustained read speed under OS X
- Subject: Re: How to get a sustained read speed under OS X
- From: Jeff Moore <email@hidden>
- Date: Thu, 3 Jun 2004 11:52:19 -0700
In the case you are describing, thread priority have a whole lot to do
with why your transfer rate is dropping. The bottleneck is the drive
mechanism.
No matter what priority your thread runs at, it will eventually share
time with the Finder's thread (e.g. when you issue a blocking read).
Consequently, your read requests are shuffled together with the
Finder's read requests in the disk driver's queue. This effectively
increases the amount of time the driver takes to service your requests.
Further, since the two streams of data are probably not interleaved
with one another, you lose more performance due to the larger average
latencies in the seeks.
Tweaking the thread priority will provide a boost in performance, but
only to a point. It allows more of your requests to get into the queue
than the Finder's. But probably the biggest boost in performance you
can get is to read in larger chunks. That the time you do get from the
driver is better spent.
All this also assumes that you are doing non-cached reads from page
aligned offsets in the files into page aligned memory. If you aren't
doing this, you are losing all sorts of performance in the first place
due to all the extra buffer copying that has to go on to handle the
unaligned cases.
On Jun 3, 2004, at 10:21 AM, Marc Van Olmen wrote:
Hi,
Because it is realtime problem I'm having related to video/audio
stream I
hope I can ask you guys this question:
How do I get a sustained stream working under OS X, or does OS X
doesn't
provide a mechanism for this?
I thought it was a matter of getting the read thread the right
priority or
is it better that I use some async reading?
I need to get a sustained speed of 3.5MBytes/second, this is easy to
do but
as soon I start duplicate a file in the Finder on the same hard disk
I'm
trouble, my read speeds drops very low. On a G5 the problem was worse
then
on a G4 because maybe not so good harddisk.
I tried the following thread priority thricks but none of them solve
the
issue although I noticed a slight improvement with certain priority
but no
real solution.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.