Enterprise Manager: File System > File Open Stats
Description
In BBj 16.0 and Higher, the File Open Stats viewer in the Enterprise Manager is a powerful tool used to delve deep into the way BBj searches the configured PREFIX to resolve file paths when using the OPEN verb.
With File Open Statistics enabled (it's disabled by default), BBj keeps a record of each file OPEN, how the PREFIX was resolved if the path was relative, the number of times the OPEN occurred on each path, the total aggregate time it took to perform those OPENs on each path, and the average time for each individual OPEN.
Using this information, the administrator can make informed decisions regarding the order of paths in the PREFIX and how that may improve overall performance of an application.
NOTE:
To minimize overhead, this information is stored in memory for the duration of a BBjServices run. Because this can consume a significant amount of memory, this feature should not be enabled for an extended period of time in a production environment.
Enabling File Open Stats
Before BBj will begin gathering the File Open Statistics, first enable it on the Settings page at:
YourServer->BBjServices->Settings
When this setting is enabled, BBj gathers the information about each OPEN call.
It is important to note that SQL operations are not included in this information because SQL operations do not use the prefix to resolve paths which means they always take the fastest possible path to open the data files.
Viewing and Analyzing File Open Stats
The File Open Stats viewer gives the administrator the necessary information to optimize the PREFIX and their applications. Open the viewer page at:
YourServer->File System->File Open Stats
The viewer shows a tree table containing the current gathered information for analysis. Note that the information is not automatically refreshed, so be sure to click the refresh button in the upper right corner to update the information present on the page.
The Clear Stats button clears the server side memory cache of the current information. This can be very useful to gather information from a known starting point.
Prefix / Item
This column shows something a little different for each level in the table.
Level 1: Shows the PREFIX in effect at the time of the OPEN call.
Level 2: Shows the full path to the directory resolved by the PREFIX when locating the file. If a file by the same name exists in multiple directories in the PREFIX, this will indicate which file it decided to open based on the order of the PREFIX.
Level 3: Shows the name of the file opened. See Original Open below for details.
Original Open
Shows the original OPEN path specified by the application. In the figure above, note that it shows part of the path because the OPEN call in the program looked something like this:
OPEN (chan)“data/ITEM”
If the OPEN call included a full path to the data file, it would show the full path in this column.
Count
Each level of the tree includes the total count from that level for all items below. For a PREFIX, it includes the total number of times that PREFIX was utilized. For a directory, it shows the total number of file opens that occurred within that directory. Finally, for files, it shows the total number of times that the file was opened with the given Original Open value.
Total (ms)
This information corresponds to the Count described above except it shows the total amount of time spent performing the OPEN operations in milliseconds.
Avg (ms)
The average time for each operation at the given level. Use this information to get an estimate of how long each individual OPEN operation requires within the application.
Optimizing the PREFIX
If after analyzing the File Open Stats the administrator determines the PREFIX may not ordered in the most optimal way, care should be taken when making changes. Changes to the PREFIX order can affect which files will be opened by a given call as well as the overall performance. Make sure to thoroughly test any PREFIX changes before deploying those configuration changes to the end users.
After making any adjustments to the PREFIX, be sure to clear the File Open Stats information before analyzing the effect the PREFIX changes have on performance. This ensures the average times shown are consistent with the new PREFIX.