In SAS Customer Intelligence Studio, you can change the environment variables by selecting Setup ► Environment Variables ► Selection, as shown below.
When you use the Maximum number of concurrent processes settings, the following messages might occur in the SASCustIntelCore6.x log:
In this scenario, the max[10] value reflects the setting for Maximum number of concurrent processes per campaign, and the 15 system threads value reflects the setting for Number of system threads to execute campaign processes.
The message above means that you have five (out of a maximum of 10) concurrent processes and 15 system threads that are available to execute the campaign processes that might run across your entire system.
The system threads request tasks from the job queue (EvenDistributionJobQueue), as shown below:
The EvenDistributionJobQueue queue selects the next best task to run from the set of best tasks that is provided by each individual task sequence. Doing so keeps the load balanced among all the running requests. So, for example, if your thread count has 15 system threads and there are 15 campaign processes running, each campaign process is serviced by—at most—one thread at a time.
If you have 20 campaign processes running with 15 threads, the EvenDistributionJobQueue queue next services the task sequence that is the least recently serviced.
The value for Maximum number of [xxx] is the upper limit per number of sequence submission shown as Running sequence in the SASCustIntelCore6.x.log, as shown in the example below:
The name of this setting is confusing. This setting really represents the number of system threads that are available to execute processes.
Number of system threads to execute campaign processes is not for campaigns only, but for all task items. The value for this setting is the total number of system threads that can run at one time across all things in an individual Java virtual machine (JVM).
If you change the value for this setting to 30, for example, that setting then applies to ALL campaigns regardless of whether they are MOMA or standard campaigns or whether they generate MAMetadata. Increasing this setting also means that you need to increase the pooled-workspace server settings, as documented in SAS KB0036181, "Configuring SAS® Pooled Workspace and SAS® Stored Process servers for optimal performance with SAS® Customer Intelligence."
For example, to increase the Number of system threads to execute campaign processes value to 30, you need to have at least 30 pooled-workspace server sessions configured:
(Server process maximum specifies the number of available pooled-workspace server sessions.)
If you use a clustered middle tier, that number of system threads is the number of sessions per JVM. So, in a clustered environment, the load on the SAS Compute server is the number of system threads multiplied by the number of cluster nodes. For example, if you change the value for Number of system threads to execute campaign processes to 30 and you have two middle-tier cluster nodes, you need to have at least a value of 60 for the Server process maximum field (shown in the Advanced Options dialog box above).
The optimal number of threads depends on various factors. The most important factor to consider is your database system. You need to ensure that you have system monitoring for all machines in the environment, especially for the database servers, when you begin to tune these settings for your use.
The best way to do this is to decide what your maximum use-case will be (for example, submitting x number of campaign processes) and which campaigns to submit, while at the same time increasing the threads and tasks accordingly.
The threads are the total number of campaign threads per campaign task. Therefore, you might want to increase the threads more than the tasks. If you take the number of tasks and multiply that by the number of campaigns, you can determine the starting point. For example, if you have 20 tasks x 10 campaigns, 200 is the value that you want to use for Number of system threads to execute campaign processes, but you need to keep the value for Maximum number of concurrent processes per campaign at 20.
Caution: Be careful when you change the environment variables. Such a change has an impact on the performance of your overall environment. You need to monitor your system carefully to ensure that you do not run out of system resources.
Note: Neither of these settings impact user-interface performance. The settings are for campaign execution times only and are used to denote how many campaign processes and how many processes per campaign can be executed at the same time.