home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / bsd / 8565 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  17.4 KB

  1. Xref: sparky comp.unix.bsd:8565 comp.benchmarks:1622 comp.arch:10504 comp.arch.storage:750
  2. Path: sparky!uunet!spool.mu.edu!olivea!sgigate!odin!sgi!igor!jbass
  3. From: jbass@igor.tamri.com (John Bass)
  4. Newsgroups: comp.unix.bsd,comp.benchmarks,comp.arch,comp.arch.storage
  5. Subject: Disk performance issues, was IDE vs SCSI-2 using iozone
  6. Message-ID: <1992Nov7.102940.12338@igor.tamri.com>
  7. Date: 7 Nov 92 10:29:40 GMT
  8. Sender: jbass@dmsd.com
  9. Organization: DMS Design
  10. Lines: 317
  11.  
  12. Copyright 1992, DMS Design, all rights reserved.
  13.  
  14. There should be something to learn or debate in this posting for everyone!
  15.  
  16. (Most of what follows is from a talk I gave this summer at SCO Forum,
  17. and have been for several years been trying to pound into systems designers &
  18. integrators everywhere. Many thanks to doug@sco.com for letting/paying me to
  19. learn so much about PC UNIX systems over the last 3 years and give the
  20. interesting IDE vs SCSI SCO Forum presentation. Too bad the politics
  21. prevented me from using it to vastly improve their filesystem and disk i/o.)
  22.  
  23. There are a number of significant issues in comparing IDE vs SCSI-2, to
  24. avoid comparing apples to space ships -- this topic is loaded with traps.
  25.  
  26. I am not a new kid on the block ... been around/in the computer biz since '68,
  27. UNIX since '75, SASI/SCSI from the dark days including design of several
  28. SCSI hostadapters (The 3 day MAC hack published in DDJ, a WD1000
  29. emulating SCSI hostadapter for a proprietary bus, and a single board computer
  30. design). I understand UNIX/Disk systems performance better than most.
  31.  
  32. For years people have generally claimed SCSI to be faster than ESDI/IDE
  33. for all the wrong reasons ... this was mostly due to the fact that
  34. SCSI drives implemented lookahead caching of a reasonable length before
  35. caching appeared in WD1003 interface compatable controllers (MFM, RLL, ESDI,
  36. IDE). Today, nearly all have lookahead caching. Properly done, ESDI/IDE
  37. should be slightly faster than an equivalent SCSI implementation. This
  38. means hostadapters & drives of equivalent technology.
  39.  
  40. PC Architecture and I/O subsystem architecture issues are the real answer
  41. to this question ... it is not only a drive technology issue.
  42.  
  43.  
  44.  
  45.  
  46. First, dumb IDE adapters are WD1003-WHA interface compatible, which means:
  47.  
  48.     1) the transfer between memory and controller/drive are done in
  49.     software .... IE tight IN16/WRITE16 or READ16/OUT16 loop. The
  50.     IN and OUT instructions run a 286-6mhz bus speeds on all ISA
  51.     machines 286 to 486 ... time invariant ... about 900us per 16bits.
  52.     This will be refered to as Programmed I/O, or PIO.
  53.  
  54.     2) the controller interrupts once per 512 sector, and the driver
  55.     must transfer the sector. On drives much faster than 10mbit/sec
  56.     the processor is completely saturated during diskio interrupts
  57.     and no concurrent user processing takes place. This is fine for
  58.     DOS, but causes severe performance problems for all multitasking OS's.
  59.     (Poor man's disconnect/reconnect, allows multiple concurrent drives).
  60.  
  61.     3) The DMA chips on the motherboard are much slower, since they
  62.     lose additional bus cycles to request/release the bus, which is
  63.     why WD/IDE boards are PIO.
  64.  
  65.     4) Since data transfers hog the processor, the os/application are
  66.     not able to keep up the disk data rate, and WILL LOOSE REVS
  67.     (miss interleave).
  68.  
  69.     5) for sequential disk reads with lookahead caching, the
  70.     system is completely CPU bound for drives above 10mbit/sec.
  71.     All writes, and reads without lookahead caching lose one
  72.     rev per request, unless a very large low level interleave
  73.     is present. 1:1 is ALMOST ALWAYS the best performing interleave,
  74.     even taking this into account, due to multiple sector requests
  75.     at the filesystem and paging interfaces.
  76.  
  77. There will be strong a market for high performance IDE hostadapters
  78. in the future, for UNIX, NOVEL, OS/2 and NT ... which are NOT PIO via
  79. IN/OUT instructions. Both ISA memory mapped and Bus Mastering IDE
  80. host adapters should appear soon .... some vendors are even building
  81. RAID IDE hostadapters. I hope this article gets enough press to make
  82. endusers/vars aware enough to start asking for the RIGHT technology.
  83. While the ISA bus used like this is a little slow, it is fast enough
  84. to handle the same transfer rates and number of drives as SCSI. With
  85. a smart IDE drive ... we could also implement DEC RPO5 style rotational
  86. position sensing to improve disk queue scheduling ... worth another
  87. 15%-30% in performance.
  88.  
  89. Local bus IDE may prove one solution.
  90.  
  91.  
  92.  
  93.  
  94. Secondly, SCSI hostadapters for the PC come in a wide variety of flavors:
  95.  
  96.     1) (Almost) Fast Bus Mastering (ok, 3rd Party DMA) like the
  97.     Adaptec 1542 and WD7000 series controllers. These are generally
  98.     expensive compared to dumb IDE, but allow full host CPU concurrency
  99.     with the disk data transfers (486 and cached 386 designs more so
  100.     than simple 386 designs).
  101.  
  102.     2) Dumb (or smart) PIO hostadapters like the ST01 which are
  103.     very cheap, and are CPU hogs with poor performance just like IDE,
  104.     for all the same reasons, plus a few. These are common with
  105.     cheap CD-ROM and Scanner scsi adapters.
  106.  
  107. What the market really needs are some CHEAP but very dumb IDE and SCSI
  108. adapters that are only a bus to bus interface with a fast Bus Mastering
  109. DMA for each drive. In theory these would be a medium sized gate array
  110. for IDE, plus a 53C?? for SCSI and cost about $40 IDE, and $60 SCSI. For
  111. 486 systems they would blow the sockets off even the fastest adapters built
  112. today since the 486 has faster CPU resources to follow SCSI protocol -- more
  113. so than what we find on the fast adapters, and certainly faster than the
  114. crawlingly slow 8085/Z80 adapters. With such IDE would be both faster and
  115. cheaper than SCSI -- maybe we would see more IDE tapes and CD ROMS. Certainly
  116. the products firmware development would be shorter than any SCSI-II effort.
  117.  
  118. All IDE and SCSI drives have a microprocessor which oversees the bus and
  119. drive operation. Generally this is a VERY SLOW 8 bit micro ... 8048, Z80,
  120. or 8085 core/class CPU. The IDE bus protocol is MUCH simpler than SCSI-2,
  121. which allows IDE drives to be more responsive. Some BIG/FAST/EXPENSIVE
  122. SCSI drives are starting to use 16 micro's to get the performance up.
  123.  
  124. First generation SCSI drives often had 6-10ms of command overhead in the
  125. drive ... limiting performance to two or three commands per revolution,
  126. which had better be multiple sectors to get any reasonable performance.
  127. SCO's AFS uses 8-16k clusters for this reason, ditto for berkeley fs.
  128.  
  129. The fastest drives today still have command overhead times of near/over 1ms
  130. (partly command decode, the rest at status/msg_out/disconnect/select sequence).
  131. Most are still in the 2-5 range.
  132.  
  133. What was fine in microcontrollers for SASI/SCSI-I ... is impossibly
  134. slow with the increased firmware requirements for a conforming SCSI-II!
  135.  
  136. High performance hostadapters on the ESIA and MC platforms are appearing
  137. that have fast 16 bit micros ... and the current prices reflect not only
  138. the performance .... but reduced volumes as well.
  139.  
  140. The Adaptec 1542 and WD 7000 hostadapters also use very slow microprocessors
  141. (8085 and Z80 respectively) and also suffer from command overhead problems.
  142. For this reason the Adaptec 1542 introduced queuing multiple requests inside
  143. the hostadapter, to minimize delays between requests that left the drive idle.
  144. For single process disk accesses ... this works just fine ... for multiple
  145. processes, the disk queue sorting breaks down and generates terrible seeking
  146. and a performance reduction of about 60%, unless very special disk sort and
  147. queuing steps are taken. Specifically, this means that steps should be taken
  148. to allow the process associated with the current request to lock the heads
  149. on track during successive io completions and filesystem read ahead operations
  150. to make use of the data in the lookahead cache. IE ... keep other processes
  151. requests out of the hostadapter!  Allowing other regions requests into the
  152. queue flushes the lookahead cache when the sequential stream is broken.
  153.  
  154. Lookahead caches are very good things ... but fragile ... the filesystem,
  155. disksort, and driver must all attempt to preserve locality long enough to
  156. allow them to work. This is a major problem for many UNIX systems ... DOS
  157. is usally easy .... single process, mostly reads. Other than the several
  158. extent based filesystems (SGI) ... the balance of the UNIX filesystems
  159. fail to maintain locality during allocation of blocks in a file ... some
  160. like the BSD filesystem and SCO's AFS manage short runs ... but not good
  161. enough.  Log structured filesystems without extensive cache memory suffer
  162. and late binding suffer the same problem.
  163.  
  164. Some controllers are attempting to partition the cache to minimize lookahead
  165. cache flushing ... for a small number of active disk processes/regions.  For
  166. DOS this is ideal, handles the multiple read/write case as well.  With UNIX at
  167. some point the number of active regions will exceed the number of cache
  168. partitions, the resulting cache flushing creates a step discontinuity in
  169. thruput, a reduction with severe hysterisis induced performance problems.
  170.  
  171. There are several disk related step discontinuity/hysterisis problems that
  172. cause unstable performance walls or limits in most unix systems, even today.
  173. Poor filesystem designs, partitioning strategies, paging strategies are
  174. at the top of my list, which prevent current systems from linearly degrading
  175. with load ... nearly every vendor has done one or more stupid things to
  176. create limiting walls in the performance curve due to a step discontinuity
  177. with a large hysterisis function.
  178.  
  179. Too much development, without the oversight of a skilled systems architect.
  180.  
  181.  
  182.  
  183.  
  184. One final note on caching hostadapters ... the filesystem should make better
  185. use of any memory devoted to caching, compared with ANY hostadapter. Unless
  186. there is some unreasonable restriction, the OS should yield better
  187. performance with the additional buffer cache space than the adapter.
  188. What flows in/out of the OS buffer cache generally is completely redundant
  189. if cached in the hostadapter. If the hostadapter shows gains by using
  190. some statistical caching ... vs the fifo cache in UNIX, then the
  191. UNIX cache should be able to get better gains by incorporating the
  192. same statistical cache in addition to the fifo cache. (If you are running
  193. a BINARY DISTRIBUTION and can not modify the OS, then if the hostadapter
  194. cache shows a win ... you are stuck and have no choice except to use it.)
  195.  
  196. Systems vendors should look at caching adapters performance results and
  197. reflect wining caching strategies back into the OS for even bigger
  198. improvements. There should never be a viable UNIX caching controller
  199. market ... DOS needs all the help it can get.
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207. Now for a few interesting closing notes ...
  208.  
  209. Even the fastest 486 PC UNIX systems are filesystem CPU bound to between
  210. 500KB and 2.5MB/sec ... drive subsystems faster than this are largely
  211. useless (a waste of money) ... especially most RAID designs. Doing
  212. page flipping (not bcopy) to put the stuff into user space can improve
  213. things if aligned properly inside well behaved applications.
  214.  
  215. The single most critical issue for 486 PC UNIX applications under X/Motif is
  216. disk performance -- both filesystem and paging.  Today's systems are only
  217. getting about 10% of the available or required disk bandwidth to provide
  218. acceptable performance for anything other than trival applications. The
  219. current UNIX filesystem designs and paging algorithms are a hopeless bottle
  220. neck for even uni-processor designs ... MP designs REQUIRE much better if
  221. they are going to support multiple Xterm session using significant X/Motif
  222. applications like FrameMaker or Island Write. RAID performance gains are
  223. not enough to makeup for the poor filesystem/paging algorithms. With the
  224. current filesystem/paging bottleneck, neither MP or Xterms are cost
  225. effective technologies.
  226.  
  227. For small systems the berkeley 4.2BSD and Sprite LSF filesystems both fail
  228. to maintain head locality ... and as a result overwork the head positioner
  229. resulting in lower performance and early drive failure. With the student
  230. facility model a large number of users with small quotas consume the entire
  231. disk and to the filesystem present a largely ramdom access pattern. With such
  232. a model there is no penalty for spreading files evenly across cylinder groups
  233. or cyclicly across the drive ... in fact it helps minimize excessive long worst
  234. case seeks at deep queue lengths and results in linear degradation without
  235. step discontinuities.
  236.  
  237. Workstations and medium sized development systems/servers have little if any
  238. queue depth and locality/Sequential allocation of data within a file is
  239. ABSOLUTELY CRITICAL to filesystem AND exec/paging performance.  Compaction of
  240. referenced disk area by migration of frequently accessed files to cylinder and
  241. rotationally optimal locations is also ABSOLUTELY necessary, by order of
  242. reference (directories in search paths, include files, x/motif font and
  243. resource files) to get control of response times for huge applications.  With
  244. this model, less than 5% of the disk is reference in any day, and less than
  245. 10% in any week ... 85% has reference times greater than 30 days, if ever.
  246. Any partitioning of the disk is absolutely WRONG ... paging should occur
  247. inside active filesystems to maintain locality of reference (no seeking).
  248. For zoned recorded drives the active region should be the outside tracks,
  249. highest transfer rates and performance ... ditto for fixed frequency drives,
  250. but for highest reliability due to lowest bit density. This is counter the
  251. center of the disk theory ... which is generally wrong for other reasons
  252. as well (when files are sorted by probablity of access and age).
  253.  
  254. In fact the filesystem should span multiple spindles with replication of
  255. critical/high use files across multiple drives, cylinder locations, and
  256. rotational positions -- for both performance and redundancy. Late binding
  257. of buffer data to disk addresses (preferably long after close) allows not only
  258. best fit allocation, but choice of least loaded drive queue as well, at the
  259. time of queuing the request ... not long before.  Mirroring, stripping,
  260. and most forms of RAID are poor ways to gain lesser redundancy and load
  261. balancing.  Dynamic migration to & retrieval from a jukebox optical disk
  262. or tape backing store both solves the backup problem as well as transparent
  263. recovery across media/drive failures. Strict write ordering and checkpointing
  264. should make FSCK obsolete on restarts ... just a tool for handling media
  265. failures and OS corruptions.
  266.  
  267. I spent the last 2-1/2 years trying to get SCO accept a contract to
  268. increase filesystem/paging performance by 300%-600% using the above ideas
  269. plus a few, but failed due to NIH, lack of marketing support for performance
  270. enhancements, and some confusion/concern over lack of portability of such
  271. development to the next generation OS platform (ACE/OSF/SVR4/???). I even
  272. proposed doing the development on XENIX without any SCO investment, just a
  273. royalty position if the product was marketable -- marketing didn't want to have
  274. possible XENIX performance enhancements outshine ODT performance efforts,
  275. which if I even got close to my goals would be TINY in comparison. Focused
  276. on POSIX, X/Motif, networked ODT desktops -- they seem to have lost sight
  277. of a small lowcost minimalist character based platform for point of sale
  278. and traditional terminal based var's. I know character based app's are the
  279. stone age ... but xterms just aren't cheap yet.
  280.  
  281.  
  282.  
  283.  
  284. Shrink wrapped OS's mean fewer Systems Programmer development jobs!
  285.  
  286. With the success of SCO on PC platforms, there are only three viable
  287. UNIX teams left ... USL/UNIVEL, SunSoft, and SCO. The remaining vendors
  288. have to few shipments and tight margins, they are unable to fund any
  289. significant development effort outside simply porting and maintaining
  290. a relatively stock USL product -- unless subsidized by hardware sales
  291. (hp, apple, ibm, everex, ncr .... etc). A big change from 10 years
  292. ago, when a strong UNIX team was a key part of every systems vendors success.
  293.  
  294. With the emerging USL Destiny and Microsoft NT battle, price for a
  295. minimalist UNIX application platform will be EVERYTHING, to offset
  296. the DOS/Windows camp's compatability and market lead in desktops. UNIX's
  297. continued existence outside a few niche markets lies largely in USL's
  298. ability to expand distribution channels for Destiny without destroying
  299. SCO, SUN, and other traditional unix suppliers ... failure to do so will
  300. give the press even more amunition that "UNIX is dead".
  301.  
  302. It may require that USL's royalties be reduced to the point that UNIVEL,
  303. SCO & SUN can profitably re-sell Destiny in the face of an all out price
  304. war with Microsoft NT.  A tough problem for USL in both distribution channel
  305. strategy and revenue capture ... Microsoft has direct retail presence (1 or 2
  306. levels of distribution vs 2, 3 or 4) which improves it's margins significantly
  307. over USL (and ability to cut cost). SCO and SunSoft are going to see per unit
  308. profits tumble 50% to 80% without a corresponding increase in sales in the
  309. near term -- many ENDUSERS/VAR's buying the current bundled products can get
  310. along quite well with the minimalist Destiny product -- as an applications
  311. platform. Developers (a much smaller market) will continue buying the
  312. whole bundle.
  313.  
  314.  
  315.  
  316.  
  317. Microsoft is VERY large & profitable, sadly USL, SCO & SUN only wish to be.
  318. It might be time to think about building NT experience and freeware clones.
  319. I hope our UNIVERSITY's can focus on training NT Systems jocks, there's going
  320. to be more than enough UNIX guys for quite some time .... even if USL pulls it
  321. off and only loses 60% of the market to NT.
  322.  
  323. Fortunely for the hardware guys, designs efforts will be up for NT optimized
  324. high performance 486 & RISC systems! and everybody is going to go crazy for
  325. a while.
  326.  
  327. John Bass, Sr. Engineer, DMS Design                  (415) 615-6706
  328. UNIX Consultant             Development, Porting, Performance by Design
  329.