Threads parameter

Describes the effect of the threads parameter in parallel.

You manage the number of threads that CPLEX uses with the global thread count parameter (Threads, CPX_PARAM_THREADS) documented in the CPLEX Parameters Reference Manual. At its default setting 0 (zero), the number of threads that CPLEX actually uses during a parallel optimization is no more than 32 or the number of CPU cores available on the computer where CPLEX is running (whichever is smaller).

If you set the threads parameter to a value greater than its default of 0 (zero), then the number of threads that CPLEX uses equals that value. When you set the threads parameter to 1 (one), you enforce sequential operation, that is, processing on one thread only.

The number of threads used by a parallel CPLEX optimizer is separate from and independent of the number of users. A typical CPLEX installation permits one use, that is, a single concurrent execution on one computer. By default, CPLEX uses a number of threads equal to the number of cores or 32 threads (whichever number is smaller). The operating system manages any contention for processors. If processor contention among multiple executions becomes problematic in your application, consider setting the CPLEX threads limit parameter to a suitable value so that the total number of threads used by all executions does not exceed the number of available cores on your platform.

The number of parallel threads used by a CPLEX optimizer is usually controlled by CPLEX parameter settings. These settings are discussed in more detail in the sections that follow.