Saturday, August 1, 2009

Hard Drive Maximize!

One of the things that SageTV suggested during installation was storing its video files on a hard drive partition with a 64K block size. The block size is essentially the amount of data that is transferred between the hard drive and the memory in one I/O operation. The hard drive is formatted into individual blocks of the specified size and thus the size of files on the hard drive are all multiple of the block size. (No matter what Windows Explorer says a file's size is, the space that a file actually uses on the hard drive is a multiple of its block size.)

Having a large block size is good for speed. The CPU gives an instruction to the hard drive controller to start a transfer and can then ignore it until the transfer is complete. It can be an inefficient use of disk space, since a 4K file wastes 60K on a hard drive partition with a 64K block size. Fortunately, we're talking about files in the gigabyte size range, so the loss of a kilobytes at the end of a video file is not a big deal. A large block size also requires a lot of memory to buffer the block during the transfer. It's good thing we've got 4 gigabytes of memory!

You may recall when I installed Vista, I only formatted 100 GB of the hard drive for the operating system, because Judy had warned me that Sage would recommend having a 64K block size. However, I wanted to see this requirement for myself, just to make sure that 64K was the right number before I formatted the partition. (OK, OK, I forgot to format it in advance.) When I saw the recommendation during the installation, I could have just formatted the partition at that moment, but I was so use to XP that I expected that this would require a reboot and the drive letter of the optical drive would change, so I let Sage put the video files on the system drive for the moment. What I didn't realize is that Vista would let me assign any drive that I wanted, so I could have formatted the partition during the installation. Fortunately Sage would let me change the directory after installation.

What a lot of the non-techie types don't realize is that hard drives, for a long time, have had the ability to be "partitioned". That is sliced up into individual pieces and treated as separate hard drives. This is very useful if you want a computer to be able to run two operating systems, such as Windows and Linux. There was also a time when the size of hard drives were getting bigger than Windows could use. So partitioning them was a necessity to be able to use all of the space. However, we're going to use that ability here to let Vista have a partition with what it believes to be the optimum block size for it, and we're going to create a second partition with what SageTV believes is the optimum block size for video files.

To do this, follow these steps:

  1. Find the Computer icon, right click and then select Manage from the pop-up menu. Or you can open the Control Panel, open Administrative Tools, and then open Computer Management. (Your computer may be slightly different, as I've set my Vista desktop into Classic mode.)
  2. In Computer Management, in the left hand pane, expand Storage if necessary and select Disk Management.
  3. In the center bottom pane, locate the disk on which you want to create the new partition, right-click in the unallocated space rectangle that you want to create the new partition with, and select New Simple Volume... from the pop-up menu.
  4. In the Welcome page of the New Simple Volume Wizard, click Next.
  5. In the Specify Volume Size page, select the size of the new partition (which Vista is calling a Volume). The maximum is already entered in the field, and that's what I went with. Press Next.
  6. In the Assign Drive Letter or Path page, you can assign a drive letter to the partition, but I'm going to just say "No" to drive letters. I selected Mount in the following empty NTFS folder radio button and pressed the Browse button. Then I created a directory named C:\Volumes\Media, selected it and pressed the OK button. Then I pressed the Next button. (You, of course, may assign a drive letter, if you wish.)
  7. In the Format Partition page, select the Format this volume with the following settings radio button, if necessary. For Allocation unit size, select 64K from the drop down list and in Volume label, I entered Media. Make sure that the Perform a quick format check box is not checked and press the Next button.
  8. In the Completing the New Simple Volume Wizard page, press the Finish button.
  9. Go find something interesting to do, as the formatting going to take a while. I chose the complete format to allow the OS to find bad sectors on the disk. Better to find them now rather than later. On my system, it took a little over 2 hours to format almost 500 GB. Your mileage may vary.
  10. After the format was complete, I created a directory named C:\Volumes\Media\SageTV and then I created C:\Volumes\Media\SageTV\Videos.
  11. Bring up SageTV and open Setup.
  12. Open Detailed Setup.
  13. Locate Video Recording Directories and click the Modify button next to it.
  14. Click on Add New Directory.
  15. Click on Specify.
  16. Enter the name of your Media directory for SageTV on the new partition. For example C:\Volumes\Media\SageTV\Videos. Click the OK button.
  17. Click the Select Current button.
  18. SageTV will ask about the space rule for the directory. I took the defaults with a Disk Space Rule of Use All which requires a Disk Space Size of All Available Space. If you wish, you can also select Disk Space Rules of Use Only or Leave Free, which will allow you to put bounds on the amount of space used. For now, I'm going to let it have the entire disk. Click on Accept this Rule.
  19. Assuming that you've watched everything already recorded, select the current Video directory, C:\Program Files\SageTV\SageTV\Video. Click on Remove this Directory.
  20. Click on Continue.


The great thing about having a separate partition for the Videos is that, when you fill it up, the OS will still be able to operate. It's not a lot of fun to try and free up space on a hard drive when the operating system being non-responsive.

So, at this point, you might think that I'm just about done, but there are a few things still hanging out. I still haven't gotten the remote to work and when I tried to play a DVD, none of the programs could do it. They either didn't recognize the format of the DVD, or they complained that the video resolution was too big. So, I guess I'll tackle one of those two next.

No comments:

Post a Comment