OPTIMUM-FRAME-SIZE

Processes file statistics and displays the result of changing the database's frame size. This can be used to help decide the optimum frame size for the database.

Syntax

OPTIMUM-FRAME-SIZE statFileSection {account {fileNamePrefix}} {(frameSize}

OPTIMUM-FRAME-SIZE {account {fileNamePrefix}} (L{frameSize}

Syntax Elements

statFileSectionThe name of a section in the file STAT-FILE that will provide the file statistics. If specifying this parameter, do not include the L option.

account Optional. The name of an account to process. If omitted, the entire database is processed.

fileNamePrefix Optional. The first few characters of the required file names. All files in the specified account that have names beginning with these characters will be processed.

Options

L Use the STAT-FILE section from the last save (/SYSFILES LAST.SAVE). Use this option instead of specifying statFileSection.

frameSize The frame size to try; must be one of 2, 4 or 8.

Restrictions

Only available in the SYSMAN account. SYS2 privileges required.

Comments

If the frame size option is omitted, OPTIMUM-FRAME-SIZE displays the effect on the selected files of changing the frame size from 1 kilobyte to 2 kilobytes, 4 kilobytes and 8 kilobytes.

If a frame size is specified, OPTIMUM-FRAME-SIZE displays the effect on the selected files of restoring them with the specified frame size. For each file, the number of out-of-group items that would be moved in-group are shown, together with the percentage of the total number of items in the file that this represents. Only files where more than 20% of out-of-group items would move in-group are listed. The listing is sorted by the number of in-group items in the file at the new modulo.

Note

Indexes are not processed - they are always created with a node size optimal for the current frame size.

The results can be used to help you decide whether changing the frame size would improve the performance of your database.

If you decide to change the frame size of the database, proceed as follows:

  1. Use the OPTIMUM-MODULO command to calculate the optimum modulo for one or more files, based on the frame size you have chosen; the resizing parameters for those files will be set to the calculated values.
  2. Save the database using the FILE-SAVE command.
  3. Rebuild the database by using mkdbase with the -r and -F options. The -F option allows you to specify the new frame size.
  4. If you want the restored files to be automatically sized, ensure that the AutoFileSize database configuration parameter is set to 1. Alternatively, run the AFS-SET command.
  5. Restore the saved data with ACCOUNT-RESTORE.

    Note

    Restoring the FILE-SAVE will be slow, because almost every file will be resized.

Examples

Display the effects of using different frame sizes on the files in account TRAVCO, using the statistics from the last save:

:OPTIMUM-FRAME-SIZE TRAVCO (L
 Select STAT-FILE,PORT401 WITH *A1 = "TRAVCO*]"
1,676  Items selected.
 Processing
2K FRAMES - Moved  80% of 40,699,469 OG items (  5% of selected items)
4K FRAMES - Moved  96% of 40,699,469 OG items (  6% of selected items)
8K FRAMES - Moved  99% of 40,699,469 OG items (  6% of selected items)

Display the result of changing the frame size of a database to 4 kilobytes:

:OPTIMUM-FRAME-SIZE NFM (4
 Select STAT-FILE,NFM WITH 4K GT 1K BY-DSND 4K
 
291  Items selected.
 Processing
/NFM.AUX14/PIECE.LOCATION,PIECE.LOCATION
                              Moved  93% of  5487012 OG items  23% of file
/HIST.AUX2/INVOICE.HOLD,INVOICE.HOLD
                              Moved 100% of 13766282 OG items  79% of file
/HIST.AUX8/STHI,STHI          Moved 100% of  3801681 OG items  29% of file
/HIST.AUX22/ORDER.AUDIT,ORDER.AUDIT
                              Moved  85% of  1823639 OG items  23% of file
/HIST.AUX27/ORDER.CONVERS,ORDER.CONVERS
                              Moved  95% of  1058785 OG items  26% of file
/HIST.AUX32/INVH.ARCH.A,INVH.ARCH.A
                              Moved 100% of  1998108 OG items  56% of file
/HIST.AUX17/REVOLVING.PERFORMANCE,REVOLVING.PERFORMANCE
                              Moved  92% of  1218034 OG items  41% of file
/NFM.AUX5/CUST.CHG.AUDIT,CUST.CHG.AUDIT
                              Moved  98% of   424029 OG items  31% of file
/HIST.AUX13/VOUCHER.ARCHIVE,VOUCHER.ARCHIVE
                              Moved  99% of   381677 OG items  35% of file
/HIST.AUX9/POHD.HISTORY,POHD.HISTORY
                              Moved  80% of  1118372 OG items  71% of file
/NFM.AUX9/PAYP,PAYP           Moved 100% of   396899 OG items  71% of file
/NFM.AUX30/BUREAU.REPORTS,BUREAU.REPORTS
                              Moved  61% of   749042 OG items  60% of file

See Also

OPTIMUM-MODULO.