Updated on 2025-11-20 GMT+08:00

Managing Processing Task Resources

When creating MRS-related processing or publishing tasks, you can set task resource parameters. For details about the parameters, see Table 1.

Table 1 Task resource parameters

Parameter

Description

numExecutors

Number of executors. The default value is 2. An executor is a process running on a worker node. It executes tasks and returns the calculation result to the driver. One core in an executor can run one task at the same time. Therefore, more tasks can be processed at the same time if you increase the number of the executors. You can add executors (if they are available) to process more tasks concurrently and improve efficiency.

numExecutors x executorMemory must be greater than or equal to 4 and less than or equal to 16.

executorCores

Number of CPU kernels used by each executor process. The default value is 2. Multiple cores in an executor can run multiple tasks at the same time, which increases the task concurrency. However, because all cores share the memory of an executor, you need to balance the memory and the number of cores.

numExecutors x executorMemory must be greater than or equal to 4 and less than or equal to 16. The ratio of executorCores to executorMemory must be in the range of 1:2 to 1:4.

executorMemory

Memory size used by each Executor process. The default value is 4. The executor memory is used for job execution and communication. You can increase the memory for a job that requires a great number of resources, and run small jobs concurrently with a smaller memory.

The ratio of executorCores to executorMemory must be in the range of 1:2 to 1:4.

driverCores

Number of CPU kernels used by each driver process. The default value is 2. The driver schedules jobs and communicates with executors.

The ratio of driverCores to driverMemory must be in the range of 1:2 to 1:4.

driverMemory

Memory used by the driver process. The default value is 4. The driver schedules jobs and communicates with executors. Add driver memory when the number and parallelism level of the tasks increases.

The ratio of driverCores to driverMemory must be in the range of 1:2 to 1:4.