This SAS KB article provides some tuning tips for SAS Stored Process Server with a MultiBridge connection and SAS Pooled Workspace Server load balancing for SAS Marketing Automation campaigns. Most installations of SAS Marketing Automation benefit from a review of these settings. However, these tips are especially important if SAS® Customer Intelligence Studio or SAS Marketing Automation becomes slow or unresponsive.
This SAS KB article is valid for SAS Customer Intelligence releases 5.3 through 6.6.
Multiple Process nodes that reference or update the same data source can cause lock contention when the Process nodes execute at the same time. This contention can happen whether the Process nodes are in the same campaign or in different campaigns. After such a contention occurs, the stored process server that is associated with the locked process remains unresponsive until it is restarted. To prevent this problem from occurring, avoid simultaneous execution of multiple processes that use the same data source.
If you stop the client sessions while they are processing, then you might create orphaned stored-process servers. These orphaned servers remain unavailable to do any further processing until they are restarted by an administrator. The administrator restarts these processes by stopping them at the operating-system level and restarting the associated SAS Object Spawner.
Each stored-process server with a MultiBridge connection is configured, by default, to contain multiple stored-process server sessions. The number of stored-process server sessions that SAS® creates for each MultiBridge server is determined by the following algorithm:
For example, a maximum cost of 500 with a start-up cost of 10, cost per client of 1 and a context cost of 100 enables five stored processes to run in each MultiBridge connection:
This is a very simplified example. For a full discussion, see "Understanding the Load-Balancing Algorithms" in "Chapter 7: Understanding Server Load Balancing" of the SAS® 9.2 Intelligence Platform: Application Server Administration Guide.
SAS Marketing Automation provides better performance when you limit the number of stored processes that run within each MultiBbridge stored-process server to just one process. To set this limit, follow these steps:
This setting governs the amount of time that the object spawner waits for a stored-process server to become ready. If you have multiple pre-defined libraries, many library definitions in your autoexec_usermods.sas files for stored processes, or the system is under load, then the default value of 60 seconds might not be enough. You should use this setting together with the StartSize setting (see below) to best control how your stored-process servers are instantiated.
Because you are limiting the number of stored processes per MultiBridge connection, you need to increase the number of MultiBridge connections. The maximum number is dependent on your hardware. At least 9 connections are recommended. You can increase this number if you observe significant delays in assigning stored processes in the SAS Object Spawner logs.
Setting StartSize to the number of defined connections reduces wait time for stored-process servers that are allocated but not yet started. This setting enables all stored-process server connections to be pre-started and ready to accept requests. For example, if you have defined 40 MultiBridge Stored Process Server connections, you might want to set StartSize to 40.
This step is necessary only if you see the following error in your SAS object spawner log:
This error is often triggered when SAS Marketing Automation cannot access sufficient workspace-server sessions, which causes jobs to queue and time out. In order to check the value of the Server Process Maximum setting, follow these steps:
If you do not have the hardware capacity to increase the number of workspace servers, then review the Availability time-out option. Increasing this value is unlikely to improve performance. However, the increase prevents the system from dropping jobs that time out while waiting for a workspace server to become available. To check the value of the Availability time-out setting, follow these steps:
The way in which pooled workspace and stored-process servers are leveraged changed in SAS Customer Intelligence 6.1. The system decides, based on workload, whether to run a stored process on the stored-process server or the pooled workspace server. Because of this, you might need to configure more pooled workspace servers to cope with the extra load. The stored-process servers should be configured as discussed previously in this note.
A good starting place is to configure 30 MultiBridge connections for the stored-process server and increase the value for Server process maximum for the pooled workspace server to 30.
Because SAS Customer Intelligence 6.1 leverages the pooled workspace servers for many of the stored processes, there might be a need to increase the maximum number of pooled workspace-server connections that are available.
This change was reversed in SAS Customer Intelligence 6.3. However, you can configure the system to use the pooled workspace servers as per release 6.1 by adding the option -Dsas.ci.stp.workspace.enabled in the start-up script for SAS® Web Application Server.
To see images that show these pooled-workspace and stored process server settings, see SAS KB0036181, "Configuring SAS® Pooled Workspace and SAS® Stored Process servers for optimal performance with SAS® Customer Intelligence."
The SAS® 9.2 object spawner launches all servers in a single Windows desktop heap. If too many stored process servers and workspace servers are launched, this can have negative implications on system resources. For more details about those implications, see the following SAS Notes:
So for SAS 9.2, a best practice is to initially configure the system so that no more than 50 workspace and stored process servers can be running concurrently. The system should then be monitored and tuned as it matures.
For SAS® 9.3 and SAS® 9.4, this configuration is not so critical because the object spawner allocates separate Windows desktop heap sessions for every 20 spawner-server processes. Overall, available memory should still be considered when you tune these servers.
You need to restart the object spawner after making changes to the pooled workspace-server and stored-process server options.