Previous | Contents | Index |
17.1 Description
The fragmentation prevention feature prevents disk and file
fragmentation. Preventing disk and file fragmentation speeds up file
access by reducing window turns and split I/O transfers. The
fragmentation prevention feature works exceptionally well on files such
as:
17.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.
Fragmentation prevention intercepts file open, creation and extension requests. The parameters given in each request are examined. If OpenVMS system default values are given, and fragmentation prevention determines that the default values would cause the file to be fragmented, fragmentation prevention 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, fragmentation prevention will intercept and optimize thousands of file create and extend requests per day!
To measure the effects of the fragmentation prevention feature, see Chapter 19, Benchmarking the Fragmentation Prevention Feature. |
17.3 Components
Fragmentation prevention 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 fragmentation prevention on a per-process basis.
The CDSERVER process watches for newly-created processes and enables
fragmentation prevention for them.
17.4 Intercepting File System Requests
The fragmentation prevention start up procedure installs the CLNdriver
and also starts up the fragmentation prevention 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 fragmentation prevention intercepts an XQP request, the request is examined. If needed, the request is modified to:
By default, the fragmentation prevention feature is enabled for all processes. In some cases you may wish to enable or disable the fragmentation prevention feature on a per-process basis.
The TTI_DLB:CDCONTROL procedure enables or disables fragmentation prevention on a per-process basis.
For example, to disable fragmentation prevention for your process, the
following command would be used:
$ @TTI_DLB:CDCONTROL DISABLE
The CDCONTROL procedure uses the CDCONTROL image. In order to execute this image, you must have the following privileges: NETMBX, TMPMBX |
18.1 Command Overview
Fragmentation prevention can be ENABLED or
DISABLED on a per-process basis. In addition, there is
a SHOW command.
$ @TTI_DLB:CDCONTROL ENABLE $ @TTI_DLB:CDCONTROL DISABLE $ @TTI_DLB:CDCONTROL SHOW |
A successful ENABLE or DISABLE will display a message on the terminal indicating the success of the requested operation.
18.2 The SHOW Command
If you need to see if fragmentation prevention has been enabled for the
current process, use the SHOW command:
Example 18-1 Using the SHOW Command |
---|
$ @TTI_DLB:CDCONTROL SHOW Dynamic Load Balancer Plus (Version 4.1) - CDcontrol Copyright (c) 1991-1996 Touch Technologies, Inc. CD is ENABLED for your process. ...Modified file allocation requests: 13 |
18.2.1 Showing Fragmentation Prevention Usage System-wide
To display the effects of fragmentation prevention system-wide, use the
SHOW/ALL option.
Example 18-2 Using the SHOW/ALL Command |
---|
$ @TTI_DLB:CDCONTROL SHOW/ALL Dynamic Load Balancer Plus (Version 4.1) - CDcontrol Copyright (c) 1991-1996 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 fragmentation prevention has optimized since it was started on this node. In order to measure the impact of fragmentation prevention on your system, you can check the percentage of all requests that fragmentation prevention modified.
In the above example, 92% of the file create and extend requests were found to be nonoptimal! Fragmentation prevention modified these nonoptimal requests, for a total of 486 modifications.
Without fragmentation prevention, these requests would have resulted in fragmented files, higher I/O overhead and poorer response times.
The fragmentation prevention 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 fragmentation prevention, is a Benchmark procedure. By using the supplied procedure, you can measure the effectiveness of fragmentation prevention on your system. Also, the CDCONTROL SHOW/ALL command can be used to show the effects of fragmentation prevention system-wide (see Section 18.2.1, Showing Fragmentation Prevention Usage System-wide).
19.1 The Benchmark Procedure
The supplied Benchmark procedure performs the following tasks:
Benchmark symbols are used to perform specific steps in the benchmarking procedure.
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 |
19.2 Using the Benchmark Procedure
When you use the Benchmark procedure, you will:
19.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_DLB:CD_BENCHSET |
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 19-1 Creating and Extending without fragmentation prevention Enabled |
---|
$ @tti_dlb: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_dlb:cd_do crfile " $ exfile == "@tti_dlb:cd_do exfile " $ frags == "@tti_dlb: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 $ |
You can now enable fragmentation prevention using the command:
$ @TTI_DLB: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 fragmentation prevention enabled.
Example 19-2 Creating and Extending with fragmentation prevention Enabled |
---|
$ @tti_dlb:cdcontrol enable Dynamic Load Balancer Plus (Version 4.1) - CDcontrol Copyright (c) 1991-1996 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 fragmentation prevention enabled, the created and extended file contains far fewer fragments than the file created without using fragmentation prevention. Fewer fragments means fewer I/Os and fewer window-turns. In most cases, fragmentation prevention prevents 90 percent or more of file fragmentation. The reduced fragmentation, in turn, reduces file I/Os.
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.) |
19.3 Benchmark Cleanup
When you have finished benchmarking fragmentation prevention, the
temporary files created by the benchmark can be deleted by entering the
command:
$ @TTI_DLB:CD_DO CLEANUP |
This section describes the DLB Plus menus and the various items on each of the menus.
A.1 The DLB Plus Menus
A.1.1 Master Menu
The Master Menu contains the items that sample I/O data, select nodes
to analyze, bring up the reports and graphs menus and set up batch
processes. The Master Menu appears as follows:
Example A-1 DLB Plus Master Menu |
---|
DLB Plus Dynamic Load Balancer PLUS 01-Sep-1995 +-------------------------------Master Menu-------------------------------+ | | | Dynamic Load Balancing Reports and Graphs | | DISPLAY DLB Display Utility SREPORTS Summary Reports... | | STATUS DLB Status Utility DREPORTS Detail Reports... | | GRAPHS Analysis Graphs... | | I/O Sampling SCAN Batch I/O Scan | | SAMPLE Sample I/Os and Locks | | CONS Consolidate Sample Data Batch Procedures | | SELECT Select a Data Sample BATCH Set Up Batch Stream | | LIVE Live Lock Analysis... SUBMIT Submit Batch Stream | | AUTO Automatic Sampling CANCEL Cancel Batch Set Up | | | | Miscellaneous | | SYSTEM VMS System Commands | | EXIT EXIT DLB Plus | +-------------------------------------------------------------------------+ EXIT = Exit \ = Back HELP = Help |
A.1.2 Summary Analysis Reports Menu
The Master Menu SREPORTS item displays the Summary
Analysis Reports menu.
The summary reports on the Summary Analysis Reports menu are created from the I/O and lock information collected when the selected node was last sampled.
The Summary Analysis Reports menu appears as follows:
Example A-2 Summary Analysis Reports Menu |
---|
DLB Plus Dynamic Load Balancer PLUS 01-Sep-1995 +-----------Summary Analysis Reports------------+ | | | PERFORMANCE REPORTS | | RSHOT Hot File Analysis (High I/Os) | | RSCACHE Suggested Files for Data Caching | | RSFRAG File Fragmentation Analysis | | RSDEVICE I/O Analysis Summary by Device | | | | PLANNING REPORTS | | RSIMAGE I/O Analysis Summary by Image | | RSUSER I/O Analysis Summary by User | | RSPID I/O Analysis Summary by PID | +-----------------------------------------------+ EXIT = Exit \ = Back HELP = Help |
A.1.3 Detail Analysis Reports Menu
The Master Menu DREPORTS item displays the Detail
Analysis Reports menu.
The reports on the Detail Analysis Reports menu are created from the I/O and lock information collected when the selected node was last sampled.
The Detail Analysis Reports menu appears as follows:
Example A-3 Detail Analysis Reports Menu |
---|
DLB Plus Dynamic Load Balancer PLUS 01-Sep-1995 +----------Detail Analysis Reports-----------+ | | | DETAIL REPORTS | | RDIMAGE I/O Analysis Detail by Image | | RDUSER I/O Analysis Detail by User | | RDDEVICE I/O Analysis Detail by Device | | RDPID I/O Analysis Detail by PID | | RDFILE I/O Analysis Detail by File | +--------------------------------------------+ EXIT = Exit \ = Back HELP = Help |
A.1.4 Analysis Graphs Menu
The Master Menu GRAPHS item displays the Analysis
Graphs menu.
The graphs on the Analysis Graphs menu are created from the I/O information collected when the selected node was last sampled.
The Analysis Graphs menu appears as follows:
Example A-4 Analysis Graphs Menu |
---|
DLB Plus Dynamic Load Balancer PLUS 01-Sep-1995 +-----------------Analysis Graphs-----------------+ | | | GRAPHS OF I/O COUNTS | | GUSER I/O Analysis Summary by User | | GIMAGE I/O Analysis Summary by Image | | | | GRAPHS OF I/O RATES | | GRUSER I/O Rate Analysis Summary by User | | GRIMAGE I/O Rate Analysis Summary by Image | +-------------------------------------------------+ EXIT = Exit \ = Back HELP = Help |
Previous | Next | Contents | Index |