CHAPTER 3

HOW CAN YOU TELL IF YOU'VE GOT IT?

Like someone first hearing about a terrible new disease, you may find yourself wondering, "Do I have fragmentation? How do I know if I've got it?"

Some System Managers just know they've got it, while others wait for outraged users to complain (tar, feathers and shotguns loaded with peppercorn and rock salt) of rotten performance and use that as a measure of fragmentation. Professional System Managers actually look into their VAX or Alpha AXP computer systems.

It is not difficult to find out whether you have fragmentation or not, though it is easier if you have the right tools.

Fragmentation Analysis Tools

The DUMP Utility

The simplest and most direct method for determining whether a file is fragmented is the DUMP command, used as follows:

$ DUMP /HEADER /BLOCKS=END:0 filespec

This command allows you to examine the header of a specific file for multiple retrieval pointers. Each pointer represents one fragment (extent) in the file. So, if there is only one pointer, the file is contiguous (not fragmented at all). If there are two pointers, the file is fragmented into two pieces. Three pointers means three fragments, and so on.

The drawbacks of the DUMP command are that it can only be used on one file at a time, requiring an unacceptable amount of time to examine all the files on a disk, and it gives you a lot of irrelevant information, with the map pointers appearing at the end of all the information displayed.

The MONITOR Utility

To determine whether fragmented files are causing your computer to do excessive disk I/O, you can use Digital's MONITOR utility, which comes free with OpenVMS. Type this command:

$ MONITOR IO

You should see a screen that looks something like this:



                          OpenVMS Monitor Utility
                           I/O SYSTEM STATISTICS
                              on node CURLY
                            6-Sep-1993 11:26:20


                                    CUR       AVE      MIN       MAX


 Direct I/O Rate                    9.50       6.42       0.00      11.58
 Buffered I/O Rate                  0.66       0.89       0.00       9.27
 Mailbox Write Rate                 0.71       0.12       0.00       0.96
 Split Transfer Rate                1.00       0.81       0.00       6.33
 Log Name Translation Rate          0.00       0.22       0.00       0.99
 File Open Rate                     0.20       0.27       0.00       0.40
 
 Page Fault Rate                    3.42       3.08       0.95      20.86
 Page Read Rate                     3.01       2.21       0.00       6.29
 Page Read I/O Rate                 1.46       1.03       0.00       3.99
 Page Write Rate                    0.41       0.87       0.00       0.89
 Page Write I/O Rate                0.19       0.63       0.00       0.50
 Inswap Rate                        0.00       0.00       0.00       0.00
 Free List Size                 48048.00   48042.65   48042.00   48049.00
 Modified List Size               252.00     247.31       0.00     252.00
 


Example 3-1 MONITOR IO Display

In example 3-1, the word "CUR" indicates the current rate of I/O transfers per second. "AVE" means average, "MIN" means minimum and "MAX" means maximum.

The fourth line in the table is the Split Transfer Rate. This line tells you how many times the computer is having to do two or more I/O transfers when one would serve. A split transfer is the result of fragmentation. If there are any split transfers at all, you are suffering performance losses due to fragmentation.

Now enter this command:

$ MONITOR FCP

(FCP stands for File Control Primitive)

You should see a screen that looks something like this:


                         OpenVMS Monitor Utility
                        FILE PRIMITIVE STATISTICS
                               on node MOE
                            6-SEP-1993 13:28:53
                                    CUR        AVE        MIN        MAX

  FCP Call Rate                    0.66       0.62       0.00       9.63
  Allocation Rate                  0.00       0.03       0.00       1.32
  Create Rate                      0.00       0.03       0.00       1.98

  Disk Read Rate                   0.00       0.61       0.00      17.94
  Disk Write Rate                  0.33       0.26       0.00       3.98
  Volume Lock Wait Rate            0.00       0.01       0.00       0.66

  CPU Tick Rate                    0.33       1.00       0.00      21.85
  File Sys Page Fault Rate         0.00       0.03       0.00       0.66
  Window Turn Rate                 3.65       0.37       0.00       3.98

  File Lookup Rate                 0.33       0.31       0.00       8.97
  File Open Rate                   0.33       0.24       0.00       6.31
  Erase Rate                       0.00       0.00       0.00       0.00


Example 3-2 MONITOR FCP Display

The critical entry in this table is Window Turn Rate, which tells you how many times OpenVMS had to load new retrieval pointers from a file's header to gain access to the desired portion of a file. The term window, as it is used here, means the set of retrieval pointers the system keeps in memory to access the file. If the file is contiguous, only one pointer is needed to access the file, so a window turn would never occur. A window typically holds seven pointers, so a file can be fragmented in up to seven pieces and still can be accessed without causing a window turn. When there are eight or more pieces, however, one or more pointers have to be flushed and new pointers loaded into the window in memory to get at the later parts of the file. If a file is fragmented into many pieces, windows turns can become a major performance bottleneck.

Split transfers and window turns are not the only consequences of fragmentation, but they are the only ones you can detect with the OpenVMS MONITOR utility. If you do not have the Disk Analysis Utility, Software Performance Monitor or VAX Performance Advisor, MONITOR will have to do.

Digital's Performance Utilities

Digital Equipment Corporation offers two system utilities that include some fragmentation analysis capability: the Software Performance Monitor (SPM) and VAX Performance Advisor (VPA). Both will tell you a little about fragmentation on your disk, but neither will tell you a lot, as they were designed primarily for other things. And they are a bit pricey, especially when compared to Executive Software's Disk Analysis Utility.

Software Performance Monitor (SPM)

Digital's Software Performance Monitor, or SPM for short, produces two reports that can be used to detect performance problems due to fragmentation. One reports system performance problems in terms of Window Turns and Split I/Os and the other reports information about fragmentation of files and free space on a disk. Unfortunately, the Window Turns and Split I/Os information is only reported on a system-wide basis, so the performance problem cannot be traced to a particular disk. Without knowing which disk is the cause of the problem, there is nothing you can do about it except "fix everything" or use other tools to narrow the search.

We'll look first at the report on Window Turns and Split I/Os. Before you can generate the report, you have to collect data for a while. The DCL command to invoke SPM is "PERFORMANCE" and the parameters for this DCL command are the commands acted upon by SPM.

First, collect the necessary data:

$ PERFORMANCE COLLECT=TUNE /CLASS=ALL /OUTPUT=filename

In this command, filename is the name you want given to the output file. When you have finished collecting your sample of performance data, use this command to stop SPM:

$ PERFORMANCE COLLECT=TUNE /STOP

Then, generate the report using the same file name as above with this command:

$ PERFORMANCE REPORT=LOG_FILE filename

This produces an eleven-page report. Only the second page is of interest here, and even that one contains far more data than we need. This shows a sample from page 2 of the SPM SYSTEM report:

                   +------ File I/O Rates (per second) -----+
                   !                                        ! 
                   ! Window  Window   Split   Erase    File ! 
                   !  Hits    Turns   I/Os    I/Os    Opens ! 
                   ! ------  ------  ------  ------  ------ ! 
                   !   25.5     0.4     0.2     0.0     3.7 ! 
                   +----------------------------------------+

Example 3-3 SPM SYSTEM Report

This box contains the two numbers that interest us most: Window Turns and Split I/Os. Use these numbers to determine the impact of fragmentation on the performance of your VAX. Any Window Turns or Split I/Os at all means fragmentation is probably slowing down your VAX or Alpha AXP.

Next we'll look at the report on disk files and space. This time you do not have to collect data before you can generate the report. The command to generate the report is:

$ PERFORMANCE REPORT=DISK_SPACE diskname

This produces a report of three pages. There is a lot of useful information in this report, but the key information is Mean no. extents/file on Page 2 and the listing of Files with extension headers on Page 3. Here is a sample of the SPM DISK_SPACE report:


11-NOV-1993 09:43:32.27                         VAX SPM V3.3-03     Page   1            
                                                                                        
****  Detailed volume analysis for     _HSCOOO$DUA5: *****                              
                                                                                        
Items preceded by 'I','M' or 'S' are controlled by Initialize,                          
Mount  or Sysgen.                                                                       
                                                                                        
(I  ) Volume name  is 'USERDISK1   '.                                                   
(I  ) Serial number is           0.                                                     
(I  ) Creation date was  4-NOV-1987 15:22:23.77.                                        
(I  ) Volume owner is 'CAMPBELL      '.                                                 
(IM ) Owner uic is [SYSTEM].                                                            
(I  ) Format type  is 'DECFILE11B  '.                                                   
(IM ) Volume protection is [RWED,RWED,RWED,RWED].                                       
(IMS) Default data checking is NOREAD-CHECK, NOWRITE-CHECK.                             
(I  ) Structure level is   2, version   1.                                              
(I  ) Allocation cluster size is     3 blocks.                                          
(I  ) Index file bitmap is located at LBN     445614.                                   
(IM ) Default file extension is     5 blocks.                                           
(IM ) Default window size is  10 retrieval pointers.                                    
(I  ) Maximum number of files allowed is     111384.                                    
(IMS) Default number of cached directories is    3.                                     
                                                                                        
      Volume size is      891072 blocks with                                            
                              51 blocks/track,                                          
                              14 tracks/cylinder,                                       
                            1248 cylinders/volume.                                      
*****  Summary of FREE STORAGE for    _HSC000$DUA5: *****                               
                                                                                        
 Free Storage  Extent Sizes     No. Extents     Cum % Space                             
 --------------------------     -----------     -----------                             

 >=         3,  <         6             17           0.1                                
 >=         6,  <         9              8           0.1                                
 >=         9,  <        15              6           0.2                                
 >=        15,  <        30              3           0.3                                
 >=        30,  <        60             10           1.1                                
 >=        60,  <        90              2           1.2                                
 >=        90,  <       150              4           2.0                                
 >=       150,  <       300              8           4.1                                
 >=       300,  <       600              2           5.2                                
 >=       600,  <       900              7          12.7                                
 >=       900,  <      1500             14          39.4                                
 >=      1500,  <      3000             18          89.6                                
 >=      3000,  <      6000              2         100.0                                
 >=      6000,  <      9000              0         100.0                                
 >=      9000.  <     15000              0         100.0                                
 >=     15000.  <     30000              0         100.0                                
 >=     30000,  <     60000              0         100.0                                
 >=     60000,  <     90000              0         100.0                                
 >=     90000,  <    150000              0         100.0                                
 >=    150000                            0         100.0                                

Total free blocks  =      68736.                                                        
No. of extents     =        101.                                                        
Mean blocks/extent =        681.                                                        
Smallest extent    =          3.                                                        
Largest  extent    =       3957.                                                        
                                                                                        
11-NOV-1993 09:43:32.27                         VAX SPM V3.3-03     Page   2            
                                                                                        
****  Summary of ALLOCATED SPACE for   _HSC000$DUA5: *****                              
                                                                                        
 Space Allocated per Header     No. Headers     Cum % Headers                           
 --------------------------     -----------     -------------                           
                                                                                        
 >=         3,  <         6           5603           41.1                               
 >=         6,  <         9           1905           55.0                               
 >=         9,  <        15           1883           68.8                               
 >=        15,  <        30           1753           81.7                               
 >=        30,  <        60            883           88.2                               
 >=        60,  <        90            544           92.2                               
 >=        90,  <       150            447           95.4                               
 >=       150,  <       300            322           97.8                               
 >=       300,  <       600             84           98.4                               
 >=       600,  <       900            126           99.3                               
 >=       900,  <      1500             34           99.6                               
 >=      1500,  <      3000             27           99.9                               
 >=      3000,  <      6000              9           99.8
 >=      6000,  <      9000              6           99.9                               
 >=      9000,  <     15000             10          100.0                               
 >=     15000,  <     30000              3          100.0                               
 >=     30000,  <     60000              2          100.0                               
 >=     60000,  <     90000              0          100.0                               
 >=     90000,  <    150000              0          100.0                               
 >=    150000                            0          100.0


Minimum allocated extent =          3.                                                  
Maximum allocated extent =      47262.                                                  
Total allocated blocks   =     820965 ( 92.1% of volume).                               
Total used blocks        =     801995 ( 97.7% of allocated).                            
No. extents allocated    =      13682.                                                  
Mean alloc blocks/extent =         60.                                                  
Total no. of files       =      13688.                                                  
Mean alloc blocks/file   =         60.                                                  
Mean no. extents/file    =          1.                                                  
No. extension headers    =          4.                                                  
No. multi-volume files   =          0.                                                  
No. directories          =        468.                                                  
                                                                                        
11-NOV-1993 09:43:32.27                         VAX SPM V3.3-03     Page   3            
                                                                                        
****  Files with extension headers for _HSC000$DUA5: *****                              
                                                                                        
 File name                                                      Ext. headers            
 -----------------------------------------------------------    ------------            
                                                                                        
 [CRANDALL.PJT]M4WC_26SEP.DAT;1                                            1            
                                                                                        
 [FAIR.CMS.EOF.33]EXEC.LIS;1                                               3

Example 3-4 SPM Disk Space Report

VAX Performance Advisor (VPA)

Before you can produce any report, graph or analysis from VPA, data must be collected from the system over a period of time. You can tell VPA to start collecting the data immediately:

VPA> ADVISE /COLLECT /START

or you can have it start collecting the data at a later specified time:

VPA> ADVISE /COLLECT /BEGINNING="dd-mmm-yyyy hh:mm:ss.cc"

Then you have to tell VPA when to stop collecting data. Again, you can tell it to stop immediately:

VPA> ADVISE /COLLECT /STOP

or at a later specified time:

VPA> ADVISE /COLLECT /ENDING="dd-mmm-yyyy hh:mm:ss.cc"

Note: You can generate VPA reports while the data capture is running. You do not have to stop VPA to request graphs, reports or an analysis.

Window turns can be reported as a graph. To display a graph of window turns, type the following:

VPA> ADVICE /GRAPH=GRAPH /TYPE=CUSTOM=SYSTEM=(WINDOW)

Here is a sample of the VPA output showing the Window Turn Rate:


                                 VPA CUSTOM GRAPH
                                    Node: BOOT
                           Date: 16-SEP-1993 00:00-10:09

                                                   LEGEND:
                                                   1 =  WINDOW_TURN
                                                   (Metric Values are  Stacked)
 Y-Units: Window Turn Rate

 0.300 !
 0.285 !
 0.270 !             1
 0.255 !             1
 0.240 !             1
 0.225 !             1
 0.210 !             1
 0.195 !            11
 0.180 !            11
 0.165 !            11
 0.150 !            11    1
 0.135 !            11    1
 0.120 !            11    1
 0.105 !            11    1
 0.090 !            111   1
 0.075 !            111   1                                      1
 0.060 !            111   1                                      1
 0.045 !            111 1 1                                      1
 0.030 !  1      1 1111 1 1                                      1             1
 0.015 !11111111111111111 111111 11111 111111 11111 111111 11111 111111 11111 111  
       +-------------------------------------------------------------------------
        0       1      2      3      4      5      6      7      8      9      10  

 VPA Command:  ADVISE/GRAPH/NODE=BOOT/TYPE=CUSTOM=SYSTEM=(WINDOW)

Example 3-5 VPA Output Showing Window Turns

Example 3-5 shows the Window Turn Rate over a period of ten hours (midnight to 10:09 AM) running generally at about 0.015 window turns per second. Around 2:00 AM, however, there is a burst of activity, with the Window Turn Rate peaking at 0.270 window turns per second.

What does this mean in terms meaningful to fragmentation analysis? Any window turns at all indicate a fragmentation problem severe enough to degrade the performance of your system. The more window turns you have, the worse the performance degradation is. The only acceptable number here is zero.

Another useful report you can get from VPA is one showing Split I/Os. To produce this report, enter the following command:

VPA> ADVISE /REPORT=PERFORMANCE_EVALUATION=(NOALL_STATISTICS,-
VPA>_ DISK_STATISTICS) /NODE=BOOT

Here is a sample of such a report:


 Reporting on Node1
 VPA V2.0 Performance                   CLUSTER                          Page 1     
          Evaluation        Monday 16 SEP  00:00 to 10:16

     +-----------------------------------------------------------------------+
     | The following table gives the summary of all disk activity as seen    | 
     | by the indicated node. An "*" for service node indicates that more    | 
     | than one was detected.                                                | 
     +-----------------------------------------------------------------------+


 Disk     Avg I/O  Avg   Avg    IOsz  Source Service  %    % IO % IO         # of
 Volume   per Sec Queue Kb/sec in pgs  Node   Node   Busy  Read Split Type Samples
 ------   ------- ----- ------ ------ ------ ------ ------ ---- ----- ---- -------
 BOOTDISK       (BOOT$DUA0)
             0.21  0.01   0.6    5.6   NODE1 NODE1   0.75   86    0  RD54    309
 WORK1       (WORK1$DKA0)
             0.00  0.00   0.0    0.0   NODE1 NODE2   0.00    0    0  UNK     309


 CORPDISK       (BOOT$DUC0)
             2.49  0.12   6.7    5.3         NODE1          84    0  RA81    309
             0.04  0.12   0.1    5.3   NODE1         8.91   84    0          309

 DATASHADOW     (USER1$DKB200)
             0.00  0.00   0.0    0.0   NODE1 NODE4   0.00    0    0  UNK     309
 WORK2       (WORK2$DUB0)
             0.00  0.00   0.0    0.0   NODE1 NODE3   0.00    0    0  RD54    309
 FINDISK        (USER1$DKB400)
             0.00  0.00   0.0    0.0   NODE1 NODE5   0.00    0    0  RD54    309
 USERDISK2       (USER2$DKB0)
             0.29  0.03   1.3    8.6   NODE1 NODE4   1.07   88    5  UNK     309

 Totals      3.20  0.16   8.66   5.41                       82    0

 User Command: ADVISE/REPORT=PERFORMANCE_EVALUATION=(NOALL,DISK_STAT)/NODE=BOOT

Example 3-6 VPA Report Showing Split I/Os

The important information in this report, for purposes of fragmentation analysis, is the third column from the right, headed % IO Split. This indicates the percentage of I/O requests that resulted in Split I/Os. In this example, you can see that only one disk, USERDISK2, is suffering from Split I/Os and that 5% of the I/O requests to that disk result in Split I/Os. Therefore, you would conclude from this report that about 5% of the USERDISK2 I/O load is resources wasted due to fragmentation.VPA

Disk Analysis Utility

The best tool, in my opinion, is the Disk Analysis Utility from Executive Software. This is a program I designed and wrote originally in 1986 with my associate Rick Cadruvi. He has since reworked it and enhanced it to the point where it probably qualifies as a total rewrite now, but it remains the only tool designed specifically and solely to determine the extent of fragmentation on an OpenVMS disk.

The Disk Analysis Utility can provide anything from a quick summary to a very detailed analysis. It can be run at any time on any Digital-supported disk and it is not necessary to allocate the disk, dismount it, or stop users from accessing it.

The Disk Analysis Utility is invoked with the command:

$ DAU disk_name /qualifiers

where disk_name is the device name of the disk to be analyzed. If disk_name is omitted, the Disk Analysis Utility will prompt for the disk name. The optional /qualifiers represents Disk Analysis Utility qualifiers, which you can find described in its manual.

Sample Disk Analysis Utility Output

The following example was produced using the command:

$ DAU BOOT$DUA0: /FULL



                              Disk Analysis Utility
 DISK_ANALYSIS V6.0
 Copyright (c) 1993 Executive Software International, All Rights Reserved.
 _BOOT$DUA0    :                          1-AUG-1993 12:16:39.58
 Number of Usable Blocks:   311100       Cluster Size           :        3

 <<<<<<<<<<<<<<<<<<<<<<<<<<<<  Free Space Summary  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>

 Total Free Space Size  :    78260       Smallest Free Space    :      676
 Number of Free Spaces  :        16      Largest Free Space     :     9366
 #Spaces = 82% of Total :        10      Mean Size of Free Space:     4891
 <<<<<<<<<<<<<<<<<<<<<<<<<<  16 Largest Free Spaces  >>>>>>>>>>>>>>>>>>>>>>>>>>>

 Start LBN   Size    Start LBN   Size    Start LBN   Size    Start LBN   Size
 --------- --------- --------- --------- --------- --------- --------- --------- 
    204828      9366    196610      6760     68198      4852     73886      3166
     98304      8232    190860      5748     78336      4126     57390      1516
    118748      7576     51854      5524     36978      3982    165152      1036
    139196      6774     59472      5302     90274      3624     47986       676
 <<<<<<<<<<<<<<<<<<<<<<<<<  Free Spaces Distribution  >>>>>>>>>>>>>>>>>>>>>>>>>>

      Size Range          # Spaces            Size Range           # Spaces
 --------------------     ---------      --------------------      ---------
        1 to        2   -         0           511 to     1022    -         1 
        3 to        6   -         0          1023 to     2046    -         2 
        7 to       14   -         0          2047 to     4094    -         3 
       15 to       30   -         0          4095 to     8190    -         8
       31 to       62   -         0          8191 to     16382   -         2 
       63 to       126  -         0         16383 to     32766   -         0 
      127 to       254  -         0         32767 to     65534   -         0 
      255 to       510  -         0         65535 to    311198   -         0

 <<<<<<<<<<<<<<<<<<<<<<<<<<<<  Free Space Detail  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

 Start LBN   Size    Start LBN   Size    Start LBN   Size    Start LBN   Size 
 --------- --------- --------- --------- --------- --------- --------- --------- 
     36978      3982     59472      5302     90274      3624    165152      1036
     47986       676     68198      4852     98304      8232    190860      5748
     51854      5524     73886      3166    118748      7576    196610      6760
     57390      1516     78336      4126    139196      6774    204828      9366
 <<<<<<<<<<<<<<<<<<<<<<<<<<<<  Special Case Files  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>

 Reserved File    : (1,1,0) [000000]INDEXF.SYS;1
 Reserved File    : (2,2,0) [000000]BITMAP.SYS;1
 Zero Length File : (3,3,0) [000000]BADBLK.SYS;1
 Reserved File    : (3,3,0) [000000]BADBLK.SYS;1
 Reserved File    : (4,4,0) [000000]000000.DIR;1
 Zero Length File : (5,5,0) [000000]CORIMG.SYS;1
 Reserved File    : (5,5,0) [000000]CORIMG.SYS;1
 Zero Length File : (6,6,0) [000000]VOLSET.SYS;1
 Reserved File    : (6,6,0) [000000]VOLSET.SYS;1
 Zero Length File : (7,7,0) [000000]CONTIN.SYS;1
 Reserved File    : (7,7,0) [000000]CONTIN.SYS;1
 Zero Length File : (8,8,0) [000000]BACKUP.SYS;1
 Reserved File    : (8,8,0) [000000]BACKUP.SYS;1
 Zero Length File : (9,9,0) [000000]BADLOG.SYS;1
 Reserved File    : (9,9,0) [000000]BADLOG.SYS;1
 Zero Length File : (36,31,0) [SYS6.SYSMGR]ACCOUNTNG.DAT;1
 Zero Length File : (581,15,0) [SYS6.SYSMGR]VMSIMAGES.DAT;14
 Placed File      : (1132,20,0) [SYSE.V4COMMON.SYSEXE]JBCSYSQUE.DAT;3
 Zero Length File : (1478,1,0) [SYSE.V4COMMON.SYSEXE]NOTICE.TXT;2

 <<<<<<<<<<<<<<<<<<<<<<<<<<  Most Fragmented Files  >>>>>>>>>>>>>>>>>>>>>>>>>>>>

       77: (866,2,0) [SYSE.V4COMMON.SYSLIB]BASIC$STARLET.TLB;1
       73: (86,24,0) [SYS1.SYSERR]ERRLOG.SYS;1
       34: (116,7,0) [SYS3.SYSERR]ERRLOG.SYS;1
       19: (26,73,0) [SYS0.SYSERR]ERRLOG.SYS;1
       10: (81,68,0) [SYS2.SYSERR]ERRLOG.SYS;1
        9: (1132,20,0) [SYSE.V4COMMON.SYSEXE]JBCSYSQUE.DAT;3
        7: (1,1,0) [000000]INDEXF.SYS;1
        6: (24,1,0) [SYS0.SYSEXE]PAGEFILE.SYS;1
        4: (34,6,0) [SYS2.SYSEXE]PAGEFILE.SYS;1
        4: (1051,3,0) [SYS3.SYSEXE]PAGEFILE.SYS;1
        3: (1009,8,0) [SYS0.EASYLINK]INMAIL.LOG;1
        3: (1206,24,0) [SYS6.SYSEXE]PAGEFILE.SYS;1
        3: (1225,20,0) [SYS3.SYSMGR]OPERATOR.LOG;70
        2: (230,2,0) [SYS5.SYSEXE]PAGEFILE.SYS;1
        2: (316,11,0) [SYS0.EASYLINK]EMC.LOG;72
        2: (618,8,0) [SYS1.SYSMGR]OPERATOR.LOG;92'
        2: (1112,15,0) [SYS2.SYSMGR]OPERATOR.LOG;68

 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<  File Information  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

 Maximum Number of Files:     51866      # Reserved Files       :        9
 Total Number of Files  :      1545      # Placed Files         :        1
 Total Size of all Files:    230607      # Multi-Header Files   :        2
 Smallest File Size     :         1      # Multi-Volume Files   :        0
 Largest File Size      :     50000      # Directory Files      :      125
 Mean Size of all Files :       150      # Zero Length Files    :        9
 # Extent Headers       :         1      # Files with Frags >= 2:       17
 Total File Fragments   :      1763      Lost Blks/Extent Cache :     2333
 Mean Fragments per File:      1.10      Total Split I/Os       :     1291

 <<<<<<<<<<<<<<<<<<<<<<<<<<<<  File Sizes Summary  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>

      Size Range           # Files           Size Range          # Files
 --------------------     ---------     --------------------    ---------
        1 to        2   -       335          511 to     1022  -        11 
        3 to        6   -       288         1023 to     2046  -         8 
        7 to       14   -       179         2047 to     4094  -         4 
       15 to       30   -       267         4095 to     8190  -         1 
       31 to       62   -       187         8191 to    16382  -         4 
       63 to      126   -       134        16383 to    32766  -         2 
      127 to      254   -        81        32767 to    65534  -         1 
      255 to      510   -        34        65535 to   311198  -         0 

 <<<<<<<<<<<<<<<<<<<<<<<<<<  File Fragments Summary  >>>>>>>>>>>>>>>>>>>>>>>>>>>

  Fragments     # Files       Fragments     # Files      Fragments     # Files
 -----------   ---------     -----------   ---------    -----------   ---------
      0      -         9          6      -         1        12      -         0
      1      -      1518          7      -         1        13      -         0 
      2      -         5          8      -         0        14      -         0
      3      -         3          9      -         1        15      -         0
      4      -         2         10      -         1        16      -         0 
      5      -         0         11      -         0        17+     -         4

Example 3-7 DAU OutputDisk Analysis Utility

How to Read the Disk Analysis Display

The heading includes the title, the version of the program used, a copyright notice, the physical device name of the disk analyzed and a date/time stamp indicating when the report was generated. The physical device name of the disk is provided to ensure there is no mistake about which disk is being analyzed, because the utility accepts logical as well as physical disk names as input.

Number of Usable Blocks is the total number of usable blocks on the disk, whether allocated or free.

Cluster Size is the minimum allocation quantity for that disk. It is the number of blocks represented by each bit in the storage bitmap. The cluster size is set by the System Manager at the time the disk is initialized.

The Free Space Summary section gives information about free space on the disk so you can determine the degree of free space fragmentation.

Total Free Space Size is the number of disk blocks that are unoccupied, including the number of blocks in the extent cache for this disk on the local node.

Number of Free Spaces is the total number of free spaces (of any size) on the disk.

#Spaces = nn% of Total indicates how many free spaces combined represent 80% or more of the free space on the disk. In the example, ten free spaces constitute 82% of the free space on the disk.

Smallest Free Space is the size in blocks of the smallest free space on the disk.

Largest Free Space is the size in blocks of the largest free space on the disk.

Mean Size of Free Space is the average size of a free space, calculated by dividing the total free space size in blocks by the number of free spaces.

The table headed 16 Largest Free Spaces shows the location and size in blocks of the 16 largest contiguous free spaces on the disk. Space held in system caches is considered only if the user has the privileges required to access such information.

The table headed Free Spaces Distribution shows the number of free spaces on the disk categorized by size in blocks. In the example, there is one free space from 511 to 1022 blocks in size, two more in the range 1023 to 2046, three in the range 2047 to 4094, eight in the range 4095 to 8190 and two between 8191 and 16382.

The table headed Free Space Detail shows the size and location of unallocated free spaces on the disk, in order from LBN 0 to the end of the disk. Again, space held in system caches is considered only if the user has the privileges required to access such information.

The table headed Special Case Files shows files that may be of special interest to the System Manager. The list includes files reserved for use by the file system, directory files, zero length files, multi-header files, placed files and any multi-volume files if the disk is part of a volume set. The files are listed both by File ID and by name.

The table headed Most Fragmented Files shows the files that have the most fragments, in order from most fragmented to least. Only files that have two or more fragments are listed, but the size of the list (64 files by default) can be limited by the use of the /MOST_FRAGMENTED_FILES=n qualifier. The number of fragments in each file is shown as well. Multi-header files appear several times, as these are listed once for each header.

The File Information table is a collection of statistical information about the files and fragments on the disk.

Maximum Number of Files is the total number of files that can be created on the disk.

Total Number of Files is the total number of files (headers) currently on the disk, including zero-length files.

Total Size of all Files is the number of disk blocks that are occupied. Blocks allocated to a file but not yet written are included in the total as well.

Smallest File Size is the size in blocks of the smallest file on the disk.

Largest File Size is the size in blocks of the largest file on the disk.

Mean Size of all Files is the average size of all files, calculated by dividing the total size of all files by the total number of files, excluding zero-length files.

# Extent Headers is the number of extra (extension) file headers. This does not include the primary header required for each file.

Total File Fragments is the total number of pieces of files on the disk. Note that it is possible for this number to differ from, and even be less than, the Total Number of Files figure, because zero-length files are included in the Total Number of Files, but such files consist of zero fragments.

Mean Fragments per File shows how many fragments there are in the typical file on the disk (total number of fragments divided by total number of non-zero-length files). This is an index of how fragmented the files on the disk are. If the mean fragments per file is 1.00, the files are all contiguous. If the figure is 1.10, then 10% of the files, on average, are in two pieces. 1.20 means 20%, 1.30 means 30%, etc. A figure of 2.00 means the files average two fragments each. 1.00 is the best figure attainable, indicating that all files or nearly all files are contiguous.

# Reserved Files is the number of files reserved for use only by the file system.

# Placed Files indicates how many files on the disk are fixed at their current location using OpenVMS placement control.

# Multi-Header Files indicates the total number of headers associated with files that have more than one header.

# Multi-Volume Files indicates how many files on the disk span two or more disks in a volume set.

# Directory Files indicates how many directory files there are on the disk.

# Zero Length Files indicates how many files have no blocks allocated to them.

# Files with Frags >= 2 indicates how many files have two or more fragments, meaning these files are fragmented (not contiguous).

Lost Blks/Extent Cache is the result of the following calculation:

Number of Usable Blocks - (Total Free Space Size + Total Size of all Files)

In other words, this value is derived from two arithmetic operations. The number of blocks known to be free is added to the number of blocks known to be in use. This sum is subtracted from the size of the disk to arrive at Lost Blks/Extent Cache. Therefore, this value represents all the blocks that are not accounted for. They are not in use and they are not available for use. Their status is unknown. On an active disk, this is not alarming. These blocks may be any combination of:

- blocks marked allocated that are not yet actually part of a file (due to space being allocated in anticipation of writing data);

- blocks held in another node's extent cache for this disk; or

- blocks that were added to this node's extent cache while the Disk Analysis Utility was running.

Total Split I/Os indicates how many I/O operations since system boot time have been split into two or more I/O operations to retrieve data split across two or more fragments of a file. This is the most meaningful indicator of the actual cost of fragmentation on your system. It is important to note, however, that this value is the total split I/Os for the entire system, not just for one disk. Therefore, defragmenting only one disk on a multi-disk system may only cause this value to decrease slightly. It may be necessary to defragment all the disks on the system to see this value reduced to zero (following the next reboot).

The table headed File Sizes Summary shows the number of files on the disk categorized by size in blocks. In the example, there are 335 one-to-two block files, 288 files from 3 to 6 blocks in size, and so on.

The table headed File Fragments Summary shows the number of files on the disk categorized by number of fragments. In the example, there are 9 zero-length files, 1510 files with one fragment each (contiguous), six files with two fragments each, and so on.

Note: The figures provided by the Disk Analysis Utility constitute a rolling snapshot of the state of the disk, so the figures can appear inconsistent at times.

Customized Analysis

Another, more direct approach, is this: Run some tests on your system to get some idea of how good or bad its performance is. If you don't have tools to do this, you can make some up. Time the system response. How long is it from the time a user hits the RETURN key after a command until the first characters are displayed on the screen in response to that command? How many users can log in before the system starts to bog down? How long does a major batch job take to complete? These are tests you can run on your own system that tell you how well your system is performing under your conditions at your site. Be sure to run these tests when the system is in use by everyday users. Otherwise, you get a distorted picture that reflects a laboratory environment instead of your real environment.

Then, once you have run these tests and documented the results, backup your disks. You probably do this once a week or so anyway, so it doesn't cost you any extra work if you time your testing to occur shortly before the backup.

Then, initialize each disk and restore the complete disk from backup. (Be very, very sure you have a valid, usable backup before initializing the disk because, once you do, the data on that disk is gone. The /VERIFY qualifier on the BACKUP command is useful for this purpose.) When you initialize the disk, be sure to use sensible values for such qualifiers as /CLUSTER_SIZE=, /DIRECTORIES= and /HEADERS=. Low values for these will cause your INDEXF.SYS file to be excessively fragmented and may contribute to fragmentation in other ways. (See Chapter 5 for recommendations on minimizing fragmentation by proper initialization of disks.)

After initializing each disk, restore the data from backup, making sure you use the /NOINITIALIZE qualifier on the BACKUP command to prevent BACKUP from overriding your initialization parameters. This results in disks that are, for the moment at least, free of fragmentation.

Now run your tests again, under conditions as similar to the first test as possible. Compare the results and see just how much fragmentation was costing your own site in terms of performance.

[PREVIOUS PAGE][NEXT PAGE][RETURN TO TOP][TABLE OF CONTENTS]