The bi file for which cluster position is active in a pre-grown bi cluster ring can be monitored online as follows as long as the bi file does not grow.
The number of closed cluster is the last bi cluster filled, or the "
bi-hi-water mark" within the cluster group on the first pass through the grown cluster group:
- If the bi file is monitored from when the database starts using the ActBILog._BiLog-ClstrClose VST, the number of closed bi clusters can be determined.
- ActBILog._BiLog-ClstrClose provides the Number of BI clusters filled and closed in preparation for reuse since the Database Broker started; it is an accumulative field
- The number of closed clusters therefore provides the last bi cluster filled, thus the "hi-water mark" within the cluster group, on the first pass through the grown cluster group.
The number of clusters pre-grown by bigrow is the number provided to the PROUTIL -C bigrow command, + 4 (the default cluster ring).
Alternatively, the Total number of clusters within the BI file can be calculated by dividing the logical bi size by the bi cluster size with information from _DbStatus:
- _DBStatus-BiSize which provides the logical size of the BI file
- _DbStatus-BiClSize which provides the size of the BI cluster.
Effectively: Bi Clusters are been reused when:
_ActBILog._BiLog-ClstrClose > (_DbStatus._DBStatus-BiSize / _DbStatus._DbStatus-BiClSize)
As long as
_DbStatus._DbStatus-BiClSize = pre-grown bi cluster ring, the current bigrow prior to database start is sufficient.
During runtime, the following will provide the current active cluster in the pre-grown bi cluster ring:
FOR EACH _ActBIlog NO-LOCK:
DISPLAY
_BiLog-ClstrClose COLON 32 LABEL "bi clusters filled and closed"
WITH FRAME biLoggingFrame TITLE "BI cluster status"
SIDE-LABELS THREE-D CENTERED.
END.
Once the end of the existing cluster group is reached, bi clusters from the beginning of the cluster ring will be re-used if there are no open transactions locking the cluster ring, negating the need for additional bi clusters to be added then or ever.
- The closed cluster count will continue to grow as bi clusters within the current cluster ring are re-used.
- Dividing the number of closed clusters by the number of clusters in the current ring will give a remainder that approximates the current active cluster in the cluster ring, unless additional bi clusters have been added to the initial pre-grown bi chain.
A bi file in the
re-use cluster phase, the phase after all cluster have been used once, will not grow until a cluster cannot be re-used because of an active transaction or insufficient ageing.
When that happens, the bi file grows as additional bi clusters are added to the cluster ring. Thus the bi file grows beyond the original group of cluster grown by the bigrow command.
When the database is shut down and restarted, the closed cluster count starts again at
Zero but the actual cluster is the bi cluster in the chain it last left off at.
When the database is restated, the number of closed clusters prior to shutdown plus the new number seen after startup will be the total that needs dividing by the pregrown cluster ring.
Unless the bi is truncated and re-grown with PROUTIL bigrow, in which case it will be from the beginning cluster. In a '
bigrow sizing exercise', it is therefore advisable to truncate the bi and bigrow between restarts.
Starting with Progress 9, the Virtual System Table
_AreaStatus can be used monitor if additional clusters are formatted within a BI as the
_AreaStatus-Hiwater value increases for
_AreaStatus-Areaname = "Primary Recovery Area".
Since OpenEdge 11.7, the following _Logging VST's were added:
_Logging-BIClusterHWM - BI Cluster HWM. This is different from the bi file size since not all space in the bi file is necessarily associated with a formatted and used cluster
_Logging-CurrBICluster - Current BI Cluster