Re: High bandwidth disk management techniques
Re: High bandwidth disk management techniques
- Subject: Re: High bandwidth disk management techniques
- From: Ben Dougall <email@hidden>
- Date: Mon, 2 May 2005 14:31:00 +0100
On Monday, May 2, 2005, at 09:24 am, Doug Wyatt wrote:
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.
what's the smallest possible chunk of data that can be pulled from the
hard drive in one read? is it 4096 bytes? will it always be the same as
the memory page size? or does it depend on the drive so therefore is a
variable value? how can you find out what that value is
programmatically if the value is variable?
thanks, ben.
_______________________________________________
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