• 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: Ben Dougall <email@hidden>
  • Date: Tue, 3 May 2005 11:58:34 +0100

On Tuesday, May 3, 2005, at 09:32 am, Herbie Robinson wrote:

At 2:31 PM +0100 5/2/05, Ben Dougall wrote:
what's the smallest possible chunk of data that can be pulled from the hard drive in one read?

SCSI allows you to read any number of bytes starting on a sector boundary. For all practical purposes that means you must read whole sectors. Also, the disk controllers generally like to reference entire pages of physical memory; so, you really always want to read pages. If you don't, the OS reads pages into its own disk buffers and copies what you need from them (this is called de-blocking).


is it 4096 bytes?

Not very likely. The most common size is 512, larger powers of two are rarer. Seagate will allow SCSI drives to be formatted up to about 2052 (or maybe 2056) bytes per sector. The drive manufacturers don't like large sector sizes because they would require more error correction bits and that would make the hardware for computing them more expensive.


will it always be the same as the memory page size? or does it depend on the drive so therefore is a variable value?

The value is set when the drive is formatted. The actual values allowed vary depending on the drive and what the OS will support. For all practical purposes, most drives are formatted with 512 byte sectors (because PC BIOS implementations only support 512 byte sectors and that forces everything else).


how can you find out what that value is programmatically if the value is variable?

You can probably read it from the OS as volume info, but there isn't any reason you really want to know. The page size is what is important.

thanks very much for the information.

so even though if a drive has a minimum read size of 512 bytes that's irrelevant as even if you were to just ask for a sector of data, a page size block of data would actually be pulled from the drive.

so with sector size 512 and page size 4096, it wouldn't be possible to ask for 8 particular, non sequential sectors and get them in one page without going through any of the OS disk buffer/de-blocking you mention? for each sector read like that they'd be another 3584 bytes pulled from the disk which if you don't use would be wasted?

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


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

  • Prev by Date: Re: High bandwidth disk management techniques
  • Next by Date: Re: High bandwidth disk management techniques
  • Previous by thread: Re: High bandwidth disk management techniques
  • Next by thread: Re: High bandwidth disk management techniques
  • Index(es):
    • Date
    • Thread