CleanDisk(tm)

Prevents disk and file fragmentation on OpenVMS® systems


Footnotes

(tm) CleanDisk is a trademark of Touch Technologies, Inc.

® OpenVMS is a registered trademark of Digital Equipment Corporation.


Abstract

This document contains PROPRIETARY and CONFIDENTIAL information and such information may not be disclosed to others without written permission from Touch Technologies, Inc.

CleanDisk was developed and is supported by Touch Technologies, Inc.


NOTICE

Touch Technologies, Inc. (TTI) has prepared this publication for use by TTI personnel, licensees, and customers. This information is protected by copyright. No part of this document may be photocopied, reproduced or translated to another language without prior written consent of Touch Technologies Incorporated.

TTI believes the information described in this publication is accurate and reliable; much care has been taken in its preparation. However, no responsibility, financial or otherwise, is accepted for any consequences arising out of the use of this material.

The information contained herein is subject to change without notice and should not be construed as a commitment by Touch Technologies, Inc.

The following are trademarks of Touch Technologies, Inc., and may be used only to describe products of Touch Technologies, Inc.:

DYNAMIC TAPE ACCELERATOR      INTOUCH      REMOTE TAPE FACILITY 
 
DYNAMIC LOAD BALANCER PLUS      CleanDisk      REMOTE DEVICE FACILITY 

The following are trademarks of Digital Equipment Corporation, and may be used only to describe products of Digital Equipment Corporation:

DBMS   DCL   DECNET   RDB   RMS   VAX   VMS 

Revised 16-Jul-1995

Copyright ©1995 Touch Technologies, Inc.


Table of Contents


Preface

CleanDisk prevents disk and file fragmentation on OpenVMS systems. CleanDisk does this by intercepting file creation and file extension requests. The intercepted requests are modified to reduce fragmentation. CleanDisk is normally enabled system-wide, but can be disabled (and later re-enabled) for individual processes via DCL commands.

CleanDisk runs on OpenVMS 5.5 and later.

CleanDisk is written in a combination of MACRO-32, C and BLISS-32. This makes CleanDisk fast and efficient, and able to do its work using a minimum of CPU time.

Purpose

The purpose of this manual is to provide:

Intended Audience

This manual is intended for use by the system manager or other technical personnel.

IF YOU HAVE NO SYSTEM MANAGER OR YOU HAVE QUESTIONS ABOUT INSTALLING CLEANDISK, PLEASE CALL TOUCH TECHNOLOGIES, INC. AT:

(800) 525-2527 toll free within the U.S. and Canada.

(619) 566-3603 elsewhere


Chapter 1
Product Overview

1.1 CleanDisk

CleanDisk is a software product that prevents disk and file fragmentation. Preventing disk and file fragmentation speeds up file access by reducing window turns and split I/O transfers. CleanDisk works exceptionally well on files such as:

1.2 Theory of Operation

The OpenVMS file system was designed many years ago. Since that time, CPU speeds have increased by over 10,000%! However, during that same time, I/O speeds have only increased a modest 200%. This has caused most systems that were initially CPU bound to now become I/O bound.

Whenever OpenVMS deletes a file, the various fragments of that file are placed into the ACP extent cache. The purpose of the extent cache is to speed up file allocations. Later, when a file is extended (or initially allocated), OpenVMS first scans the extent cache to fulfill the extension request. Since the extent cache contains random pieces of previously deleted files---the newly extended file becomes very fragmented!

In the event that the ACP extent cache doesn't contain enough disk fragments to fulfill the extension request, the ACP bitmap cache is scanned. This cache also contains random pieces of disk space.

If the ACP bitmap cache also does not contain enough disk space to fulfill the extension request, the entire BITMAP.SYS is scanned. This scan starts wherever the previous scan left off. The effect of the BITMAP.SYS file scan is again---a very fragmented file.

CleanDisk intercepts file open, creation and extension requests. The parameters given in each request are examined. If OpenVMS system default values are given, and CleanDisk determines that the default values would cause the file to be fragmented, CleanDisk modifies the values. The values are modified by requesting contiguous best try file allocation, and by requesting an optimized file extension size. On a typical OpenVMS system, CleanDisk will intercept and optimize thousands of file create and extend requests per day!


Note

To measure the effects of CleanDisk, see Chapter 4,

1.3 Components

CleanDisk consists of two major components, the CLNdriver and the CDCONTROL procedure. The CLNdriver intercepts file system (XQP) requests and modifies the requests in order to prevent fragmentation. The CDCONTROL procedure enables or disables CleanDisk on a per-process basis. The CDSERVER process watches for newly-created processes and enables CleanDisk for them.

1.4 Intercepting File System Requests

The CDSTARTUP.COM procedure starts up CleanDisk. This procedure installs the CLNdriver and also starts up the CleanDisk process. The CLNdriver intercepts file system requests, modifies the requests to prevent fragmentation, and passes the requests on to the OpenVMS XQP handler.

Each time CleanDisk intercepts an XQP request, the request is examined. If needed, the request is modified to:

1.5 Controlling CleanDisk Activity

By default, CleanDisk is enabled for all processes. In some cases you may wish to enable or disable CleanDisk activity on a per-process basis.

The TTI_CD:CDCONTROL procedure enables or disables CleanDisk on a per-process basis.

For example, to disable CleanDisk for your process, the following command would be used:
$ @TTI_CD:CDCONTROL DISABLE


Chapter 2
Installing CleanDisk on Your OpenVMS System

CleanDisk can be installed on systems running OpenVMS 5.5 and greater.


Note

Before installing CleanDisk, make sure that you have read this manual COMPLETELY.

CleanDisk can be installed on any computer running under OpenVMS version 5.5 or greater. The following items are included with this installation package:

2.1 Installation Instructions

To install CleanDisk on your computer, you need to work from a DEC VT100 or compatible terminal. Follow the steps listed below and type the commands shown. The OpenVMS system is space conscious, so be sure to type the commands EXACTLY as shown.

In order to run CleanDisk, you must have its product authorization key registered and loaded. For example:

        Product:        CLEANDISK 
        PRODUCER:       TTI 

  1. Log onto the SYSTEM account:

          Username:  SYSTEM 
          Password:  (your system password) 
    
  2. Create the CleanDisk directory:

          $ CREATE/DIRECTORY SYS$SYSDEVICE:[TTI_CD] 
    

    Note

    CleanDisk can be loaded into any directory on any disk ...e.g., $1$WORK:[CD]

  3. Enter the CleanDisk directory:

          $ SET DEFAULT SYS$SYSDEVICE:[TTI_CD] 
    
  4. Verify that you are in the new directory. You should see the message "No files found" after the "DIRECTORY" command is issued. E.g.,

     
          $ DIRECTORY 
            No files found. 
     
    
  5. Put the CleanDisk distribution tape on your computer's tape drive.

  6. Make the tape drive available.

          $ ALLOCATE MSA0: 
          $ MOUNT MSA0:/FOREIGN 
            Volume is write locked 
            CD mounted on _MSA0: 
    

    Note

    MSA0 may have to be replaced with the appropriate magtape identifier for your system.

  7. Transfer CleanDisk to disk using OpenVMS BACKUP.

          $ BACKUP/LOG MSA0:*.* *.*/NEW_VERSION 
          $ DISMOUNT MSA0: 
          $ DEALLOCATE MSA0: 
    

    The transfer takes about 2 minutes.

    As CleanDisk is transferred to disk, you will see a list of the files being transferred.

  8. Activate CleanDisk interactively by executing the following command:

          $ @SYS$SYSDEVICE:[TTI_CD]CDSTARTUP 
    
  9. Add the above command to your system startup command procedure. Adding the command to the system startup procedure causes CleanDisk to start up each time the system is booted.

    For OpenVMS 5.x, the system startup command file is SYS$MANAGER:SYSTARTUP_V5.COM. For OpenVMS 6.x, the system startup command file is SYS$MANAGER:SYSTARTUP_VMS.COM.

CleanDisk has now been installed on your system.

If you have licensed CleanDisk for more than one node, repeat this installation procedure for each licensed node.

If you have licensed CleanDisk for an entire cluster, you can install CleanDisk once on a cluster-accessable disk. However, you will still need to execute the CDSTARTUP procedure on each node.


Chapter 3
Controlling CleanDisk Activity


Privileges

The CDCONTROL procedure uses the CDCONTROL image. In order to execute this image, you must have the following privileges: NETMBX, TMPMBX

3.1 Command Overview

CleanDisk can be ENABLED or DISABLED on a per-process basis. In addition, there is a SHOW command.

        $ @TTI_CD:CDCONTROL ENABLE 
       
        $ @TTI_CD:CDCONTROL DISABLE 
 
        $ @TTI_CD:CDCONTROL SHOW 

A successful ENABLE or DISABLE will display a message on the terminal indicating the success of the requested operation.

3.2 The SHOW Command

If you need to see if CleanDisk has been enabled for the current process, use the SHOW command:

Example 3-1 Using the SHOW Command

$ @TTI_CD:CDCONTROL SHOW 
 
CD - CleanDisk (2.0) - CDcontrol Procedure 
Copyright (c) 1995 Touch Technologies, Inc. 
 
CD is ENABLED for your process. 
  ...Modified file allocation requests:        13 
 

3.2.1 Showing CleanDisk Usage System-wide

To display the effects of CleanDisk system-wide, use the SHOW/ALL option.

Example 3-2 Using the SHOW/ALL Command

$ @TTI_CD:CDCONTROL SHOW/ALL 
 
  CD - CleanDisk (2.0) - CDcontrol Procedure 
  Copyright (c) 1995 Touch Technologies, Inc. 
                                                         Modified 
  Pid    Process Name    User Name       CD status       Requests 
26400081 SWAPPER                         not enabled 
26400086 CONFIGURE       SYSTEM          enabled                0 
26400087 IPCACP          SYSTEM          enabled                0 
26400089 ERRFMT          SYSTEM          enabled              102 
2640008A CACHE_SERVER    SYSTEM          enabled                0 
2640008B CLUSTER_SERVER  SYSTEM          enabled                0 
26400098 --RTclient--    SYSTEM          enabled                0 
2640009B XXX_09B_2       SMITH           enabled              213 
  Modified file requests since CD was started: 486  (92%) 

The last line of the display shows the total number of file create and extend requests that CleanDisk has optimized since it was started on this node. In order to measure the impact of CleanDisk on your system, you can check the percentage of all requests that CleanDisk modified.

In the above example, 92% of the file create and extend requests were found to be nonoptimal! CleanDisk modified these nonoptimal requests, for a total of 486 modifications.

Without CleanDisk, these requests would have resulted in fragmented files, higher I/O overhead and poorer response times.


Chapter 4
Benchmarking CleanDisk


Note

The CleanDisk Benchmark procedure requires 3000 blocks of disk space on the disk pointed to by SYS$SCRATCH. When the benchmark has completed, the disk space can be reclaimed.

Included with your CleanDisk kit, is a Benchmark procedure. By using the supplied procedure, you can measure the effectiveness of CleanDisk on your system. Also, the CDCONTROL SHOW/ALL command can be used to show the effects of CleanDisk system-wide (see Section 3.2.1,

4.1 The Benchmark Procedure

The supplied Benchmark procedure performs the following tasks:

Benchmark Symbols

Benchmark symbols are used to perform specific steps in the benchmarking procedure.

Table 4-1 Benchmark Symbols
Symbol Description Argument
CRFILE Creates an empty temporary file none
EXFILE Extends the temporary file by a number of blocks Number of blocks to extend by
FRAGS Displays file fragments filename---defaults to the last temporary file created or extended

4.2 Using the Benchmark Procedure

When you use the Benchmark procedure, you will:

4.2.1 Setting Up to Perform a Benchmark

You can start the benchmark process by running the set up routine. The Benchmark set up routine is executed by entering the following command:

        $ @TTI_CD:CD_BENCHSET 

4.2.2 Creating and Extending without CleanDisk Enabled

After executing the Benchmark set up routine, you can create a file and extend it several times. Then, you can see how many fragments the file contains by running the FRAGS report. Each retrieval pointer in the FRAGS report represents one fragment.

These are the symbols you will enter to create and extend a file several times and run the FRAGS report:

The following example shows the results of a benchmark run.

Example 4-1 Creating and Extending without CleanDisk Enabled

$ @tti_cd:cd_benchset 
********************************************** 
** CD Benchmark environment being set up... 
Benchmark cleanup done 
CleanDisk DISABLED 
Fragmenting SYS$SCRATCH: by creating/deleting files 
  creating the temporary files... 
  deleting half of the temporary files... 
$ crfile == "@tti_cd:cd_do crfile " 
$ exfile == "@tti_cd:cd_do exfile " 
$ frags  == "@tti_cd:cd_do frags " 
** CD benchmark environment set up completed. 
********************************************** 
$ 
$ crfile 
sys$scratch:tti_cd999.tmp created 
$ exfile 100 
Extending sys$scratch:tti_cd999.tmp by 100 blocks 
sys$scratch:tti_cd999.tmp extended 
$ 
$ exfile 100 
Extending sys$scratch:tti_cd999.tmp by 100 blocks 
sys$scratch:tti_cd999.tmp extended 
$ 
$ exfile 100 
Extending sys$scratch:tti_cd999.tmp by 100 blocks 
sys$scratch:tti_cd999.tmp extended 
$ 
$ exfile 100 
Extending sys$scratch:tti_cd999.tmp by 100 blocks 
sys$scratch:tti_cd999.tmp extended 
$ 
$ exfile 100 
Extending sys$scratch:tti_cd999.tmp by 100 blocks 
sys$scratch:tti_cd999.tmp extended 
$ 
$ frags 
    File name:                            TTI_CD999.TMP;1 
    Retrieval pointers 
        Count:          3        LBN:        411 
        Count:          6        LBN:      18294 
        Count:          3        LBN:      48459 
        Count:          3        LBN:      83100 
        Count:          3        LBN:      89787 
                    . 
                    . 
                    . 
        Count:          3        LBN:     938211 
        Count:          6        LBN:     945297 
        Count:          6        LBN:     972132 
        Count:         90        LBN:    1027965 
        Count:         51        LBN:    1028226 
$ 

4.2.3 Creating and Extending with CleanDisk Enabled

You can now enable CleanDisk using the command:

        $ @TTI_CD:CDCONTROL ENABLE 

Then, create another file, extend it several times and run the FRAGS report to see how many fragments the file contains. You can use the following symbols:

The following example shows the results of a benchmark run with CleanDisk enabled.

Example 4-2 Creating and Extending with CleanDisk Enabled

$ @tti_cd:CDCONTROL enable 
CD - CleanDisk (Version 2.0) - Control Procedure 
Copyright (c) 1995 Touch Technologies, Inc. 
 
CleanDisk ENABLED 
$ crfile 
sys$scratch:tti_cd998.tmp created 
$ exfile 100 
Extending sys$scratch:tti_cd998.tmp by 100 blocks 
sys$scratch:tti_cd998.tmp extended 
$ 
$ exfile 100 
Extending sys$scratch:tti_cd998.tmp by 100 blocks 
sys$scratch:tti_cd998.tmp extended 
$ 
$ exfile 100 
Extending sys$scratch:tti_cd998.tmp by 100 blocks 
sys$scratch:tti_cd998.tmp extended 
$ 
$ exfile 100 
Extending sys$scratch:tti_cd998.tmp by 100 blocks 
sys$scratch:tti_cd998.tmp extended 
$ 
$ exfile 100 
Extending sys$scratch:tti_cd998.tmp by 100 blocks 
sys$scratch:tti_cd998.tmp extended 
$ 
$ frags 
    File name:                            TTI_CD998.TMP;1 
    Retrieval pointers 
        Count:         90        LBN:    1033836 
        Count:        102        LBN:    1033929 
        Count:        309        LBN:    1034061 
$ 

You will notice that with CleanDisk enabled, the created and extended file contains far fewer fragments than the file created without using CleanDisk. Fewer fragments means fewer I/Os and fewer window-turns. In most cases, CleanDisk prevents 90 percent or more of file fragmentation. The reduced fragmentation, in turn, reduces file I/Os.


Note

If you do not see the results shown in this benchmark example, please contact our Technical Support staff for assistance. (The phone number is located in the preface of this manual.)

4.3 Benchmark Cleanup

When you have finished benchmarking CleanDisk, the temporary files created by the benchmark can be deleted by entering the command:

        $ @TTI_CD:CD_DO CLEANUP 


| Next page... | Table of Contents |