Lund Performance Solutions

Getting Started
Before running De-Frag/X, we recommend running the Hewlett-Packard provided utility, FSCHECK.MPEXL.TELESUP, both before and after performing any of the data-intrusive commands. This program will analyze and report the status of the file system and any problems associated with file labels, etc.

To run this program, do the following:
  • EXIT
  • Be sure that you are not running De-Frag/X when you execute this program.

    NOTE You may get a misleading error message if FSCHECK runs at the same time as De-Frag/X. FSCHECK will also incorrectly report errors on any open files.

    Running De-Frag/X

    To run the De-Frag/X program, enter the following:

    NOTE When using any of the data-intrusive De-Frag/X commands described later in this manual (i.e., CONDENSE, MAKEROOM, DEFRAGMENT, FRAGMENT, CLONEDISK, and TRIM), you will need to be logged on with system manager (SM) capability.


    The first step in using De-Frag/X is to analyze the current nature and level of fragmentation on your system. To do this, use the MAP, ANALYZE, ZOOM and DISPLAYEXTENTS commands.
    The MAP command gives a graphic representation of the nature of disk-level fragmentation on your system. Figure 4.1 shows the output of a MAP ALL command on an 18-drive system.

    Figure 4.1 MAP ALL Command Output
    As you can see, the MAP ALL command creates a visual picture of the fragmentation of all the disk drives on your system. This helps to give you an idea of the level of disk fragmentation on a global, system-wide basis. Each character in the display represents a "chunk" of disk space. The chunk size represents 2% of the disk drive and therefore varies based on the size of the disk drive for which it is reported. For example, on a 571 megabyte disk drive, a chunk is equal to approximately 11.4 megabytes. On a 670 megabyte disk drive, a chunk is approximately 13.4 megabytes.

    NOTE The word "chunk" is used here for purposes specific to the De-Frag/X product and has no technical meaning or merit outside of a discussion about De-Frag/X. "Chunk" is not a standard HP e3000 term and thus will not be familiar to people outside of this context

    The character used to label each chunk identifies the predominant nature of that disk space. The following list shows all the MAP label characters and their significance.

    Displayed if there is any unmovable file present in the chunk. This preempts all other designations.
    Displayed if there are any ldev-specific (i.e., specified for a given drive) files. This pre- empts all other designations except "X."
    Displayed if the entire chunk contains permanent files.
    Displayed if the entire chunk contains temporary (transient) files.

    The following three designations are displayed only when none of the above apply:

    Displayed if the chunk contains mostly permanent files.
    Displayed if the chunk contains mostly temporary files.
    Displayed if predominantly free space.

    NOTE Any MAP commands run before CONDENSE or ANALYZE will not display the "x" or "X" types.

    Examining Figure 4.1, the system displayed appears to be only mildly fragmented. However, a closer examination may be more revealing. To look deeper, a MAP <ldev> command can be used. Figure 4.2 below shows a MAP 15 command issued on ldev 15.

    Figure 4.2 MAP <ldev> Command Output

    NOTE While the MAP ALL command is limited to representing chunks of disk space no smaller than 11.4 megabytes (i.e., 2% of the disk drive), the MAP 15 command showed 1.5 megabytes for each chunk (0.12%).

    As you can see with Figure 4.2, the disk drive is more fragmented than it would appear solely based on the MAP ALL display for that disk drive. You can go one level deeper via the ZOOM command and see what each chunk contains.
    Up to this point we have performed only disk-level analysis. For the sake of discussion, let's assume that we have determined that the fragmentation level on ldev 15 is at an unacceptable level. We know only that the disk drive itself is not at its greatest efficiency. We do not as yet know whether the files on that device are fragmented.
    There are two commands used to measure the level of individual file fragmentation: ANALYZE and DISPLAYEXTENTS. The ANALYZE command provides a listing of files, on a system-wide basis or on a drive-by-drive basis, which are fragmented beyond a desired user-defined percentage.

    Figure 4.3 ANALYZE Command Output (partial)
    The DISPLAYEXTENTS command (abbreviated as "DE") allows you to see the fragmentation and extent allocation of individual files. Figure 4.4 contains a sample partial DISPLAYEXTENTS output.

    Figure 4.4 DISPLAYEXTENTS Command Output

    Disk Condensing

    Let's now assume that you have completed the analysis phase and have determined to perform some maintenance against ldev 15, as well as to some files resident on that device. Now you need to make a decision: do you address the disk-level fragmentation or the file-level fragmentation first?

    In a perfect world, it would be desirable to perform file-level defragmentation before performing disk-level defragmentation. This would insure that individual files are as contiguous as possible. Performing disk-level defragmentation first will consolidate the scattered chunks of free space on the drive, but won't necessarily consolidate scattered chunks of the same file together.

    In some situations, however, there could be a need to perform disk-level defragmentation first. For example, you may have to perform a disk condense in order to have enough room for efficient defragmentation of a particular file. The variables surrounding the answer to this question are:
  • The amount of free space available.
  • The size of the disk file you wish to defragment.
  • The nature of the disk file you wish to defragment.
  • For example, one of the rules regarding individual file defragmenting is that the file cannot be more than half the size of the disk drive on which it resides. This is because it is a current requirement of De-Frag/X that any file that is to be defragmented must remain on the same disk drive. For ease of discussion, and to more quickly introduce you to the global capabilities of De- Frag/X, we will begin by addressing file-level defragmentation.

    File-level Defragmentation

    Before you attempt to perform the CONDENSE command against all selected disk drives, you need to consider the issue of file-level fragmentation. Once again, the ANALYZE command is used to evaluate file-level fragmentation. Once you have identified the files which are fragmented beyond acceptability, you can perform DEFRAGMENT commands against each selected file. Remember, this is an intrusive operation and should be preceded by a backup of the affected files. Figure 4.5 shows sample output of a DEFRAGMENT command performed against the file illustrated in the DISPLAYEXTENTS command in Figure 4.4.

    Figure 4.5 DEFRAGMENT Command Output
    Figure 4.6 shows the output of a DISPLAYEXTENTS command performed against the DEFRAGMENT'ed file.

    Figure 4.6 DISPLAYEXTENTS Command Output
    The DEFRAGMENT'ed file is now a single extent. This should guarantee optimal I/O performance against that file, provided that the file is accessed serially.
    De-Frag/X includes two other commands, TRIM and FRAGMENT, that function on the file level to perform data intrusive functions. The TRIM command causes unused disk space after the EOF marker on a desired file or fileset to be released. When performed system wide this can recover a large amount of free space. We recommend using the TRIM command in conjunction with the CONDENSE command to free up disk space on systems where free space is a concern. By doing a TRIM @.@.@ NOTRIM you will find out how much space will be returned by the system without actually invoking the data intrusive TRIM command.
    The FRAGMENT command is the reciprocal of the DEFRAGMENT command. It "intelligently" fragments (i.e., spreads out) a desired file over multiple drives in order to more equally distribute disk I/O for that file.

    Disk-level Defragmentation

    The command used to perform disk-level defragmentation is the CONDENSE command. You can perform the CONDENSE command on a disk-by-disk basis (i.e.,CONDENSE <ldev>) or on a system-wide basis (i.e., CONDENSE ALL). Keep in mind that except for the DEFRAGMENT, up to this point you have performed only non-intrusive activities. While De-Frag/X can perform its work without a backup and with users on the system, you should always have a backup before you perform data intrusive activities such as the CONDENSE command (or any similar type of commands from products by Hewlett-Packard or third party vendors).
    Figure 4.7 and Figure 4.8 show sample output for the CONDENSE command used against ldev15 in the above examples. The output of the CONDENSE command is similar to the output of the MAP command. A notable difference between the output of the two commands is the presence of the "x" and "X" characters. These characters differentiate between (1) regular permanent disk files, (2) files which are movable but not off the current ldev, and (3) files not movable at all (primarily operating system files from the System Load Tape (SLT)). The CONDENSE output and any MAP output subsequent to a CONDENSE command will show the movable and unmovable files.

    NOTE Any MAP commands run before CONDENSE or ANALYZE will not display the "x" or "X" types.

    Figure 4.7 CONDENSE command prompt

    Figure 4.8 CONDENSE Command Output
    Figure 4.8 shows sample output of a CONDENSE 15 command.

    Figure 4.9 ldev 15 after CONDENSE command
    Figure 4.9 shows the sample output of a MAP 15 command after the CONDENSE command has been run. Notice the differences between Figure 4.9 and Figure 4.2. As you can tell by examining lines 11 and 12, fragmentation is lessened by performing the CONDENSE command.

    Free Space

    Every MPE/iX system manager has experienced the problem of not having enough free space on a specific ldev. This particularly concerns free space on ldev 1 prior to an operating system update. Up to this point, the process by which that additional free space was acquired was to perform tedious, time-consuming moves of files. De-Frag/X has a command (MAKEROOM), which is specifically intended to simplify that process. For example, Figure 4.10 shows the DISCFREE A output of a sample ldev 16.

    Figure 4.10 DISCFREE A Command Output
    This drive has available 998384 sectors of free space. Let's say an additional 300 megabytes of free space is needed. Figure 4.11 shows output to the MAKEROOM command required to make this available:

    Figure 4.11 MAKEROOM Command Output

    Lund Performance Solutions
    Voice: (541) 812-7600
    Fax: (541) 81207611