Tuning SAS Micro Analytic Service

Adjust Thread Pool Size

Tasks in SAS Micro Analytic Service, such as revision compilations and method executions, are performed by special worker threads, which are part of the SAS threaded kernel architecture. These worker threads are maintained in a thread pool. The size of the thread pool to use is provided to SAS Micro Analytic Service as a start-up parameter. By default, the thread pool size is set equal to the number of cores in the hosting server. Optimum performance is usually achieved using this number. However, the optimum setting might vary depending on the characteristics of the modules that you publish to SAS Micro Analytic Service.
To change the worker thread pool size:
  1. In SAS Management Console, expand Application Management.
  2. Expand SAS Application Infrastructure.
  3. Right-click SAS Micro Analytic Service 2.2.
  4. Select Properties.
  5. Click the Advanced tab.
  6. Unlock masintf.tk.threads in the Property Name column.
  7. Change the value. To tell SAS Micro Analytic Service to automatically set the worker thread pool size equal to the number of logical processors, enter 0 for the value.
    For example, specifying 0 on a system that has one Intel quad-core, hyper-threaded processor results in a thread pool size of 8, given that there are two logical processors per core when hyper-threading is on.
  8. Click OK.

Adjust Serial or Parallel Content Creation

The POST operation on the modules collection and the PUT and DELETE operations on a module are serialized by default, and are processed in the order of arrival. To allow these operations to be processed in parallel:
  1. In SAS Management Console, expand Application Management.
  2. Expand SAS Application Infrastructure.
  3. Right-click SAS Micro Analytic Service 2.2.
  4. Select Properties.
  5. Click the Advanced tab.
  6. Unlock masintfc.tk.serializecontentcreation in the Property Name column.
  7. Change the value. The choices are True and False. The default value is True.
  8. Click OK.

Adjust DS2 Module Compilation Mode

The REST server inserts a DS2 option in front of each DS2 module to instruct it to use SAS missing value behavior. Although it is not recommended, you can configure the system to use ANSI missing value behavior for DS2 modules. For ANSI behavior, enter False in step 7 below.
  1. In SAS Management Console, expand Application Management.
  2. Expand SAS Application Infrastructure.
  3. Right-click SAS Micro Analytic Service 2.2.
  4. Select Properties.
  5. Click the Advanced tab.
  6. Unlock masintfc.tk.sasmode in the Property Name column.
  7. Change the value. The choices are True and False. The default value is True.
  8. Click OK.

Adjust Session Time-out Value

To shorten the amount of time the web server holds on to memory that is used in fulfilling a request, adjust the session time-out value. This allows for a more frequent and shorter garbage collection interval instead of fewer and longer garbage collection intervals that might reduce the responsiveness of the REST server.

Increase Module ExecutionThroughput of the REST Interface

Execution performance can be increased by disabling authentication within the SAS Micro Analytic Service REST server. However, those making connections to the REST server to execute micro analytics must always be authorized and authenticated by some other means, such as a private network. If this is the case, you can edit the JVM option that starts the REST server to include the argument
 -Dsas.mas.access.mode=private
As a result, REST server authentication is not required to execute micro analytics. Authentication is still required for other operations.
As a result of specifying this option, the CPU cycles and sockets that are used for authentication are available for other uses, such as executing micro analytics.
The place to edit the JVM option is host specific:
  • Linux - SAS/config/LevN/Web/WebAppServer/SASServer13_X/bin/setenv.sh
  • Windows - SAS\Config\LevN\Web\WebAppServer\SASServer13_X\conf\wrapper.conf

Prevent HTTP Error Messages

To prevent HTTP error messages, make sure that the web server is located on a separate host machine from the web application server. When the web server and web application server are located on the same machine, they compete to use the ephemeral ports on the system. Separating them reduces contention for this finite resource.

Creating and Updating Database Connection Strings

To create or update a connection string:
  1. In SAS Management Console, expand Application Managementthen selectConfiguration Managementthen selectSAS Application Infrastructure.
  2. Right-click SAS Micro Analytic Service 2.2 and select Properties.
  3. On the Advanced tab, update the masintfc.db.connectionstring property's value.
  4. Click OK.
The connection string can contain a federation of multiple connection strings, to enable access to multiple databases. For more information about federated connection strings, see I/O.