Michael Maardt: PC since 1984 • on the net since 1990.

Get the most out of your PC The hard disk

Many factors influence the speed at which data can be moved from the hard disk to the CPU for processing. Let's look at some of them.

The files on the hard disk are arranged in a certain way and in a certain order. If we imagine the hard disk as a circular plate with its reading head placed in the middle, we can compare it to a gramophone record. The files start in the middle, one after the other in a long spiral chain, like the music in one long groove.

Imagine that the reading head is the record player's pick-up ' placed in the middle. When the head is asked to read a file, it looks in a table, the File Allocation Table, where it finds the file's physical location on the disk. The head then moves outwards a bit and turns the disk until it comes to the beginning of the file.

But there is a big difference between a gramophone record and a hard disk: files on your hard disk come and go. They get deleted every once in a while, and new ones are created.

Imagine that you have placed 100 files on your hard disk without having deleted any. The 100 files are placed nicely one after the other. Now you delete three files with these sizes: the first 50 KB, the second 100 KB and the third 80 KB. That leaves three available and unequal spaces on the disk.

Then you save or copy a file. If the file is larger than 230 KB, DOS will place the first 50 KB on the first empty space, the second 100 KB on the second space, the next 80 KB on the third space and the last part of the file will be placed after all the others. The file has been divided or fragmented.

Next time the file is to be used/read, the reading head has to go on a long trip around the hard disk, and that takes time. I have purposely simplified something here: in reality the hard disk is spinning constantly; this is necessary to attain the speed at which the hard disk is read. Floppy-disk drives don't spin until they are told to do so.

You have probably worked out by now that files that are nearest to the center of the disk and are contiguous are read fastest. The most important thing is that they are contiguous, i.e. they are in one piece. Where they are on the disk is less important (though the longer the seek time, the more important it is). In the next section, we will look at a program that can tidy up the data on a hard disk, joining together the file fragments for faster reading.

The time it takes for the reading head to access the beginning of any file is called the "average seek time" or access time. At present, the most popular hard disks on the market have an average seek time of 10-15 milliseconds. Trade advertisements usually give only this specification about a hard disk ' as if it were the only thing that indicates the quality. It is important but other factors such as a disk cache (software- or hardware-based) are more important. PC Magazine uses a test that gives a hard disk's "throughput," an average for data transfer that takes many factors into account.

Windows programs work with much larger amounts of data than was usual a few years ago.

Let's have a look at something you can do to get your PC to run faster. You can make the files contiguous and place the ones you use most as close as possible to the physical center (the logical "start") of the hard disk as possible ' and now we shall look at a program that can do this.

Disk optimization

Many programs on the market optimize or defragment the hard disk. DOS 5 does not include one. DOS 6 comes with a reduced version of SPEEDISK.EXE, which it calls DEFRAG. The one I'll be discussing here is the SPEEDISK.EXE version 6.0 from Norton Utilities (a collection of various "housekeeping" programs not traditionally included with DOS).

I wrote this section when I had a hard disk with a seek time of 18ms. Now hard disks have seek times in the region of 10ms or less. Disk optimization has a greater effect the slower your hard disk is.

No matter which disk-optimization program you use, make a backup of all your important files before you start using the program. I have never had problems with SPEEDISK but things can go wrong. A power outage in the middle of your optimization process could be a disaster ...

I recommend that you do not have a disk cache active. If you have one in one of your startup files, put it temporarily out of action by writing REM in front of the line that loads it, and reboot. Microsoft does not recommend this for SMARTDRV. However, I've "forgotten" to put SMARTDRV out of action a couple of times ' with no detrimental effect. But better to be safe than sorry.

1. You must be at "DOS level," i.e. straight after a boot with no programs running. If you use DOS 6, you can press F5 while the message STARTING MS-DOS is displayed, and then you can be sure that no disk cache is active.

2. Another, and more important, point is to check drive C (or the drive you want to optimize) with Chkdsk/F, which should repair any faults. If you want to check a compressed drive (DblSpace, Stacker or SuperStore), these usually have their own check program that replaces DOS's Chkdsk. If you have DOS 6.2, scandisk will start. If you are using DBLSPACE, use defrag.

The most important thing an optimization program does is to bring together the fragments of each file, i.e. every file will physically be in one long run. If you've never used such a program before, you will probably be very (positively) surprised by the improvement it gives you.

If you don't feel like experimenting with the order of directories and files and so on at first, just satisfy yourself with an optimization that brings files together in one whole piece. With SPEEDISK, this is called "Unfragment files only."

You can adjust the program by stipulating a variety of parameters. For instance, you can decide the sorting sequence of your directories, and within each directory, you can choose to sort files by all or any of the following criteria: name, extension, size and time, in either ascending or descending order. Or you can simply choose "merely" to optimize the files that are fragmented, and nothing else.

It is certainly best to plan before you start, which is something you can do more easily after you have had a little experience with the program. You will also find that it is only after you have worked with your PC for a while that you can derive most benefit from a disk-optimizsation program. But when that time comes, you will be able to work out which programs you use most, and which directories contain these programs' files.

Next, you need to know which programs read and write to the hard disk the most. If you are not sure, try listening to the hard disk while you are working with different programs. Windows and most Windows programs use the hard disk intensively.

My experience is that word processors, even word processors running under Windows, don't read and write to the hard disk so much. I haven't worked much with spreadsheets but big ones are certainly active users of your hard disk, and databases put even more demands on it. Programs that work a lot with graphics are demanding.

You will have to assess the importance of different, though related, factors: e.g. how often you use the program and how disk-active it is. I place the directories for the most disk-active programs first if I use them regularly and fairly often, and move the rest according to the tasks they perform.

Let's look at SPEEDISK ver. 6. There's no need to be nervous, you don't have to begin optimizing yet. We're just looking at the possibilities. If you have a mouse, activate it. You start the program by typing SPEEDISK at the DOS prompt. The first thing you will be asked is which drive you want to optimize, which will usually be C. The program checks the directory structure, and examines how fragmented the disk is. If relatively few files are fragmented, it will suggest that you simply optimize these files. You must not press Enter ' if you do, then press Esc and answer Cancel. You can always stop an optimization by pressing Esc.

Go ahead and choose configure, using the right-hand arrow and enter, or click with the mouse. The program shows the disk, divided up into small sections. You can see, by referring to the explanation elsewhere on the screen, which sections are used and which are empty. Crosses are files that may not be moved (immovable files) such as DOS system files or perhaps a Windows permanent swap file ' described in the section Windows. SPEEDISK does not move these files.

Only the most important options are explained here. The most important choice is the method that SPEEDISK uses. Under Optimize choose the option Optim. Method. Using the keyboard, move round with the arrow keys, and mark or remove a checkmark with the space bar.

Full optimizes all files but doesn't rearrange the order of files and directories. Full with File reorder is the one I use myself. This places files in the order chosen using Directory Order under Configure (described below). Unfragment Files Only is the quickest way to get contiguous files.

Go to Configure and choose Directory Order. It is a little difficult to use your keyboard here. On the left is your directory structure. On the right is the order you have asked speedisk to place your directories on the hard disk, if this option is available with the method chosen.

If you choose the method Full with File reorder, the directories that are in Directory Order are moved to the "front" of the disk.

The Tab key moves between windows, and the arrow keys move the marker. Note that you can mark a directory on the right and then change its priority. Enter works differently, depending totally on what you are doing. This is confusing at first, so it is easier if you use the mouse. Experiment a little to find out how to list the directories you have chosen.

Choose Save Options to save what you have chosen. By choosing File Sort you can choose how files in every directory should be sorted. If you have a lot of files in one or more directories, or if they are very large, this can be a significant point; otherwise it is of less importance than the order of directories. On the other hand, there are some more important possibilities under Other Options. I recommend that you choose Read after Write, which means that the program checks that data has been moved intact. If you do not use this, then the optimization process goes much faster, but you risk ending up with the occasional corrupted file, which means you will have to reinstall the program it belongs to. Save this option by using Save Options.

On a PC from 1991, a full optimization of a 90 MB hard disk can easily take a couple of hours. When you have finished optimizing, it can be interesting to see where individual files are located on the disk. You can do this by using Walk Map on the Info menu. Again, here is a situation where it is good to be able to use the mouse.

If you save new files just after a disk has been fully optimized, they will be placed last on the disk. This might not be what you want, so here is a little tip. The idea is to copy a file to one or more directories in which you later want "holes" (empty space) after you have run speedisk. These directories should be placed at the start of the disk, i.e. near its center.

Let's say that you normally store your data in C:\DOC. Create C:\EXTRA if you don't have it already. Copy a big file, a half or a whole MB, to this directory. Name or rename the file A.A ' for example. Before running a full optimization with speedisk, copy this file to C:\DOC. Now run speedisk and afterwards delete C:\DOC\A.A. Now you have free space in C:\DOC. This place, at the "beginning" of the disk, is where the next file you save will be placed. Of course, you can do this with many directories where you keep data files. Here is a batch file that does this:

XCOPY C:\EXTRA\A.A C:\DOC

SPEEDISK

DEL C:\DOC\A.A

DEFRAG, which is included with DOS 6.0, can only use conventional memory and lacks the following options:

Directory Order, Full with File reorder, Other Options and even Read after write ' Microsoft obviously trusts the program's integrity.

DEFRAG is not satisfactory for advanced use but even so, it is much better than no optimization at all. It has an undocumented switch

C:\>DEFRAG/Q

where the Q stands for Quick ' and it is very quick. Using this method collects all the files in one long row without optimizing every single file, of course. It makes available a block of contiguous space, which can, for instance, be used by a Windows swap file (see p. *). The H/ switch allows defrag to move hidden files.

Facebook Twitter Google LinkedIn Emailemail to friend

You are on michaelmaardt.com • © Michael Maardt 21. Jul. 2018