Did this article resolve your question/issue?



How to size monitor and manage the Alternate Buffer Pool (-B2)

« Go Back


TitleHow to size monitor and manage the Alternate Buffer Pool (-B2)
URL Name000049583
Article Number000166645
EnvironmentProduct: OpenEdge
Version: 10.2B, 11.x
OS: All supported platforms
Other: Database, Alternate Buffer Pool
Question/Problem Description
How to size the Alternate Buffer Pool (-B2)?
What value does the database startup parameter -B2 need to be set to for the objects assigned?
How to monitor if -B2 LRU2 is enabled?
When Is LRU2 enabled or disabled?
How to disable LRU2 alternate buffer pool replacement policy online?
Can the size of the Alternate Buffer Pool be increased online?
How to change LRU2 force skips -LRU2SKIPS online?
Steps to Reproduce
Clarifying Information
Error Message
Defect/Enhancement Number
While there is no universally applicable right answer for what should be located in the secondary buffer pool, the point of using the secondary buffer pool is two fold:
  • Reduce disk i/o by keeping more data in memory
  • Reduce LRU chain, CPU and locking overhead as the secondary buffer pool does not use LRU2 chain when all the objects located in if fit completely.
Once the Alternate Buffer Pool assignments have been undertaken at the database object and/or Storage Area level, an Alternate Buffer Pool scoping exercise is needed.

Monitoring with _tablestat/_indexstat VST's is only reliable where object READS are concerned. Object WRITES for example in the Alternate Buffer Pool will reserve -B2 space and may result in the LRU2 being enabled if undersized.

Initial sizing of -B2 and therefore when the LRU2 mechanism is enabled, which one aims to prevent, needs to be undertaken in a controlled fashion:
  1. For LOBS, load lobs into a test database with a variable length database extent, then divide the file extent size on disk by the database blocksize.
  2. For Tables, either by loading each "Alternate Buffer Pool" table to a variable length database extent, then dividing the file extent size on disk by the database blocksize, or relying on _tablestat-OSread values after a full table scan.
  3. For Indexes, while _indexstat-OSread could similarly be used, it is easier to simply find the number of index blocks occupied through an IDXANALYS report. The number of blocks for a given index are reported in the "INDEX BLOCK SUMMARY FOR AREA" section under the BLOCKS header.
$  PROUTIL dbname -C idxanalys
There are 40941 index blocks for all the Customer indexes.
Table          Index  Fields Levels  Blocks    Size  % Util  Factor
  Comments         9       1      4   19250  133.1M    88.8     1.2
  CountryPost     10       2      3    6834   47.5M    89.2     1.2
  CustNum          8       1      3    5874   40.8M    89.2     1.2
  Name            11       1      3    4747   33.0M    89.2     1.2
  SalesRep        12       1      3    4236   29.4M    89.2     1.2

The same information (in more detail) can be obtained through the IDXBLOCK report: 
$ PROUTIL -C idxblock Customer.Name
There are 1 root, 11 nonleaf and 4735 leaf = 4747 index blocks for the Customer.Name index.
BlockSize = 8192  Block Capacity = 8100
               Number   Length      On  Length   Delete
                   of       of  Delete      of    Chain   Percent
DBKEY  Level  Entries  Entries   Chain    Size     Type  Utilized
11279      1       11      212       0       0     root         2
10818      2      458     7290       0       0  nonLeaf        90
10819      2      452     7282       0       0  nonLeaf        89
10365      2      454     7275       0       0  nonLeaf        89
 9910      2      441     7285       0       0  nonLeaf        89
 9468      2      445     7286       0       0  nonLeaf        89
 9022      2      454     7288       0       0  nonLeaf        89
56660      2      453     7280       0       0  nonLeaf        89
57114      2      448     7285       0       0  nonLeaf        89
57563      2      451     7286       0       0  nonLeaf        89
58015      2      455     7284       0       0  nonLeaf        89
58471      2      224     3582       0       0  nonLeaf        44
11277      3     1374     7290       0       0     leaf        90
11278      3     1249     7289       0       0     leaf        89
11276      3     1260     7290       0       0     leaf        90
58692      3     1246     7288       0       0     leaf        89
58693      3     1263     7289       0       0     leaf        89
58694      3      553     3245       0       0     leaf        40

In OpenEdge 11.6.3 the to facilitate the sizing of -B2, the PROUTIL -C viewB2 output includes the size (in blocks) of each object assigned to each storage pool and a total for the area.  This sizing include all blocks associated with each object - including free blocks.   If the -csoutput Option is used, this additional data are included.
Area "Customer/Order Area":8 - Primary Buffer Pool 

Object Enablement    Size     Type   Object Name 
-----------------  -------- -------  ------------ 
Default                   7  Master   Area.Control-Object:0 
Default                   8   Table   PUB.Customer:2 
Default                  16   Table   PUB.Order:4 
Default                  32   Table   PUB.Order-Line:5 
Default                   8   Index   PUB.Customer.Sales-Rep:16 
Default                   8   Index   PUB.Order.Cust-Order:21 
To avoid LRU2 enabled

The Alternate Buffer pool will require more blocks than the number of database objects assigned, when online utilities with Block Level Access, as opposed to block requests for specific objects are used. These need to be run with Private Buffers (-Bp)
  • probkup online dbname <backupvolume> -Bp 64
  • proutil dbname -C dbanalys -Bp 64
Consider increasing the database startup parameter -Bpmax 64 (default). The private buffer pool (-Bp) is an isolated portion of public buffer pool (-B), it is also limited to no more than 25% of the primary buffer pool (-B) value.  Client sessions may also be making use of using private buffers (-Bp, NumSeqBuffers)

For further detail refer to Article 000070193, Alternate Buffer requires more blocks than the number of database objects assigned  

Monitoring and Managing B2:

LRU2 enabled/disabled?
PROMON > R&D > 2 Activity Displays > 3 Buffer Cache 
  • "LRU2 replacement policy disabled"
  • "LRU2 replacement policy enabled"

Increase -B2 online

PROUTIL -C INCREASETO executable allows -B2 to be increased online.

Disable LRU2 online
PROMON > R&D > 4 Administrative Functions > 4 Adjust Latch Options > 3. Disable LRU2 alternate buffer pool replacement policy
PROMON > R&D > 4. Administrative Functions > 4. Adjust Latch Options > 5. Adjust LRU2 force skips
The change is not written out to the database lg file, but can be confirmed in:
PROMON > R&D > 1. Status Displays > 7. Buffer Cache

Status: Buffer Cache
Total buffers: 3002 
Hash table size: 887 
Used buffers: 1704 
Empty buffers: 1298 
On lru chain: 3001 
On lru2 chain: 0 
On apw queue: 0 
On ckp queue: 0 
Modified buffers: 6 
Marked for ckp: 0 
Last checkpoint number: 1 
LRU force skips: 50  
LRU2 force skips: 75 <-- lru2skips 
References to Other Documentation:

OpenEdge Data Management: Database Administration, Managing Performance, Alternate Buffer Pool

Progress Articles:

000031841, Sample ABL Code to determine how many buffers available in Alternate Buffer Pool  
000045605, PROMON shows "LRU2 replacement policy disabled" when OS reads GT -B2 value  

Last Modified Date2/6/2020 4:19 PM
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.