shomes CHIP-Now!s[ CHIP-Yesterday! ]s CHIP-Tomorrow!s The FORUMs News sCareers
sDr. CHIPs Get.Aways Magazines Corporates Searchs Jokess Products
CHIP-Yesterday!
  AUGUST-1998 Software - Smart at Home
 
Finetune your hard disk

Your microprocessor could be a screamer but your PC could turn out to be a wimp if your hard disk is not up to the mark

Have you ever wondered why your `hot' 233 MHz Pentium II PC is outrun by your friend's supposedly sedate 200 MHz Pentium MMX? Why is it that your PC seems to have slowed with time? Or that hard disk space seems to be disappearing even though you have not installed a single new program or created new files?

If you have not figured it out yet, all things being equal, the probable culprit of all your woes is your hard disk. Like your car, your hard disk too needs to be tuned to deliver optimum performance. Though most PCs shipped today - especially branded ones - are generally tuned for performance by the manufacturer or the dealer, there is always room for a bit of tweaking. Further, as time passes and you keep on adding and deleting programs and files, your desktop PC speed gradually degrades as it takes longer time to access data from your hard disk.

Shape up your files

One of the simplest, safest and the most effective ways to speed up performance is to `defragment' your hard disk on a regular basis. This is because Windows (and DOS) comprise data and program files that are broken into smaller pieces and stored all over the hard disk (See How FAT works). Thus, when the hard disk's read-write head reads a file that is composed of multiple fragments (fragmented), it has to travel to different areas of the hard disk at the same time to read each fragment of the file. Over a period of time, as fragmentation increases, the excessive drive head movement slows file access.

Hard disk speed can be restored by recombining all the fragmented files into continuous individual files. This process of recombining fragmented files is called `defragmenting.' You can defragment your hard disk using the Disk Defragmenter utility that Microsoft provides with Windows 9x operating systems or third party utilities like Speedisk in Norton Utilities.

Defragmenting utilities can even reduce the load time for large applications. They do this by exploiting a characteristic common to all hard disks where data residing in the inner tracks of the hard disk can be accessed faster than those in the outer tracks. You can configure these utilities to place your favourite program files in the inner tracks before other files while defragmenting. Some specialised utilities like Intel's Application Launch Accelerator work in the background, tracking programs that are most frequently used by you. The next time you defragment your hard disk, these programs then move your frequently used programs to the inner tracks improving its load time. For those who have swallowed the Windows 98 razz-ma-tazz, the good news is that Microsoft has integrated the Application Launch Accelerator technology into the Windows 98 Disk Defragmenter.

Clearing leftovers

OK, OK so now your hard disk really flies. But are you still wondering why your hard disk is eating up free space? And all this without you having installed any large applications?

If you are an Internet junkie and are experiencing this disk space disappearance act, chances are that you are most probably using Internet Explorer to browse the Web. Most Web browsers create a cache where they store all the Web sites they have visited. So the next time you visit a site, if the Web page has not changed, it is loaded from the cache rather than downloaded from the Internet. Though this speeds up browsing it consumes disk space.

This is where Internet Explorer differs from other Web browsers. While most browsers like Communicator and Opera earmark cache size in terms of kilobytes, Internet Explorer earmarks a percentage of the hard disk size as cache. Take the example of a 2 GB hard disk. While most browsers might take up 5,120 KB of disk space as cache, Internet Explorer with the cache set at two percent will consume 40,960 KB or 40 MB. Furthermore, unlike other browsers, Internet Explorers also supports ActiveX components which are automatically downloaded, saved and run on your PC adding to the clutter on your hard disk.

So if you are an Internet Explorer fan, the fastest way to save and recover disk space is to minimise the cache size and clear it on a periodic basis. ActiveX components are a little messy. You will have to manually delete the ActiveX and Java files from the Downloaded Program Files directory in the C:\Windows directory.

Another area where you could possibly save space is the temporary (.TMP) file. Most Windows applications and Windows itself create temporary files which they use as a scratch paper. These are generally deleted once you close the application. However, sometimes this does not happen. Especially when the application is abnormally terminated or Windows crashes. Over a period of time, accumulation of these temporary files can consume a substantial amount of space. To clear these, the safest method is to restart your system in the DOS mode and go to the C:\Windows\Temp directory. Temporary files have a .TMP extension and sometimes an extensions beginning with the $ sign. Delete these manually and you have recovered your disk space.

Finally, do not forget to empty the Recycle Bin. You can modify the size of the Recycle Bin by right clicking on it selecting the Properties option in the menu.

Some good news for Windows 98 users. Microsoft has included a Disk Cleanup utility in the System Tools Accessories for cleaning up your system of temporary, cached Web pages, Recycle Bin and ActiveX components.

Squeezing the last byte

To get the most of your hard disk free space, the first things you should do is to optimise the cluster size of (See How FAT works) your hard disk. Especially if you are using older operating systems like DOS/ Windows 3.x or earlier versions of Windows 95 which use FAT16 file systems. Sometimes even the newer versions of Windows 95 and Windows 98 are configured to use FAT16 rather than the more efficient FAT32 file system.

An entry-level hard disk has a capacity of at least 2 GB, while the file allocation table or FAT stores data on the hard disk with the smallest cluster size as 32 KB. Thus, all files that are saved on the hard disk are stored in 32 KB fragments _ even if they are 4 KB in size. If you have a large number of files, this adds up a considerable amount of space wastage. To cut out this waste, you have to cut down your hard disks into smaller `logical' hard disks or partition it.

In order to do so, you can use FDISK that comes with DOS and Windows, or disk utilities like PartitionMagic. As the Cluster size table shows, smaller the partition size, smaller the cluster size and more efficient the utilisation of disk space.

Alternatively, you can also switch over to FAT32 which can support smaller cluster size with large capacity hard disks. To do so, your operating system will need to support the file system. In the case of Windows 95, while the earlier version of Windows 95 only supported FAT16, versions after OEM Service Release 2.0 (OSR 2) support both FAT16 and FAT32. You will need a utility like PartitionMagic to convert FAT16 to FAT32 as the OSR 2 software patch does not come with one.

Here again Windows 98 users have an upper hand as it sports Drive Converter (FAT32) utility which can convert FAT16 to the FAT32 file system.

Booting BIOS for speed

Caution: Do not try this unless you are comfortable playing around with your system's BIOS.

As a final effort to squeeze the last ounce of performance out of your hard disk, you can always try tweaking your PC's BIOS. To bring up the BIOS setup press the Del key when the system is booting and select the Integrated peripherals option. You can start by selecting and enabling the IDE HDD block mode option which allows for the transfer of multiple blocks of data where each block of data is 512 bytes in size. This transfer of multiple blocks reduces system overheads as the CPU can fetch multiple blocks in a single call.

You can further speed up your system by selecting and tweaking the IDE PIO mode option. This option allows you to change the data transfer rate between the hard disk and the rest of the system. There are five mode values which range between 0 to 4 and allow for a transfer rate of 3.3, 5.2, 8.3, 11.1 and 16.6 Mbps respectively. Generally an Auto option is also available which automatically configures the mode option for you. It is best if you select this option to let the system configure itself.

As mentioned before, it is advisable not to fiddle with your BIOS settings unless you are comfortable with it or you want to take a risk.

But then isn't life dull without a bit of adventure?

TechTalk-How FAT works

Due to the mass popularity of DOS and Windows, the most common file system used to organise and store data on a hard disk is the File Allocation Table or FAT.

On a hard disk, data is stored in concentric areas called tracks which is divided into areas called sectors. FAT, however, does not address each individual sector as a storage unit. Rather it addresses a cluster as the unit storage area which is made up of two or more sectors. As its name suggests, FAT is a table which contains an entry for each and every cluster on the hard disk. Each cluster entry contains information as to whether it is occupied by a file or not with an entry of 0 indicating it is free and can be written in. If the file does not fit into one cluster, the file's starting cluster entry has a link entry to the next FAT entry which contains the succeeding part of the file and so on.

As of now there are two flavours of FAT, a 16-bit one called FAT16 and a 32-bit one called FAT32. Of the two, FAT16 can address up to 216 or 65,536 clusters while FAT32 can address 232 or 4,294,967,296 clusters. The reason why multiple sectors make up a cluster is because the number of sectors on a high capacity hard disk simply outstrip the number of unique entries that can be addressed by FAT. A one-GB hard disk, for example, is made up of 2,097,152 sectors. FAT16, which was the de facto standard until last year, on the other hand can only address 65,536 unique entries. Thus, to be able to address a one-GB hard disk, four sectors are combined together to form a single cluster (2,097,152/ 65,536 = 32). As each sector is 512 bytes in size, a single cluster works out to 16 KB. As FAT32 can address 4,294,967,296 unique entries it can address large hard disk much more effectively.

The problem with both FAT16 and FAT32 is that in order to save on system overheads it saves files in any `free' cluster which is not necessarily continuous. This leads to file fragmentation which, over a period of time slows disk access.

Glossary

BIOS: Short for Basic Input/ Output System, BIOS is a set of essential software routines that test the system on startup and then load the operating system. It also supports the transfer of data among the hardware devices and is stored in Read Only Memory (ROM) chips in the computer.

Cache: A special area, either in memory or in the hard disk, which is used to store frequently used data so that it can be accessed quickly.

Cluster: A cluster is the unit storage division of a hard disk. A cluster is typically made up of two to 64 sectors each of which can store 512 bytes of data.

FAT: Short for File Allocation Table, FAT is the file system used by DOS and Windows to organise and store data on the hard disk.

IDE: Short for Integrated Device Electronics, IDE is the most common disk drive interface used in desktop PCs to connect and control devices like hard disks, floppy disk drives and CD-ROM drives.

Partition: A logically distinct area of memory or hard disk that functions as though it were a separate physical unit.

PIO: Short for Processor Input/ Output, PIO is a method by which data is transferred to and from IDE drives. In PIO, the hard disk  relies on the microprocessor to manage data transfer tasks. In PIO, data is transferred in 512 byte blocks.

Tune tools

Disktective 2.2
Disktective 2.2 is a freeware utility that allows you to find out which files are eating up your hard disk space, by showing you the distribution of the occupied space. It can calculate the actual size of a directory or disk including the sum of individual bytes in each file or subdirectory while taking into account the cluster size of the disk.

Partition Manager
A disk partition utility similar to Powerquest's PartitionMagic. Like most disk partition utilities, it works in the DOS mode to avoid conflicts that might arise due to the operating system's multitasking feature. A drawback of the utility is that it cannot convert a FAT16 to FAT32 file system.

CVT.EXE
A FAT16 to FAT32 file system converter freeware for those who are using Windows 95 OSR 2.0 and above. The funny part is that no one knows who has written this utility. Some claim it to be the work of Microsoft programmers.

DiskState 1.13
DiskState reports on the current state of your hard disk—how much is used and free and displays it as a 3D pie chart. This versatile program can also eliminate space-wasting temporary files and track down duplicate files even if they have different names. DiskState also works with other file systems like NTFS and CDFS.