This section describes how to optimize RTView Display Server and Display Servlet performance using Display Sharing.
Display Server and Display Servlet performance can be improved by sharing displays among clients. This is helpful in an environment where many clients typically view the same display simultaneously.
There are “Limitations” on the features that can be used on a shared display, so displays to be shared should be selected carefully.
To configure Display Sharing, you specify the displays to be shared and the substitutions, if any, to be applied when the display is opened, in the DISPLAYSERVER.ini file. See “Display Server Configuration” for more information.
This section contains the following:
§ “Configuring Display Sharing” on page 1174
§ “Monitoring Display Sharing” on page 1175
Normally, the Display Server loads a copy of a display for each and every client that requests it. And the Display Servlet normally then generates the Web page content (for example, HTML, images and JavaScript) for each and every client.
When Display Sharing is enabled, the Display Server instead loads a single copy of a display for all of the clients to view. The Display Servlet then generates the Web page content once, stores the content, and reuses that content for all other client requests for the same display. The Display Servlet keeps and uses that content until the time interval specified for the SharedDisplayRefreshInterval property in the rtvdisplay.properties file (located in the servlets\rtvdisplay directory). By default, the interval is 15 seconds.
Display Sharing is used only for client requests that match both the display name and the substitutions, if any, that are listed in the DISPLAYSERVER.ini file. See “Display Server Configuration” for more information.
If the Display Servlet receives a client request for a shared display after the interval has expired, the Display Servlet checks with the Display Server to see if the stored content is "stale". That is, if any data has been applied to the display since the Display Servlet generated the content. If it is not stale the Display Servlet stores the content for another interval. If it is stale, the Display Servlet gets the updated display from the Display Server and regenerates the content. The Display Servlet purges the stored content for shared displays if it has not been accessed within one shared display refresh interval, plus one minute.
The maximum number of shared displays for which the Display Servlet stores content is determined by the MaxSharedDisplays property. By default, the value is 10. Best practices dictate that the MaxSharedDisplays property be set to a value at least as large as the number of shared_display entries in DISPLAYSERVER.ini.
The JMX Mbean operation RTViewDisplayServer.Manager.clearDisplayCache can be used to clear and reload all shared displays in the Display Server, and to clear all page content for shared displays currently stored in the Display Servlet.
When a client requests a display name that does not match a shared display and substitution entry in the DISPLAYSERVER.ini file, the request is processed using the normal process.
Again, the performance benefit of display sharing is obtained only if multiple clients request the same shared display within a single shared display retention interval.
To configure Display Sharing, add the name of the display (.rtv) file and the substitutions, if any, to be applied when the display is opened, to the DISPLAYSERVER.ini file. See “Display Server Configuration” for more information.
To configure a shared display, perform the following steps.
1. Add the shared_display property to the DISPLAYSERVER.ini file as follows:
shared_display <filename> [substitutions]
Where:
<filename> is the name of a display (.rtv) file to share.
[substitutions] is an optional list of substitution string:value pairs, separated by spaces. If a substitution value contains spaces it must be enclosed in single quotes.
For example:
shared_display navtop.rtv
shared_display summary.rtv $region:East
shared_display summary.rtv $region:West
shared_display summary.rtv $region:'East and West'
2. Optionally, add the SharedDisplayRefreshInterval property to the rtvdisplay.properties file (located in the servlets\rtvdisplay directory). See “Display Servlet” for more information. By default, the interval is 15 seconds. (This step is only required if you need to change the default setting.) For example:
SharedDisplayRefreshInterval=15
3. Optionally, specify the maximum number of shared displays for which the Display Servlet stores content by adding the MaxSharedDisplays property to the rtvdisplay.properties file. See “Display Servlet” for more information. By default, the value is 10. (This step is only required if you need to change the default setting.) For example:
MaxSharedDisplays=10
Note: Best practices dictate that the MaxSharedDisplays property be set to a value at least as large as the number of shared_display entries in the DISPLAYSERVER.ini file.
To view performance metrics about requests for shared displays and status information from the Display Servlet, open the servletstatus.jsp page in a browser: http://localhost:8068/rtvdisplay/servletstatus.jsp.
The servletstatus.jsp page contains the following information:
Value |
Description |
Display Server |
The Display Server hostname and port number. |
Backup Server |
The hostname and port number of the backup Display Server, if one exists. |
Connection Pool Size |
The value of the DisplayServerConnectionPool property in the rtvdisplay.properties file. The DisplayServerConnectionPool property specifies the maximum number of simultaneous connections the Display Servlet makes to the Display Server and, consequently, determines the maximum number of display requests the Display Server processes simultaneously. |
Timeout |
The amount of time, in seconds, for a query to timeout. |
Refresh |
The value of the DefaultRefreshInterval property in the rtvdisplay.properties file. The DefaultRefreshInterval property specifies the refresh rate of the Thin Client. |
Login |
Specifies whether login is enabled. |
Request Count |
The total number of client display requests received. |
Connection |
The current connection from the Display Servlet to the Display Server. |
Started |
The time that the Display Servlet started. |
Shared Display Refresh |
The value of the SharedDisplayRefreshInterval property, in seconds. |
Shared Display Hits/Tries |
The amount of client requests for a page that is satisfied by Display Sharing, in percent (%). That is, the number of client requests satisfied by stored content for a shared display divided by the total number of requests for a display. A high amount indicates that display sharing is effective, a low amount indicates that it is not effective for the requests being received. |
Shared Display Updates |
The number of times the Display Servlet has updated shared display content. |
Shared Displays |
The current number of shared displays divided by the value of the MaxSharedDisplays property. This is followed by a scrolled list of the shared displays currently loaded in the Display Servlet. |
The following is an example of data:
display server: localhost: 3279
backup server: null
connection pool size: 10
timeout: 15 sec
refresh: 15 sec
login: on
request count: 437
connection: localhost:3279
started: 02/04/11 14:14:33.17
shared display refresh:: 15 sec
shared display hits/tries: 222/437 (50%)
shared display updates: 88
shared displays: 3 / 10
blank
nav1
rbt1+$plants:*
See “Display Servlet” for more information.
In the Thin Client, you can determine whether a shared display is being viewed. Right-click in the display and select Status from the popup menu, then check the Panel ID string shown in the Thin Client Status window. For a shared display the Panel ID string begins with preload.
§ The following features should not be used on shared displays, because these features can change the state of a display for each user.
– A resizeMode of Layout or Scale.
– Scrolling on the following objects: obj_trendgraph02, obj_bargraph, obj_objectgrid.
– Paging mode on obj_table02.
– User-specific substitutions (for example, $rtvuser).
– Role-specific substitutions (for example, $rtvrole).
§ The substitutions in a client request for a shared display must exactly match those specified in the entry in DISPLAYSERVER.ini, including the order of the substitutions, otherwise the request is processed as a non-shared display.
§ All shared displays share the same set of global variables and functions. Therefore, if a user changes the value of a shared display global variable, all users viewing any shared display will see that value change--including users on separate machines. Whereas, for all non-shared displays, the Display Server uses a separate set of global variables that it maintains for each browser session. Therefore, if a user changes the value of a global variable no other non-shared displays are affected.
§ A drilldown to a shared display behaves as though the Remove Existing Substitutions box was checked in the Drill Down Properties dialog. This is necessary so that substitutions in the source display are not included in the drilldown substitutions, which might prevent them from matching the shared display substitutions.