cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to restrict the number of tasks per executor?

saipujari_spark
Databricks Employee
Databricks Employee

In general, one task per core is how spark executes the tasks.

If we want to restrict the number of tasks submitted to the executor to get more task to memory ratio, How can we achieve that?

Thanks,
Saikrishna Pujari
Sr. Spark Technical Solutions Engineer, Databricks
1 ACCEPTED SOLUTION

Accepted Solutions

saipujari_spark
Databricks Employee
Databricks Employee

We can use a config called "spark.task.cpus"

This specifies the number of cores to allocate for each task.

The default value is 1

If we specify say 2, it means fewer tasks will be assigned to the executor.

Thanks,
Saikrishna Pujari
Sr. Spark Technical Solutions Engineer, Databricks

View solution in original post

1 REPLY 1

saipujari_spark
Databricks Employee
Databricks Employee

We can use a config called "spark.task.cpus"

This specifies the number of cores to allocate for each task.

The default value is 1

If we specify say 2, it means fewer tasks will be assigned to the executor.

Thanks,
Saikrishna Pujari
Sr. Spark Technical Solutions Engineer, Databricks

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group