Main Content


Number of request-processing threads within server instance


--num-threads count


num-threads sets the size of the thread pool available for a MATLAB® Production Server™ instance to process client requests. Server instances do not allocate a unique thread to each client connection. Rather, when data is available on a connection, the required processing is scheduled on the pool of threads in the main server process.

The threads in this pool do not directly evaluate MATLAB functions. There is a single thread within each worker process that executes MATLAB code on behalf of the client.

Set this parameter to 1, and increase it only if the expected load consists of a high volume of short-running requests. This strategy ensures that the available processor resources are balanced between MATLAB function evaluation and processing client-server requests. There is usually no benefit to increasing this parameter to more than the number of available cores.



Number of threads available in the thread pool.

This value must be one or greater.


  • 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

Create Pool of Ten Threads for Processing Requests

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

--num-threads 10

Configure Using Dashboard

Create Pool of Ten Threads for Processing Requests

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