• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: High bandwidth disk management techniques
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: High bandwidth disk management techniques


  • Subject: Re: High bandwidth disk management techniques
  • From: Doug Wyatt <email@hidden>
  • Date: Mon, 2 May 2005 01:24:27 -0700

On May 1, 2005, at 2:30, Mark Gilbert wrote:
We have noticed that OSX seems to maintain a HUGE disk cache (as much as 250 MB) which sits between our calls to disk and the actual disk access (we call once per second, but the disk is only hit around once every 5 seconds).


Use the Carbon File Manager.

Unless you're reading loops repeatedly, set kFSNoCacheBit on positionMode in your calls to FSReadFork. This will prevent caching of read data that you won't be reading again.

Read into page-aligned buffers (i.e. addresses that are multiples of 4096).

Read in multiples of 4096 bytes.

Read from file positions that are multiples of 4096 from the beginning of the file.

A fully aligned read should bypass various places in the file system and File Manager that will do buffering and copying.

Do an unaligned read first if it makes it possible for all of your subsequent reads on a file to be aligned.

When deciding how large a buffer per file to maintain, consider drive seek times. A drive with a 10 ms seek time can only read from 100 different files per second.

I've heard of people reading filesystem data structures in order to get a big picture, for all the reads during a given time interval, what tracks/sectors will be read, and reorder the reads to minimize seek times. But that's beyond my experience.

Cheers,
Doug

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: High bandwidth disk management techniques
      • From: Herbie Robinson <email@hidden>
    • Re: High bandwidth disk management techniques
      • From: Ben Dougall <email@hidden>
    • Re: High bandwidth disk management techniques
      • From: Mark Gilbert <email@hidden>
References: 
 >High bandwidth disk management techniques (From: Mark Gilbert <email@hidden>)

  • Prev by Date: QT7 changes behavior of AudioConverterConvertBuffer
  • Next by Date: Re: High bandwidth disk management techniques
  • Previous by thread: High bandwidth disk management techniques
  • Next by thread: Re: High bandwidth disk management techniques
  • Index(es):
    • Date
    • Thread