View Single Post
  #2 (permalink)  
Old 01-23-2009, 12:50 PM
Rich A's Avatar
Rich A Rich A is offline
Registered User
 
Join Date: Aug 2003
Location: About 2 feet in front of the monitor. (otherwise CT)
Posts: 3,809
Re: Reading and .. warning long read

A lot of people don't realize exactly how a hard drive works. Today's SATA 7200 RPM drives are fast enough to be able to write (and/or) read several data streams at once. But the only reason they can do that is because they are FAST.
By the way, I just purchased a couple of those "green" drives myself. The way they work is that during times of no activity they slow down to 5400 rpm. When the activity starts up they also speed up (to 7200 RPM) Speed equates to power drawn and heat produced. So if you can slow down a drive speed when it isn't really doing much, you'll save on electricity and theoretically the drive won't be producing as much heat, therefore increasing it's reliability and longevity.

Here is how your typical drive works. This is just for an example.

Let's take a drive that has 4 platters. Each platter might be capable of storing say 20 GB. So the entire drive can hold 80 GB. And this drive has 4 read/write heads. One for each platter.

The thing that puts a damper on data throughput is the fact that all the heads move in unison. They are all controlled by the same motor. Soooo, if this drive has been in use for some time, the data you will be reading from it could exist across one, two, three, or even four of the platters. And because the controller has to move ALL the heads to read just the data on the any one given platter, it can't get the remaining data until the first accessed platter has been read. So let's say your data is spread across three different platters. And the order to read it is maybe Platter 2, then platter 3, then platter 4. So all the heads have to move at the same time to read data from the platter 2, then they all have to move to read next bunch of data from # 3. And so on. And of course with a file that is somewhat fragmented, the head(s) will have to move thousands if not hundreds of thousands time to fully read the complete file. While this sounds impossible, it is not .. up to a point. The speed those heads move and the rate that the data is read is VERY fast. So much so that the modern drive today can easily handle multiple files fragmented across both individual drives and across several different platters of that drive.
This is why it is best to split up the drive reading and writing duties among separate drives. Like putting your OS and programs on one drive and your show storage on another. You are splitting up the read/write requests to two separate drives, which means any activity on the OS drive will not impact the storage drive at all.

But even if you have a second dedicated hard drive for your storage, things can still be improved. If you have several data streams being written to that one drive you still are limited to the fact that the data may be spread out over several places on several platters and and those heads are going to be banging around at incredible numbers. There are several ways to reduce the pain and strain on the storage drive. One way is to set up more than one recording drive into a RAID 0 array. Let's take a 2-drive RAID 0 array for example. Data streams can now be read/written simultainiously between the two drives. That's because you are splitting up the "geometry" of the process. Sure all the heads on drive one still have to move in unison. But now you've got another drive with it's own set of heads that can read/write at the same time. So the RAID controller splits up the writing to the two separate drive. The result can be a 40 to 50 percent increase in through-put. Add a third drive and the through put becomes even higher. I've found with my tests that the best bang for your buck is a two-drive RAID. Although adding a third drive does make a difference the biggest jump in performance will be going from a single drive to a two drive RAID 0 array. Add a fourth drive and the change from the three drive array is even less noticeable.

Another reason to keep your recording drive separate from your OS drive is that you will have less problems with fragmentation. My own HTPC (with my current 2-drive RAID array) has only been defragmented once in the last 3 or so years. It's been running 24/7 for five years and six months by the way. About 4 years ago I upgraded the Raid drives to larger sizes. And for kicks I did a defrag about a year after that. And fragmentation before the defrag was was something like 2 or 3 percent. I check it often and it never goes much above that.

Why? Well since that drive is dedicated where nothing other than large video files are being stored. as they are written and removed, there are always very large segments available for the drive to write to. There are some very small BTV files for SmartSkip and other BTV maintenance that are also written there. But the bulk of the file are (at the smallest) about 1.5 GB in size. (a 1/2 hour analog show on my system). And what helps in my case is that I really don't leave shows on my recording drive and IF I want to archive them I either dump them to a removable drive or burn them to a DVD. A typical one hour HD show (If I remember correctly) is about 7 GB. And I always have (well almost always) a free continuous space at least double that size. So the file is usually spit in two and written in one pass across the two RAID drives. One tip is to keep your recording drive at least 25 to 30 percent empty. My calculations based on my available viewing time and the need to store the shows for perhaps a few days, ended up with my being able to work quite nicely with a pair of 250 GB SATA II drives in a RAID 0 array for storage. And I very seldom have more than 300 GB used at any given time.

Lastly, my on-going tests suggest that running say 2 each 250 gb drives in a RAID 0 as opposed to say one 500 GB drive will result in 1/2 the stress being put on each of the two RAID drives as opposed to one single drive. Don't forget that one 500 gb drive has to write all it's data in sequence using only one head at a time and that willl really be putting a load on the drive geometry. Whereas the dual drive system can actually put almost twice the data down in the save given amount of time .. dividing the writing between the two drives simultaneously as each drive has full use of it's own multiple head geometry.
Okay .. if you have stuck with me so far, you should understand now, how using multiple digital tuners writing a lot of data to one hard drive works. With only one drive all those tuners' data streams will have to be written sequentially by the multiple heads .. one head at a time. The reason you CAN do it, is just because these new modern hard drives are VERY fast.
There are arguments against and for using a Raid zero array and I won't go into that. The old (lame in my way of thinking) theory that you have twice as much chance to loose all your data if just one drive in the raid fails, is silly. You have not increased your chance of a drive failure by just adding a second drive. In fact in a RAID 0 array you actually reduce the stress imposed on both the drives by virtue of the data being split up and written to both of them. (the heads of each drive move far less than one drive with one set of heads)

Things that ARE a negative when dealing with a dual drive vs single are heat build up in the case, noise, and the extra amount of power needed to now run two instead of one drive. This is why my recording drives, DVD Burner, and removable hard drive are all housed in a separate case designed for maximum cooling etc.

Hope this helps explain things a little.
__________________
Rich A

BTV Beta Tester. 4.x.x
XP-PRO, Dual rack mount chassis. Gigabyte MA770-UD3 Nvidia 9500 video, 4 GB Ram, Athlon 64 x2 5600, 80 GB Op Sys/Program drive. 80 GB temp/swap file drive. 500 gb temp recording drive, 3 x 250 GB show storage drives. Samsung DVD burner. VGA video out to projector. TV-out to A/V whole house distribution. HDHR, PVR350, HVR1600, HVR1250, HVR-950, Harmony Remote.
Reply With Quote