----- posting has been reformatted to fit 80 columns ----- From: Bertel Schmitt Newsgroups: rec.video.desktop Subject: Facts and Myths of AV Tuning - Long Date: Mon, 27 May 1996 17:22:27 -0400 Drive Your Harddrive Harder. Facts and Myths of AV Tuning. By Bertel Schmitt. Harddrives have been blamed for just about any ill in the digital audio & video editing world. If frames drop or audio flakes out, the stock answer of any harried tech support person is "it must be your harddrive." Users on the other hand cant understand why they have just shelled out $$$ for a superfast HD that supposedly shovels 7 MB/sec, and all they can capture is 1.8 mb/sec (if they are wearing striped socks and the moon-phase is a zero crossing). The correct answer is a long one. It involves looking at all phases of the capture chain, at bus & CPU saturation, at PCI chipset designs, at bursting, at system stalls, even at memory access. Audio and video is a steady stream, but PCs are not configured to handle streams well. If anything goes wrong at any point of the capture chain, a data stall occurs and frames drop. Instead of looking at the big picture, blaming the poor harddrive became en vogue. The biggest buggabooh and whipping post is the dreaded thermal recalibration, tcal for short. If someone goes online and says "I captured for 10 seconds and my frames drop," you can be sure that someone answers: "You are the victim of the heinous thermal recalibration. Go out and buy yourself an AV disk." Some drive manufacturers quickly capitalized on this. "AV Drives" became the gold plated MonsterCables of the digital world. People happily pay $100 more for the same drive, as long as it has "AV" attached to the part number. In a world of eroding margins, "AV" and "thermal recalibration" became a god-sent to struggling drive manufacturers and system integrators. But do AV Drives really perform wonders as advertised? Have they slain the dreaded tcal? To cite Kris Kristofferson: "Its a walking contradiction, partly truth and partly fiction." First, off, some theory. What is thermal recalibration and why do people say such awful things about it? Run your harddrive for a while and touch it. Its hot. A change in temperature leads to expansion or contraction, in a harddrive, it changes the geometry of the platters. Modern harddrives reserve one dedicated servo surface. On startup, the drive reads the servo tracks. After extended usage or after an error condition, the drive recalibrates. Recalibration takes approximately 40ms per surface, depending on the size of your drive and the number of surfaces, a complete recalibration can take somewhere between 0.2 and 1 second. The bigger the drive, the longer the tcal. During the tcal, nothing is being read or written, so unless other precautions are being taken, the data stream is being interrupted. Until recently, improving the performance and capacity of the drive involved adding more platters and raising the rotational speed. Sadly, adding platters or raising the rotational speed means more heat. The main heat generator in a drive is friction between the platters and the air that surrounds them. More platters, more speed, more heat. That, for instance, was the reason why one never saw 9 Gig Seagate Elite or Micropolis 1991 - - for years the mainstay in AV editing circles - - with 7.200 rpm. They rotate at 5.400 rpm, because, as one engineer told me, "if the would spin any faster, theyd probably melt away." By the same token, the best way to keep your harddrive healthy, wealthy, wise and reasonable free of tcals is to blow a lot of air over it. I have a stack of five Barracuda 4s, one as the system drive, four as a striped set. Uncooled, you could cook with them. A 4" inch fan in front and back keeps them at a moderate temperature. The fans also lengthen their lifespan. The no tcal-drive. A common myth is that current technology AV drives do not recalibrate. Thats baloney, unless you are one of the lucky few who could lay their hands on a drive with embedded servo tracks and magnetoresistive (MR) read heads (MRH). This technology, pioneered by IBM in 1991 (who, as usual, didnt exploit it enough - have you heard much about AV drives by IBM?) is now going mainstream. In the second half of the year, Seagate, Fujitsu, HP et al will ship embedded servo MR drives in quantities, instantly obsoleting this article. MR drives will also increase the data density and hence the data thruput by 60% to 80%. At the same rotational speed of 7.200 rpm, one of these drives will deliver approx 12 MB/sec instead of the current 6.8 MB/sec. Thats why these drives will ship as wide or ultra SCSI drives. More on the matter on the WWW under http://www.seagate.com/new/newtop.shtml . Micropolis claims that their "hybrid servo system combines the best features of both dedicated and embedded servo system designs and completely eliminates the requirement for periodic T-Cal operations." More by pointing your web browser to http://www.microp.com/AVG.html. Micropolis has implemented this technology in their "Gold" series. Note that they are saying: "completely eliminates the requirement for periodic T-Cal operations." They dont say that they have ditched tcal altogether. In a pure embedded servo design, no recalibration is necessary at all. All tracks contain servo information and each head will be brought automatically to the correct position without any interruptions. The AV drive. As we have seen, current technology AV drives do have to tcal eventually. They just do it differently than regular drives. A regular drive does periodic maintenance, or it goes into tcal when it sees any (usually correctable) error requiring a re-read. AV-drives try to hide the recalibration. They perform maintenance while the drive is idle, they interrupt maintenance when the drive gets busy, or they do whats called a "posted tcal:" If a recalibration is scheduled and the drive is busy, the drive logic delays (or posts) the recalibration until an idle period is reached. This is the most important feature of AV drives. Its a feature thats shared by most modern high performance SCSI drives, AV or not. A stock ST15150, a.k.a. Seagate Barracuda 4, does posted tcal as a factory default, just like its more expensive brethren with the "AV" suffix. AV tuning. The grizzled backyard mechanic is used to tuning a car. A harddrive can be tuned within limits. Just like a car can (or, until computers took over, could) be tuned for power or economy. Dont expect too much from tuning (10% on a good day). And as with the car, power carries a price. First, a little background. SCSI drives are better and more powerful than their IDE brethren, because they have a little computer and some memory on the drive itself. The controller card writes data into the memory, issues a command to the on-drive computer and then goes about the rest of its business. The computer on the drive does the rest. The computer on the drive is programmable and it can be directed to change its attitude towards data. Thats done by setting variables or flags, which are stored in so-called "Mode Pages." One of the best known mode page setting is the Write Cache Flag. Most SCSI drives have an on-board cache which ranges from 256K up to 1 Meg and more. On some drives, this cache is strictly for reading data, on most newer drives, the cache can buffer reads and writes. Obviously, in a capture situation, a cached write is better, because the computer simply writes into the cache and doesnt have to wait for the drive to complete the write operation. Most drives are shipped with the write cache disabled. Thats because in normal life, more than 90% of all drive operations are reads and therefore the whole cache is dedicated to reads. Some drive manufacturters will also claim that disabling the write cache is safer in case of a power failure, but thats a Red Herring. A power failure during a file write is a ticket to disaster, itty-bitty write cache or not. There are several utilities floating around that allow the enabling of the write cache. One of the best and painless is the SCSI Explorer by Adaptec, which is part of their EZ-SCSI package. Free with their controllers. The rest of the AV tuning has been done by the harddrive manufacturers themselves or by "Speed Shops", a.k.a. harddrive integrators. Their basic strategies are: + Turn off error correction. Error correction takes time. + Don’t let the drive remap bad block. Remapping takes time. + Dont let the drive retry reads or writes. If it doesnt get it the first time around, dont try again. Its just wasting time. + Setup the drive with one large cache segment instead of several. + Adjust the prefetch values, so that the drive prefetches as much as possible. Most AV data are contiguous and a prefetch will most likely succeed. + Optimize the buffer full and buffer empty ratios. As you can see, half of the "secret tuning recipe" sacrifices speed for data integrity. The theory behind it is that a flipped bit in a video stream will have much less impact on your well-being than a flipped bit in accounting data. Thats why "hot" AV drives should only be used for AV, not as a system drive. But even as an AV drive, fiddling with error correction can be an invitation to disaster. If a bit is flipped in video or audio data, you will hardly hear or see it. But if its flipped in a file pointer, the whole file could be burnt toast. Do-It-Yourself AV Tuning The tuning of AV drives used to be a specialized chore for professionals. With reason, because one wrong setting in a mode page can send the whole drive to the scrap pile. Peripheral Test Instruments in Lakewood, CO, has put out Dr. SCSI, a fairly safe application (unless you perform unguided brain surgery in your drives mode pages - which you can), that performs AV tuning with a mouse click. The program is available for DOS, Windows and NT and it costs less than the premium of one AV drive alone. Information can be obtained via 303-763-7488 info@scsitools.com or http:// scsitools.com . The manual comes complete with in-depth SCSI theory and ample warnings for the unwashed. Highly recommended. Special Cases. Hot rodders have their secret settings (or, since the electronic ignition, the "Hot ROM"). Drive tuners have their secret lists. The following settings have been obtained from the Truevision site. Untested by the author. Use at your own risk. Dr. SCSI will be glad to perform the corrective surgery for you. Mode Select Pages Seagate Hard Drive Parameters Page 0: Drive Unique Parameters = DUA OFF Page 1: Read/Write ErrorRecovery, Read Retry @ 3, Write Retry @ 3 Page 2: Disconnect/Reconnect: Buffer Full @ 32, Buffer Empty @ 192, Data Xfer=O Page 3 Defaults Page 4 Defaults Page 7 Verify Error Recovery: PER= On, EER= Off, Verify Retry Count @ 3 Page 8 Caching Parameters: Discontinuity= On, Write Cache = On, Min Prefetch @ 0, Max Prefetch @ 256, FSW = ON, Number of Cache Segments = 1 All other at Defaults Quantum Atlas Hard Drive Parameters: Page 0: Drive Unique parameters = DUA = OFF Page 1: AWRE=Off, ARRE=Off, TB=Off, EEC=ON, PER= Off, Read Retry @ 3 Page 2: Disconnect-Reconnect = Buffer Full @ 30, Buffer Empty @ 190 Page 8: Cache Parameters = CAP OFF, WCE ON, RCD OFF, Minimum Prefetch @ 0, Maximum Prefetch 509, All Others @ Defaults Conner Hard Drive Parameters Page 0: Drive Unique Parameters = DUA= OFF Page 1: Read/Write Error/Recovery All Default except: Read Retry @ 2, Write Retry @ 2 Page 2: Disconnect/Reconnect: = Buffer Full @ 12, Buffer Empty @128 Page 8 Caching Parameters: WCE ON, Cache Segments @ 1, DISC ON, RCD OFF, All other at Defaults Micropolis Hard Drive Parameters Page 0: Drive Unique Parameters = Default Page 1: Read/Write Error/Recovery = Default except: Read Retry @ 14, Write Retry @ 15, Page 2: Disconnect/Reconnect Buffer Full @ 32, Buffer Empty @ 224, Bus Inactivity Limit = 5 Page 3: Defaults Page 4: Defaults Page 7: Verify Error Recovery: = Defaults Except Verify Retry @3 Page 8: Caching: = Defaults - Write Caches Enabled=ON All other at Defaults ----- end of original posting -----