Progress
Database Administration
Guide and Reference


After-image I/O

After-imaging is an optional recovery mechanism that lets you recover data and transactions if a disk fails. AI files must be kept on separate disks from the database and BI files, so after-imaging I/O activity does not contribute to I/O activity on the disks where BI and database files are stored. However, after-imaging creates a significant amount of I/O that can affect performance. You can reduce the I/O impact of after-imaging by:

The following sections describe these options.

Monitoring AI Activity

Use operating system utilities to monitor the amount of I/O activity on the disk where the AI files reside.

Use the Progress PROMON utility to monitor specific AI activity. Use the R&D option AI Log Activity. Figure 14–11 shows a sample display.

Figure 14–11: PROMON AI Log Activity Display

Using an After-image Writer (Shared-memory Systems Only)

The AIW is a background process that writes AI buffers to disk soon after they are filled. If the AIW is working effectively, client and server processes rarely have to wait for a modified buffer to be written to disk.

The AI buffer pool is a circular chain of buffers. The database engine fills these buffers one at a time. The buffer that the engine fills at any time is the current output buffer. As each buffer gets filled, the engine continues around the chain. Each buffer in turn becomes the current output buffer. If the next buffer to write is already modified, the engine must wait while that buffer is written to disk.

You can run only one AIW process per database at a time. You must manually start the AIW, but you can start and stop an AIW at any time without shutting down the database. See "Starting Up and Shutting Down," for instructions on starting and stopping an AIW.

Increasing the -aibufs startup parameter increases the number of buffers in the after-image buffer pool, which increases the availability of empty buffers to client and server processes. Progress Software recommends you set the -aibufs parameter to 1.5 times the value of the Before-image Buffers (-bibufs) parameter. (For information on setting the -bibufs parameter, see the "Providing More BI Buffers" section.) Increasing -aibufs has no effect if the AIW is not running.

Increasing the AI Block Size

As with before-imaging, the database engine reads and writes information to the AI file in blocks. Increasing the size of AI blocks lets the engine read and write more AI data at one time. This can reduce I/O rates on disks where the AI files are located. In general, the default AI block size (8K) is sufficient for systems with low transaction rates. However, if performance monitoring indicates that AI writes are a performance bottleneck and your platform’s I/O subsystem can take advantage of larger writes, increasing the AI block size might improve performance. A larger AI block size might also improve performance for roll-forward recovery processing.

Follow these steps to change the AI block size:

  1. Use the PROSHUT command or the PROMON Shutdown a Database option to shut down the database.
  2. If after-imaging is enabled, disable it by entering the following command:
  3. rfutil db-name -C aimage end 
    

    For more specific information on this command, see the description of the RFUTIL utility AIMAGE END qualifier in Database Administration Utilities."

  4. Truncate the BI file to bring the database and BI files up to date and eliminate any need for database recovery. To do this, enter the following command:
  5. rfutil db-name -C truncate bi- [ -bi size | -biblocksize size ] 
    

    Typically, if you change the AI block size, you should also change the BI block size. If you have not already, you might want to use this command to do so. For more information on the BI block size, see the "Increasing the BI Block Size" section.

    For more details on this command, see the description of the PROUTIL utility in Database Administration Utilities."

  6. Change the AI block size by entering the following command:
  7. rfutil db-name -C aimage truncate -aiblocksize size [ -a aifilename ] 
    

    For size, specify the size of the AI read and write block in kilobytes. The minimum value allowed is the size of the database block. Valid values are 0, 1, 2, 4, 8, and 16. If you specify 0, Progress uses the default size (8K) for your operating system platform.

  8. Perform a full backup of the database.
  9. NOTE: You must perform this step because backups and AI files created before you change the AI block size are no longer valid with the new AI block size. For detailed backup instructions, see Backing Up a Database."

  10. Enable after-imaging by entering the following command:
  11. rfutil db-name -C aimage begin { buffered | unbuffered } -a ai-name 
    

    For more specific information on this command, see Database Administration Utilities."

  12. Restart the database and continue processing.

Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095