Salesforce

How to improve After Imaging (AI) performance

« Go Back

Information

 
TitleHow to improve After Imaging (AI) performance
URL NameP42864
Article Number000141155
EnvironmentProduct: Progress
Version: 9.x
Product: OpenEdge
Version: All supported versions
OS: All supported platforms
Question/Problem Description
After Image performance impact
How to improve After Imaging performance
 
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
It is difficult to make exact figures available on the performance impact of using ai, but although there is clearly some overhead involved, it is generally regarded as minimal.
 
If performance problems are suspected related to enabling After Imaging, monitoring should be performed with AI disabled and again with AI enabled using PROMON.

It is generally considered that the benefits of using After Imaging outweigh the minimal performance impact that After Imaging would introduce.

How to improve after image performance:
 
AI files should be kept on separate disks from the database and BI files, for reasons of recovery security and so that after-imaging I/O activity does not contribute to I/O activity on the disks where BI and database files are stored.

It is often possible to reduce the I/O impact of after-imaging by -
  1. Using an after-image writer (AIW)
  2. Increasing the AI block size
Using an After-image Writer (AIW):

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 modified but not yet written, the engine must wait while that buffer is written to disk.

Only one AIW process can be enabled per database when the Enterprise Database License is used. The AIW can be configured to be started when the database is managed under the AdminServer, started from the command line or added in scripts.
$   proaiw dbname
The AIW can be started and stopped at any time without shutting down the database through PROMON.

In addition, increasing the -aibufs database startup parameter increases the number of buffers in the after-image buffer pool, which increases the availability of empty ai buffers. Increasing -aibufs has little effect if the AIW process is not running and may further delay checkpoints otherwise.  Assuming that the -bibufs startup parameter has been sufficiently tuned, recommended setting for -aibufs are:
  • Prior to version 10.0 set the -aibufs parameter to 1.5 times the value of the Before-image Buffers (-bibufs) parameter.
  • For versions beginning with OpenEdge 10.0 and later, -aibufs should be set equal to -bibufs.
 How to decrease the bi busy buffer wait? 
 What is the recommended value for -aibufs?  

Increasing 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 with each I/O operation. 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 the platform’s I/O subsystem can take advantage of larger writes, increasing the AI block size might improve performance.

A larger AI block size can also improve performance for roll-forward recovery processing.

Follow these steps to change the AI block size and ensure the BI blocksize is the same size:

1. Use PROMON > 8. Shutdown a Database Option to shut down the database or use the PROSHUT command:
$   proshut -by dbname

2. If after-imaging is enabled, disable it:
$   rfutil dbname -C aimage end

3. Truncate the BI file to bring the database and BI files up to date and eliminate any need for database bi recovery.  At this same time change the BI block size to match that of the new AI block size.
$   proutil dbname -C truncate bi -G 0 -biblocksize 16
  • -biblocksize is in kilobytes.
  • Valid values are 0, 1, 2, 4, 8, and 16 where the minimum value allowed is the size of the database block.
  • When -biblocksize 0 is specified, the default size for the operating system platform is used.
4. Increase the AI blocksize:
$   rfutil dbname -C aimage truncate -aiblocksize 16

5. Take a new  baseline full backup of the database.
$   probkup dbname <outputDevice>

This step is mandatory because backups and AI files created before the change to the AI block size are no longer valid with the new AI block size for roll forward operations. The consequences are outlined in Article:
6. Enable after-imaging.
$   rfutil dbname -C aimage begin

7. Restart the database and continue processing.

8. Re-baseline the hotspare roll forward database from the new backup taken in Step 5.

Disabling AI should disable all related features (OER, AIMGT) which will need re-enabling. The AI Blocksize can indirectly be changed online which may result in it being differently sized to the size ai blocks were configured offline. For further discussion, refer to Article  How to change the after-image block size  
Workaround
Notes
Keyword Phrase
Last Modified Date11/20/2020 7:00 AM

Powered by