Main Content

num-workers

Maximum number of workers allowed to process work simultaneously

Syntax

--num-workers count

Description

num-workers defines the number of concurrent MATLAB® execution requests that a server instance can simultaneously process. It should correspond to the number of hardware threads available on the local host.

If you specify a single value for the mcr-root property, the num-workers property determines the fixed size of the worker pool. For example, if you specify a single value for mcr-root, and set num-workers to 4, your machine has 4 workers available.

If you specify multiple MATLAB Runtime versions in your server configuration, num-workers specifies the maximum size of the worker subpool specific to a MATLAB Runtime version. When you specify multiple MATLAB Runtime versions, the total number of workers can exceed those specified by num-workers. However, at a maximum, only the number of workers that you specify in num-workers are allowed to process a request. For example, for a server configuration that has three MATLAB Runtime versions, and num-workers set to 2, there a total of six workers. The maximum number of workers in each subpool is two, and the maximum number of workers that are active at a given time is two.

Parameters

count

Number of workers available to evaluate functions.

This value must be one or greater.

The maximum value is determined by the number of license keys available for MATLAB Production Server™.

Examples

Allow 10 workers to process requests at a time.

Update the main_config server configuration file with the following:

--num-workers 10