The magazine of the Melbourne PC User Group
The More Heads The Better
Karol Doktor |
|
|
Karol Doktor discusses hard disk drive issues that are relevant to heavy disk
user applications such as video editing or DVD authoring. |
The picture presented here is an idealistic configuration that may not be
practical for many users unless they have just inherited a small fortune from
their rich uncle. Every time you deviate from the ideal solution you sacrifice a
certain amount of performance for economical gains. I'll try to quantify the
performance loss so that you can make an informed decision about whether this
loss is worth your monetary savings. It is a technical article and certain basic
understanding of computers is expected from the reader.
Modern disks are reasonably large, fast spinning and inexpensive. In terms of
price per Megabyte (or Gigabyte these days) we have never had it better. At
present you can expect to pay about A$165 for a 200GB SATA (Serial ATA) drive
with small relative increases for smaller and larger drives.
What Is the Problem?
The problem is that a hard drive is a mechanical device. As such, it is orders
of magnitude slower than electronic processes.
As an example, in the 9 milliseconds that takes to move a drive head from track
to track:
- sound will travel three metres
- light will travel 2700 kilometres
- a modern PC will execute 9 million instructions
During video editing or DVD authoring your computer will read, process and store
a large volume of data. The time to access this data will depend on how many
times the drive head has to move and how far it will have to travel. This time
is reduced if the drive head needs to access only one file. Therefore, for
optimum speed, your input, temporary and output files should be on separate
physical drives.
On my computer, it takes 2:07 minutes to copy 4GB file from drive C: to drive D:
but it takes 8:43 min to copy (not move) the same file from drive C: to a
different area of drive C:. The process of splitting an interleaved video file
to separate video and audio streams, combining your separate titles and menus to
VOB files to produce a DVD, etc. will finish much quicker if input and output
files are on different drives.
Ideal Solution
Ideally, you would want to have a separate drive for each of the following:
- Operating system
- Program files
- Personal data files
- Swap file and other temporary files
Three separate audio/visual drives.
This may or may not be a practical solution for you. To begin with, many
motherboards will support only four drives. To support more drives you need
additional disk controllers on a separate card. Then, there is a question of
cost. I've yet to meet a person with unlimited budget (they may exist, but not
in my circle of friends). You also may need a full tower case to accommodate
your drives and a bigger power supply.
In practice, four drives may give you good balance between cost and performance.
These would be allocated as follows:
- Operating System/Program files
- Personal data/Swap files
- Two audio/visual drives.
If you consider this excessive then go to the beginning and start reading again.
Partitions and RAID
Each drive can be partitioned, ie. split into two or more logical drives
(volumes). I will partition the first two drives and traditionally label their
volumes as System, Programs, Data and Swap; the label indicating a volume's
intended use. Partitioning simplifies backups as each of the volumes is saved
with its own frequency but this also introduces inefficiency and fragmentation.
So, in general, unless you are a purist, do not partition your drives. Problems
with partitioning can be illustrated as follows: if your OS/Programs drive is
only 1/3 full then all your files would be located at the front part of the
drive. If you partition the drive into two volumes and put the OS and programs
separately, then all files are now allocated in two distinct and distant
clusters. Consequently, the heads will have to travel over many more tracks when
accessing your applications and device drivers.
There are several modes of configuring RAID (Redundant Array of Independent
Disks). One mode that used to be popular (RAID 0 - Stripping) involves two
identical drives used in parallel to double the transfer rate. This should be
avoided as it effectively halves the number of heads because now two heads
always travel in unison. Modern drives are fast enough to sustain transfer rates
demanded by normal video processing. The only exception might be real-time
processing of uncompressed video where each stream carries over 32 MB/s.
Backup
You do backup your files, don't you? I do too. Personal data should be backed up
regularly (monthly or weekly or even daily if you earn a living that way). The
Operating System and Programs volumes should be backed up before every major
program installation or system upgrade. Temporary and audio/visual files are
never backed up. Having several drives gives you other flexibility. eg.
immediately after recording a voiceover track you can copy it to another drive.
Not only does this give you a chance to recover from a catastrophic drive
failure but also enables you to recover from (much more frequent) edits that
went wrong.
Disk Cache
Cache is an Operating System feature that assigns part of the Random Access
Memory (RAM) as a buffer to hold
data going to or from disk. Every disk request
is then checked to determine whether or not it can be satisfied from the buffer,
which is much quicker than getting data from the disk. It is a useful feature
for spreadsheets and databases but entirely useless for video editing where a
massive amount of data is transferred every second. In fact, it may be to your
advantage to reduce the amount of memory assigned for cache and free it for
video. This can be achieved by editing the system.ini file on older versions of
Windows but is limited under XP. Note: this is an advanced feature and is beyond
the scope of this article.
Fragmentation
With any luck you won't have to deal with this problem. It occurs when a drive
suffers from heavy allocation and deletion and is filled close to capacity. What
happens is that under these conditions files may get scattered all over the disk
as there may not be a single area large enough to hold the file. If you have
separate drives for just about everything then there is no occasion for
fragmentation. On your OS/Programs drive, files are only ever added but never
deleted; your personal data files are occasionally updated but who cares. Your
main activity is concentrated on audio/visual drives but these should be empty
(and can be wiped clean) every time you finish a project!
Tips
- Use two smaller drives for OS/Programs and Data/Swap, larger drives for
audio/visual files.
- Move the My Documents folder from the middle of the Operating System drive to
your Personal data drive (right mouse click My
Documents shortcut, select Properties and then select the Move button).
- Create a "TEMP" subdirectory on your Swap drive, then select
Control Panel|System|Advanced| Environment Variables and edit the "TEMP" and "TMP"
variables to point to the subdirectory just created.
- Move the OS swap file to your Swap drive. Select Control Panel|
System|Advanced|Performance Settings|Advanced|Virtual Memory Change and create a
custom swap file on your Swap drive.
- Store all your personal data within My Documents folder. This includes all your
Premiere, MyDVD, etc. project files (but not data files, these should go on
audio/visual drives).
- Save your project before any long duration operation, eg, rendering or burning a
DVD.
- Save your project files every 30 minutes under a different name. I use a
two-digit number as the last two characters of the name and increment it with
every save.
- Configure your video editing and DVD creation utilities to put all work files on
your Swap drive.
About the Author
Karol Doktor, a Melb PC member for many years enjoys 40 years of computer
experience including about 20 years with PCs. He has a degree in electronics but
most of his professional work was in software including operating system
development, communication software development, compiler & interpreter
development, database design, banking & insurance systems design and PC based
systems development.
Reprinted from the May 2005 issue of PC Update, the magazine of Melbourne PC User Group, Australia
|