Salesforce

PROMON shows "LRU2 replacement policy disabled" when OS reads GT -B2 value

« Go Back

Information

 
TitlePROMON shows "LRU2 replacement policy disabled" when OS reads GT -B2 value
URL Name000045605
Article Number000192734
EnvironmentProduct: OpenEdge
Version: 10.2B07, 10.2B08, 11.2.x, 11.3.x
OS: All Supported Platforms
Question/Problem Description
PROMON > R&D > 2 > 3 Buffer Cache is not showing that the LRU2 replacement policy is enabled after a TABLE-SCAN while also showing that the "Alternate Buffer Pool", "O/S reads" are greater than the current -B2 value.
Querying _tablestat VST confirms that _tablestat-OSread are higher than the value that -B2 is set to.
When a full table read is repeated, PROMON "O/S reads" double.
When the database is started with a larger -B2 value to accommodate the assigned database objects, a full table query run multiple times shows the same value for PROMON "O/S reads".
Steps to Reproduce
Clarifying Information
Alternate Buffer Pool set for database objects (Table, Index, LOBS) through Database Administration.

PROMON > R&D > 4 > 4. Adjust Latch Options, shows that the LRU2 switch is set to "ENABLE" confirming that the LRU2 mechanism is not enabled:
"3. Enable LRU2 alternate buffer pool replacement policy".

Monitoring if the LRU2 chain is enabled cannot be reliably achieved through PROMON.

Private Buffers are not in use (-Bp)
PROBKUP online has not been run.
Error Message
Defect NumberDefect PSC00285575
Enhancement Number
Cause
When the Alternate Buffer pool is assigned at the database OBJECT level (which can only be done for Type II Storage Area objects), then PROMON > R&D > 2 > 3 Buffer Cache correctly reports: "LRU2 replacement policy disabled".
 
This is not PROMON a display problem.  The display is correctly reporting that the lru2 mechanism is not enabled even though it should be when buffers assigned to the Alternate Buffer Pool exceed the current -B2 value.
 
With the lru2 mechanism not enabled, this creates instead a FIFO replacement policy which may have adverse performance effects as the oldest buffers or "first read in buffers" will be evicted off the LRU2 chain rather than the least recently used buffers. This is observed by the fact that when a full table read that is assigned to the Alternate Buffer Pool (-B2) is repeated, PROMON "O/S reads" double.

Resolution
Upgrade to OpenEdge 11.3.2 or later. Where the LRU2 mechanism is appropriately enabled when the Alternate Buffer Pool is assigned at the database objects level.
Workaround
Workaround 1:

If there is a stated requirement to monitor if the LRU2 mechanism has been enabled in production, then the Alternate Buffer Pool assignments will need to be unassigned at the Database Object level (through Database Administration) and re-assigned at the Storage Area through the command line:
$ proutil dbname -C enableB2 <storage_area_name>.
This may also involve moving the required Alternate Buffer Pool objects to Storage Areas that only contain -B2 assignment objects. By having Objects assigned at the Storage Area level, the LRU2 mechanism will be correctly reported when enabled and the LRU2 mechanism will be properly initialized when -B2 is exceeded

Workaround 2:

Rely on the correct initial Alternate Buffer Pool sizing exercise. Monitoring with _tablestat/_indexstat 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.

Initial sizing of the LRU2 size needs to be undertaken in a controlled fashion.

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.

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 

Example:

$  PROUTIL dbname -C idxanalys

There are 7 index blocks for the Customer.Name index.

INDEX BLOCK SUMMARY FOR AREA "Cust_Index" : 10 
------------------------------------------------------- 
Table Index Fields Levels Blocks Size % Util Factor 
PUB.Customer 
Name     15      1      2      7  22.5K 80.8    1.4 


The same information (in more detail) can be obtained through the IDXBLOCK report:

Example:  

$ PROUTIL -C idxblock Customer.Name

There are 7 index blocks for the Customer.Name index.

BlockSize = 4096  Block Capacity = 4004
                Number  Length  On      Length  Delete
                of      of      Delete  of      Chain           Percent
DBKEY   Level   Entries Entries Chain   Size    Type            Utilized
44      1       6       68      0       0       root            1
46      2       196     3970    0       0       leaf            99
45      2       183     3982    0       0       leaf            99
112     2       189     4001    0       0       leaf            99
113     2       185     3993    0       0       leaf            99
120     2       232     3998    0       0       leaf            99
121     2       132     2966    0       0       leaf            74
 
Notes
Keyword Phrase
Last Modified Date2/11/2014 8:40 AM

Powered by