home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / pub / hardware / ata-scsi-harddrives < prev    next >
Internet Message Format  |  1996-04-27  |  11KB

  1. From myrddin.imat.com!rick Sun Apr 28 01:15:46 1996
  2. Path: myrddin.imat.com!rick
  3. From: rick@hugin.imat.com (Rick Moen)
  4. Newsgroups: sfpcug.general
  5. Subject: Hard drives
  6. Date: 28 Apr 1996 08:15:21 GMT
  7. Organization: Imagine That
  8. Lines: 196
  9. Message-ID: <4lv9ep$1ri@myrddin.imat.com>
  10. NNTP-Posting-Host: hugin.imat.com
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13.  
  14. I have nothing against whacko technical claims.  Indeed, some of my
  15. best friends make them -- and SFpcUG's general meetings are often 
  16. an outstanding place to encounter them.
  17.  
  18. However, it's nice to be able to figure out what's whacko, and what's
  19. not.  Some of the more salient ones we've been hearing at our meetings
  20. have concerned hard drive technology, and I've been distressed to hear
  21. them accepted by listeners without much apparent thought.
  22.  
  23. So, I thought I'd help out with some information on considerations
  24. that must be borne in mind, when evaluating claims about hard drives
  25. to determine if they make sense or not.
  26.  
  27. Your hard drive is an entire subsystem; its performance depends on the
  28. performance of _each_ of its components working in cooperation.  First,
  29. data must be physically read from the platters by the heads.  Thus,
  30. one constraint on disk speed is physical disk access.  Then, the data
  31. pass through the electronics on the hard drive.  So, the drive's
  32. data transfer rating is also a factor.
  33.  
  34. At that point, the data have passed out to the bus leading to the 
  35. drives' host adapter (IDE or SCSI), which has a rating for the bus
  36. transfer rate and data width.  Transfer rate is rated in megabytes
  37. per second, relative to an 1-byte-wide bus.  (If you use the same
  38. transfer or clock rate on a 2-byte-wide bus, you get double the
  39. effective transfer rate.)  Thus, this transfer rate is another
  40. relevant factor.
  41.  
  42. After passing through into the IDE or SCSI host adapter, the data
  43. pass over a bus (local, PCI, ISA, or whatever) to either the system
  44. RAM (Direct Memory Addressing = DMA mode) or the CPU (Programmed I/O
  45. = PIO mode).  The speed of this process is potentially a factor,
  46. as is the CPU burden imposed by PIO access.  Last, the software 
  47. driver controlling this process in the operating system is fast or 
  48. slow to some degree.  So, driver speed is another factor.
  49.  
  50.  
  51. OK, get the point of all this?  If one aspect of this process is
  52. already the bottleneck for the drive subsystem as a whole, then 
  53. doubling the speed of a _different_ element that's already faster
  54. than it _needs_ to be _doesn't improve performance_:  It was 
  55. _already_ waiting for the slower element; you've merely increased 
  56. its unusable extra capacity.
  57.  
  58. Examples:
  59.  
  60. We've been hearing whacko claims about both IDE and SCSI.  (1)
  61. We're told that EIDE (more properly, ATA-2) equipment is faster,
  62. because its new PIO-4 and DMA-2 modes both run at an impressive
  63. 16 megabytes per second transfer rate along the IDE bus.  (2)
  64. We're told that you can't get good performance on SCSI, without
  65. using a faster-than-customary transfer rate along the SCSI bus 
  66. and a wider-than-customary data path.
  67.  
  68. These claims' common thread is that they both focus on the
  69. data bus between the controller and the drive, as if that were
  70. the _only_ element in the drive subsystem whose performance
  71. mattered.  In other words, the assumption is that the drive-
  72. controller link (whose top speed is measured by the "transfer 
  73. rate" spec) is the bottleneck.  So, you as an intelligent
  74. reader need to ask yourself:  Is this a valid assumption?  For
  75. example, is _physical disk access_ the bottleneck, instead?
  76.  
  77. A disk's physical access speed is a little difficult to gauge,
  78. because the manufacturers don't really give you enough data to
  79. go by.  They tell you the drive's rotation speed (e.g., 5200 RPM) 
  80. and average seek time (e.g., 10 milliseconds).  Those are roughly
  81. the specs of Western Digital's new (and quite good) Caviar series
  82. 2.0/2.3GB ATA-2 drives.  I don't have the exact design details 
  83. handy, but let's assume that they have 16 heads (8 disk platters),
  84. and 63 512-byte sectors per track.  As the platters rotate once
  85. past the heads, they can pick up 63 x 512 x 16 = 516,096 bytes of 
  86. data (half a meg) without moving the heads (which is a much slower 
  87. operation).  This rotation takes 1/5200 second, so under ideal 
  88. conditions (contiguous data, readable without moving the heads), 
  89. data can be read at 516,096 x 5200 = about 2.5 GB/second.  That's 
  90. awfully fast.  
  91.  
  92. Unfortunately, in the real world, heads -=must be moved=-, to seek
  93. tracks elsewhere, other than where they happen to be.  This
  94. is where the "10 millisecond" figure comes in:  It's the amount 
  95. of time the manufacturer figures it will take for an average track-
  96. to-track journey, to find data located on cylinders further in or 
  97. further out.  Upon arrival, _then_ the heads can resume reading or 
  98. writing data.
  99.  
  100. Drives happen to spend a great deal of time seeking tracks, 
  101. because data just isn't to be found consecutively ordered, a lot of
  102. the time, especially when control structures such as File Allocation
  103. Tables are kept on the outer tracks, and actual data are kept any old
  104. where (even after defragmenting).  Memory buffers on the drives can
  105. help, but seldom exceed 128KB, or so (on ATA drives).  
  106.  
  107. Because this is a complex situation, there are no neat answers for
  108. how fast physical access will be for given hardware.  You have to
  109. put a drive on a fast interface, and simply measure the resulting 
  110. real-world data retrieval rate that emerges from the forest of 
  111. intangibles.  However, in the experience of many of us, there have
  112. simply been -=no=- IDE drives of any vintage that can physically read
  113. real-world data even as fast as 2 megabytes per second -- less 
  114. than 1/4 the speed of even the oldest (and slowest) IDE controllers 
  115. built to the original IDE (ATA) spec -- which ran at 8.3 megabytes 
  116. per second.
  117.  
  118. So, we have a situation where the 16MB/sec theoretical capacity of
  119. ATA-2 interfaces is easy to understand and widely promoted, but
  120. this capability is rendered meaningless by a limit in _another_ area
  121. that's more difficult to quantify and to comprehend, and is therefore
  122. often ignored.  (It should hardly be surprising to alert readers, 
  123. however, to discover that a _physical_ process limits the speed of
  124. a related purely _electronic_ one.)
  125.  
  126. When a drive is rated at 10 milliseconds average access time, the
  127. assumption is that there'll be no order to successive locations that must
  128. be visited -- that "random" seeks are involved.  Suppose you could
  129. arrange the next few dozen seeks, so as to minimise needed head travel,
  130. like a paper boy tossing newspapers in order of address, rather than
  131. visiting families alphabetically by last name (which would obviously
  132. take much longer)?  This is what SCSI drives do -- intelligent seeking,
  133. aka "command queuing".  In effect, this lowers average seek time 
  134. dramatically.  ATA drives do not do this, to their disadvantage.
  135.  
  136. Suppose you have more than one drive?  It'd be nice for them to 
  137. work simultaneously, right?  SCSI drives do this, because the SCSI
  138. bus was designed to handle it, and a feature called "SCSI disconnect"
  139. allows the host adapter to issue one drive a read/write order, and
  140. then trust it to carry out the task on its own ("disconnect" it),
  141. and start working with a second drive while the first's task is
  142. already underway.  ATA drives do not support disconnect -- again, 
  143. to their disadvantage.
  144.  
  145.  
  146. So, the claim about 16MB/sec transfers along the ATA-2 bus is
  147. looking pretty shaky:  Not only can you not find ATA-2 drives 
  148. capable of supplying more than a small fraction of that, at the
  149. physical access level, but also multiple drives on the same
  150. chain can't even double-up their contributions very well, because
  151. of the disconnect problem.  What about the claims about SCSI 
  152. needing to be double-wide and double-fast, before good throughput
  153. is possible?
  154.  
  155. Again, one needs to look at physical access issues:  With SCSI
  156. disconnect, at least the drives' contributions are pretty much
  157. fully additive.  However, again, the inherent slowness of the 
  158. inevitable seek cycles holds down real-world disk-access rates.
  159. Rotation speeds are about the same (usually 5400 to 7200 RPM,
  160. lately), and memory buffers are a little bigger (often 512KB),
  161. but not enough to make a huge difference.  Average seek claims
  162. are also better (8-10 ms, instead of 10-12 ms), but not greatly so.
  163. I would estimate that you'd be really lucky, as a result, to get
  164. real-world physical read rates as high as 3 - 5MB/second.
  165.  
  166. Why, then, are there new SCSI controllers and drives that support
  167. two-byte-wide cables, instead of the usual one-byte-wide ones, and
  168. some that do 20MB/second transfers along the SCSI bus, instead
  169. of the standard 10MB/sec?  (Standard values cited are those of SCSI-2.)
  170. The answer is that some situations -- typically on servers -- 
  171. call for "striping" data across multiple drives.  A design called
  172. "RAID-5" calls for using four hard drives on a single SCSI chain,
  173. with data spread across them in a manner designed to let the
  174. machine continue with all data intact, even if any one of the 
  175. four drives dies.  ("Mirroring" involves a similar effect, with
  176. pairs of drives holding redundant data.)
  177.  
  178. Because RAID-5 involves reading from all four drives at once, all
  179. four of them will be hitting the SCSI bus simultaneously with
  180. data, each as quickly as it can.  This is one of the rare cases
  181. where disk access might saturate the 10MB/second bandwidth of a
  182. standard SCSI-2 drive/controller combination.  In such cases,
  183. a wider data path and/or faster data transfer _is_ beneficial,
  184. as the SCSI bus _is_ the bottleneck.  However, -=you=- don't have
  185. a RAID array on your desktop machine, and neither do I.  (At
  186. least, if you do, I want you as a friend, so I can get your 
  187. throwaways.  ;->  )
  188.  
  189. So, where did these claims come from, about how great 16MB/sec ATA-2 
  190. transfer rates are, and how inadequate 10MB/sec SCSI-2 ones are?
  191. I suspect that someone was just reading spec sheets, and assuming
  192. that bigger means better, without bothering to consider whether
  193. he was comparing apples and oranges.
  194.  
  195. Think of it this way:  It's taken me 22 paragraphs to explain the
  196. subject properly, so you might see for yourself -- without taking 
  197. my word for it -- where the problem with that line of reasoning
  198. lies.  It's a great deal easier to just _parrot specifications_,
  199. and assume they tell the tale accurately.  I'm not surprised that
  200. this happens.  However, now you'll be forewarned, the next time
  201. you hear them repeated as gospel truth -- and perhaps will have 
  202. greater insight into the relevant issues.
  203.  
  204. -- 
  205. Cheers,                                     A post is just a post
  206. Rick Moen                                   My admin will deny.
  207. rick@hugin.imat.com                         The usual disclaimers apply
  208.                                             As news spools by.
  209.  
  210.