5.974 bytes

Service Hints & Tips

Document ID: YAST-3G6TNX

Aptiva/IBM IntelliStation/IBM PC - Using DEFRAG

Applicable to: United States

DOS, Windows, and other operating systems perform many operations on the files on a hard drive, including reading, writing, erasing, and manipulating them. After some period of time, these file operations can cause gaps of free space between the files on the physical drive. Normal system operations will not cause these gaps to be reused for some time, but this is normally not a need for concern.

At some point, however, it may be necessary to optimize the way that files are stored on the hard drive to reduce the number or sizes of the gaps that normal operations are unable to resolve. This is the purpose of the DEFRAG utility program.

DEFRAG provides two basic means for optimizing the space used by the files on a hard drive:

1. A file-only optimization
2. A full optimization

When DEFRAG begins execution, it will first examine all files in all directories to determine the number and size of the gaps between files as well as whether files might need to be moved or rewritten for the best efficiency and use of disk space. DEFRAG then calculates a percentage that represents the amount of unfragmented space on the drive and recommends the type of optimization that should be done.

The percentage that DEFRAG calculates determines the recommended action. If the percentage is 93% or greater, a file-only optimization is recommended. Otherwise, a full optimization is recommended.

The file-only optimization causes each file to be checked to see that all parts of the file are in contiguous locations on the drive, making it easier and faster for the file to be read when needed. If necessary, the file will be moved to a different physical area of the drive where there is enough free space to put all parts of the file in a contiguous area.

During a file-only optimization, no attempt is made to reduce the size and number of all the gaps between files, though DEFRAG may move some files into those free areas when it can. It is generally not necessary to fill in these gaps by moving files unless there are a large number of such gaps.

When DEFRAG determines that a better space utilization might be obtained by a full optimization, this course of action will be the recommended method. A full optimization consists of rearranging files on the drive in such a way that there are no gaps between files, as well as keeping all parts of each file in contiguous storage locations on the drive.

Optimizing a drive does not free up any space on the drive. Rather, it organizes the way that files are stored on the drive for the most efficient use of space and file access.

Optimizing a drive will also not cause any file data to be changed or deleted. The file is first copied to a new area and then removed from its original location. The file tables are then updated so that the operating system knows the new location when the file is needed.

Power outages or premature termination of the DEFRAG program might cause the file tables to be inaccurate on rare occasions, but the manner in which the DEFRAG program was designed should prevent most of these problems from occurring.

One final caution about DEFRAG: Never run DEFRAG while Windows is active or while any communications program is active in the system. Always exit Windows and go to the DOS prompt before running DEFRAG, or shut down the communications program and return to the DOS prompt to run DEFRAG. When Windows or any application is active, it may have one or more files still in use. Since DEFRAG will cause files to be moved, this can affect the files that Windows or the application are already using, resulting in later problems and a considerable amount of time to correct them.

Search Keywords

Hint Category

DOS/Windows 3.x

Date Created

15-04-97

Last Updated

22-01-99

Revision Date

13-01-2000

Brand

IBM Aptiva, IBM IntelliStation, IBM PC

Product Family

Aptiva, PS/1, M Pro, Z Pro, E Pro, PC 100, PC 140, PC 300GL, PC 300XL, PC 300PL, PC 330, PC 340, PC 350, PC 360, PC 365, PC 730, PC 750

Machine Type

2144, 2168, 2011, 2121, 2123, 2133, 2155, 6888, 6889, 6898, 6899, 6893, 6271, 6281, 6260, 6272, 6275, 6282, 6285, 6284, 6561, 6591, 6588, 6562, 6592, 6862, 6892, 6571, 6573, 6575, 6576, 6577, 6560, 6581, 6583, 6585, 6586, 6587, 6598, 6589, 6875, 6876, 6877, 6885, 6886, 6887

Model

various

TypeModel

Retain Tip (if applicable)

Reverse Doclinks
and Admin Purposes