
Disk Hog
--------

Have you ever wondered which program is the biggest disk hog
on your system? Maybe it's that great new Windows application
or the latest multimedia game that came on 20 floppies.

If you have a large disk that has only a single partition, you
may be surprised to find out that DOS itself may be the biggest
disk hog.

I wrote Disk Hog to illustrate where all of your disk space is
actually going. It may be a useful tool to help you minimize the
impact of DOS's disk allocation scheme.


Disclaimer
----------

I wrote Disk Hog purely for informational purposes. Although
I tried to make the disk space calculations accurate, I make no
guarantee that the numbers calculated by Disk Hog are 100%
accurate. In particular, this program was not tested with any
disk compression programs (i.e. Stacker, etc.) so I have no idea
if the numbers are accurate when using these programs.


Usage Terms
-----------

Disk Hog is distributed as Freeware. For personal use, there is no
charge. Commercial, governmental and other organizational users should
contact the author for licensing details.

No distribution fee in excess of media cost may be charged for this program.

If you find this program useful, send me some email to let me know.


Copyright Notice
----------------

Copyright 1995, Stephen Miller.

All rights reserved. This program is protected by copyright law.
Unauthorized use, duplication or distribution of this program, or any
part of it, may result in civil and criminal penalties and will be
prosecuted to the full extent of the law.


How to Contact Author
---------------------

Support for this program is provided on a "If I Have Time" basis. If
you do find a problem, or you need to contact me for other reasons,
I can be reached via the Internet at the address:

    skmiller@otto.ultranet.com


Revision History
----------------

    1.1

        Improved overall appearance.
        Start up with directory set to top directory on current disk.

    1.0

        First version considered complete. Never released.


Installation
------------

To install this program, simply copy the files into a directory of
your choosing. This program requires VBRUN300.DLL.


Uninstalling the Program
------------------------

To uninstall this program, delete the following files:

	DISKHOG.EXE
	DISKHOG.TXT
	README.TXT
	DISKHOG.INI	(in the Windows directory)


Background Information
----------------------

When DOS allocates space on your disk, it allocates as many fixed-sized
blocks as your file requires. These fixed-sized blocks are called Clusters
or Allocation Units. If a file does not fit exactly into the number of
clusters allocated for the file, then there is wasted space. To help
illustrate this, I will use an example.

Example:

	A file requires 100K bytes. The Cluster Size is 32K.

	This file would require 4 clusters to be allocated. Since
	the file does not totally fill the last cluster. The amount
	of space wasted would be:

		Wasted = (4 * 32K) - 100K = 28K


The cluster size varies depending on the size of your disk partition. The
most accurate way to determine the cluster size is to run the CHKDSK
command and check the size of the Allocation Unit. The following table
lists some common Cluster Sizes:

	   Disk Size	|    Cluster Size (bytes)
	----------------+-------------------------
	   0 - 7.9   Mb	|	2048
	   8 - 15.9  Mb	|	4096
	  16 - 31.9  Mb	|	8192
	  32 - 127.9 Mb	|	2048
	 128 - 255.9 Mb	|	4096
	 256 - 511.9 Mb	|	8192
	 512 - 999.9 Mb	|      16384
	   1 - 2 Gb	|      32768

Every file on your disk most likely wastes space. With bigger disk
partitions, this waste becomes significant.


How To Use Disk Hog
-------------------

When Disk Hog is started, it begins scanning Drive C to calculate the
amount of space wasted on the disk. After the disk has been scanned,
the information gathered is displayed in a bar chart. The bars represent
the relative portion of disk space used by the file. There is a bar for
the total space used, the actual size of the file and the amount of space
wasted. As you click on different directories and files, the bar chart
is updated.

Disk Hog maintains two different cluster sizes - the actual and the working.
The working cluster size is useful for determining the effect of moving
files to another disk with a different cluster size. To change between
viewing the actual and working cluster information, use the toggle button
in the lower right portion of the main window.

The actual and working cluster sizes may be changed using the "Cluster Size"
pull down menu. When you change either cluster size, the disk is rescanned
using the new sizes.

While the disk is being scanned, you can perform any of the following actions
to interrupt and restart the scan:

	Select a new disk
	Change the actual cluster size
	Change the working cluster size


How to Improve the Situation
----------------------------

If you find some particularly wasteful directories, there are a few things
you can do. First, you may be able to move the offending directories to
another disk with a smaller cluster size. Another option is to archive files
which aren't used very much.

A more drastic option is to repartition your disk. If you use the DOS FDISK
command to do this, all of your files will be lost. Therefore, you need to
do a full backup before using FDISK followed by a full restore once the disk
is repartioned. Although there are utilities which can make this less
painful, only a fool would perform such a task without having a good backup.

The final option for solving the problem is to change operating systems.
Operating systems like OS/2 and Linux have file systems which are less
wasteful than DOS. I personally don't use either one of these, however,
they are options for a lot of people.


DISKHOG.INI
-----------

Disk Hog maintains a .INI file in the Windows directory. This file contains
the actual and working cluster sizes for all of the disks in your system.
This file is written whenever you exit the program.

When you first start using Disk Hog, you must set up your cluster sizes
in order to get accurate results.


Example DISKHOG.INI
-------------------

[Actual]
a= 512
c= 32768
d= 4096
e= 4096
f= 32768

[Working]
a= 512
c= 4096
d= 4096
e= 4096
f= 32768


