Salesforce

How much memory does a BI or AI buffer use?

« Go Back

Information

 
TitleHow much memory does a BI or AI buffer use?
URL Name000001428
Article Number000138561
EnvironmentProduct: Progress
Version: 7.x, 8.x, 9.x
Product: OpenEdge
Version: 10.x, 11.x, 12.x
OS: All supported platforms
Question/Problem Description
How much memory does a BI buffer or AI buffer use?
How is memory allocated for -bibufs and -aibufs database startup parameters?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution

How is memory allocated for -bibufs and -aibufs  

When the Database Manager allocates shared-memory at startup, the -bibufs and -aibufs database startup parameter values set the number of bi and ai buffers respectively.
  • Each Before Image (BI) or After Image (AI) buffer uses 16 KB of memory, irrespective of the -biblocksize or -aiblocksize
  • Each buffer also uses 100 bytes of additional memory to store other Progress internal information that is associated with the buffer.
Pre-Progress 9.x (Version 7 and 8); additional memory allocated: (16 * [ai | bi]blocksize)
The database engine utilizes only: the number of bi buffers * the actual [ ai | bi] blocksize. 

Example: Total memory allocated for the ai/bi buffers
  • -bibufs 50 ==  805 KB == ((16,384*50)+(50*100))
  • -aibufs 64 ==  1030 KB == ((16,384*64)+(64*100))

Default -bibufs and -aibufs 

When unspecified, default bi buffer, ai buffer values:
pre-Progress 9.x: -bibufs = 5 ; -aibufs = 1 ; [ allocated 128 KB, used 40 KB ; 4KB aiblocksize, biblocksize]
Progress 9.x: -bibufs = 5 ; -aibufs = 5 ; [ 80 KB, 161 KB combined ]
OpenEdge 10.x and 11.x: -bibufs = 20 ; -aibufs = 20 ; [ 322 KB, 644 KB combined ]
OpenEdge 12: -bibufs = 64 ; -aibufs = 64 ; [ 1030 KB, 2061 KB combined ]

Finding the current -bibufs or -aibufs configured

1. Review the database startup parameters for -bibufs or -aibufs used when starting the database:
  • The database startup script and optionally the .pf used: -bibufs, -aibufs
  • When managed by the AdminServer: <dlc>\conmgr.properties file: beforeimagebuffers, afterimagebuffers
If these are absent, then the defaults listed above are in use.

2. Progress records this information in the database log file (dbname.lg) as follows:
 
BROKER  0: (4252)  Number of Before-Image Buffers (-bibufs): 64
BROKER  0: (4256)  Number of After-Image Buffers (-aibufs): 64

3. Using PROMON

While the database is running shared-memory, from a PROENV command prompt, start a PROMON session and select "6.  Shared Resources" from the menu presented. The current values are presented in the menu lines below:
          
Number of before image buffers (-bibufs): 50
Number of after image buffers (-aibufs): 64

4.  ABL query using VST _DbParams

Since OpenEdge 11.5, the _DbParams VST should be used instead of the _Startup VST from previous versions. The _Startup VST has been removed from the OpenEdge Database in OpenEdge 12.
 
DEFINE VARIABLE cPmsgs AS CHARACTER NO-UNDO INITIAL '4252,4256'.
DEFINE VARIABLE ix AS INT NO-UNDO. 
DEFINE VARIABLE ii AS INT64 NO-UNDO.

DEFINE TEMP-TABLE ttDBParams NO-UNDO LIKE _DbParams.

DO ii = 1 TO NUM-ENTRIES(cPmsgs):
    ASSIGN ix = INTEGER(entry(ii,cPmsgs)). 
    FOR FIRST _DbParams NO-LOCK WHERE _DbParams._DbParams-Msg-Num =  ix: 
    IF AVAILABLE _DbParams THEN
        CREATE ttDBParams.
        BUFFER-COPY _DBParams TO ttDBParams.    
    END.
END.

FOR EACH ttDBParams:
DISPLAY 
ttDBParams._DbParams-Name   
((((INTEGER(STRING(_DbParams._DbParams-value)) * 16384 )) + 
((INTEGER(STRING(_DbParams._DbParams-value)) * 100 ))) / 1024) SKIP.

END.


Tuning -bibufs and -aibufs  

  • The default values suffice as a starting point, but each application environment will have it's ideal value above which adding more is not going to make any difference and will only waste memory. Any value above 100 is not useful and should be reduced.
  • Use the PROMON utility to monitor the % BI Buf Waits and % AI Buf Waits respectively:
promon > R&D > 2. Activity Displays > 1. Summary
  • Use the PROMON utility to monitor specific BI and AI activity:
promon > R&D > 2. Activity Displays > 5. BI Log [ Busy buffer waits ; Empty buffer waits ]
promon > R&D > 2. Activity Displays > 6. AI Log [ Busy buffer waits ; Buffer not avail ]
  • Operating System utilities to monitor the amount of I/O activity on the disk where these BI and AI files reside
When after-imaging is enabled and especially when OpenEdge Replication is used:
  • The AI Blocksize must equal the BI blocksize, otherwise any gain from increasing the number of ai buffers is negligible. 
  • Progress recommends -aibufs are set to a value equal to the value of the tuned BI (-bibufs) parameter on the source database, otherwise -aibufs are not needed and the default can be ignored.
  • Fine-tuning may find "Partial writes" when data is written to the BI file before the BI buffer is full. This is due to the fact that before-image (BI) notes must be flushed before the after-image (AI) note is flushed. While the transaction data stored in both AI and BI buffers is nearly identical, marginally increasing aibufs may be beneficial for this reason.



 
Workaround
Notes
Keyword Phrase
Last Modified Date11/20/2020 6:53 AM

Powered by