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

  • For on-premises server instances created using the command line, update this server configuration property in the main_config server configuration file.

  • For on-premises server instances created using the dashboard and for server deployments in the cloud, use the dashboard and cloud dashboard, respectively, to update the server configuration property.

Configure Using Command Line

Allow Ten Workers to Process Requests at a Time

In the main_config file, set the num-workers property to the following:

--num-workers 10

Configure Using Dashboard

Allow Ten Workers to Process Requests at a Time

In the dashboard, in the Settings tab of your server instance, under Worker, enter the following for the Maximum Workers property:

10