Using the PoolDiagnostics.jsp tool to tune pooled resources for SASĀ® Real-Time Decision Manager


PoolDiagnostics.jsp is a tool that is available with a hot fix for both SAS® Decision Services 5.5 M1 and 6.1. (See SAS Note 51957 "SAS Real-Time Decision Manager does not provide tuning information for pooled resources without a hot fix.") These releases are contained in SAS Real-Time Decision Manager 5.41 M1 and 5.6, respectively. This tool is also available without a hot fix in subsequent releases of SAS Decision Services (6.3 and 6.4) and SAS Real-Time Decision Manager (6.3 and 6.4).  Note that due to security concerns, beginning with SAS Decision Services 6.4 M1 (SAS Real-Time Decision Manager 6.5), PoolDiagnostics.jsp is only available from SAS Professional Services.

Contents


 

Background


 

SAS Decision Services uses pools of resources such as threads and database connections. The size and persistence parameters for these pools need to be configured in order to provide the best throughput. PoolDiagnostics.jsp is a web page on the SAS Decision Services Engine web application that displays the status of the primary thread pool and the JDBC Connection pools for that engine. Based on the data that is displayed, you can adjust the pool configuration for the best performance. Information on how to adjust the pool configuration is available in the SAS Decision Services Administrators Guide. This information is also available in the most recent version of the SAS Real-Time Decision Manager Administrators Guide.

There are two types of pools that the PoolDiagnostics.jsp page monitors.

  1. Activity and Subflow Thread Pool: The SAS Decision Service Engine is a web application that executes decision flows (campaigns) that call out to other subflows and activities. Each initial incoming request (event) is executed in the application server's servlet thread pool. However, the calls to sub flows and activities are executed on threads borrowed from the primary thread pool. If there are not enough threads available in this pool, there will be contention for threads across requests. When this contention occurs, the overall system throughput will fall. If the top–level flows calls out to subflows and activities concurrently, then you might need to increase the size of this thread pool to accommodate the number of concurrent requests.
  2. JDBC Connection Pools: SAS Decision Services uses Apache DBCP connection pools to connect to resources that use JDBC. Currently, the resources that use JDBC are the SAS® Federation Server and the databases that provide data for the flows. SAS Federation Server is used by SAS® activities (SAS process nodes) and scoring nodes to execute DS2 code. Database data marts are used by the GeneralIO activity (data process nodes).

    For the SAS Federation Server, every connection from the engine creates a service thread that loads and compiles any DS2 packages that are called for execution on that thread. Once a DS2 package is loaded on a thread, it remains in that thread's memory until the connection is discarded. Loading and compiling DS2 packages is expensive because of the time to create each thread and compile code, as well as the memory that the thread and its compiled DS2 packages occupies. Initializing the thread pool to be large enough to accommodate this demand will increase performance for flows that use the SAS Federation Server. However, making the thread pool too large uses resources unnecessarily and, in some environments, can actually decrease performance or use memory unnecessarily.

    For database connections, the size of the JDBC connection pool should be sized for the capacity and throughput of the database server that it is referencing. If there is insufficient capacity on the database server to accommodate more connections, increasing the connection pool size merely moves any I/O bottleneck to the database server. Although the increase in available connections moves the bottleneck from the engine, it does not improve the throughput unless the database's availability for connections is also increased.

 

PoolDiagnostics.jsp


 

Usage


 

The PoolDiagnostics.jsp page can be displayed using any browser that has access to the SAS Decision Services Engine web application. To see the PoolDiagnostics.jsp page, enter the following URL:

http://ip-address-of-engine-server:port-of-engine-web-application-server/RTDM/PoolDiagnostics.jsp

The page automatically refreshes every 5 minutes. If you prefer a different refresh frequency, use an appropriate value for the query parameter refreshSeconds. The following URL refreshes the page every two seconds:

http://ip-address-of-engine-server:port-of-engine-web-application-server/RTDM/PoolDiagnostics.jsp?refreshSeconds=2

Items Displayed


Activity and Subflow Thread Pool

The following are displayed:

JDBC Connection Pools

For each JDBC connection pool, the following information is displayed:

Example Screenshot