Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TI/O Optimization



Louis Gerbarg <email@hidden> wrote:

You can't always garantee these sorts of things. I am relatively sure the
issue here is the multiple simulteaneous reads from the DVD, not the
writes to the hd. That means that anything that grabs contiguous blocks
from multiple places (such as a streaming video server...) could be
affected. Linearizing is not appropriate in many of those cases.

On the contrary... A streaming video server which tries to count on being able to stream two or more non-multiplexed data streams from a single DVD *without* linearization of I/Os (at some level, application or OS) is just plain screwed.

Consider: CDs and DVDs take 80-120ms (average) to seek. Assume two streams that are 100ms apart, and 8 seeks per second (alternating reads of 1/4 second worth of content). This scenario cuts total throughput to a mere 1/5 of single-stream throughput, or 1/10 per stream. Clearly, the streaming server's only chance of getting sufficient performance out of this medium is to use very long contiguous reads, probably even longer than 1/4s of content.

Even hard drives shouldn't seek very much if the goal is significant sustained throughput. Consider a modern 10K RPM SCSI drive. Random accesses take ~8ms total (~5ms seek, 3ms avg. rotational latency), and the sustained single stream throughput is about 35 MB/s. With these figures the average cost of a random access, in terms of lost bandwidth, is about 100 KB/s.

The only thing elevator sorting can do to streaming video servers is to potentially make badly written ones work somewhat better by artificially linearizing/"contiguousizing" their I/O requests. If such a server has enough buffering and doesn't let one stream's I/O block the others, it will work much better with OS level I/O sorting active than without.

Tim Seufert




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.