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: 

calculate the number of parallel tasks that can be executed in a Databricks PySpark cluster

manish1987c
New Contributor III

I want to confirm if this understanding is correct ???

To calculate the number of parallel tasks that can be executed in a Databricks PySpark cluster with the given configuration, we need to consider the number of executors that can run on each node and the number of tasks each executor can handle.

Here’s the breakdown:

Number of Nodes: 10
CPU Cores per Node: 16
RAM per Node: 64 GB
Executor Size: 5 CPU cores and 20 GB RAM per executor
Background Process: 1 CPU core and 4 GB RAM per node
Each node has 1 CPU core and 4 GB RAM reserved for background processes, leaving us with 15 CPU cores and 60 GB RAM available for executors per node.

Given that each executor requires 5 CPU cores and 20 GB RAM, you can run 3 executors per node (since 15 cores/5 cores per executor = 3 executors and 60 GB RAM/20 GB RAM per executor = 3 executors).

Since you have 10 nodes, you can run a total of 30 executors across the cluster (10 nodes * 3 executors per node).

Now, by default, each executor runs one task per core. Since each executor has 5 CPU cores, each executor can run 5 parallel tasks.

Therefore, the total number of parallel tasks that can be executed across the cluster is 150 (30 executors * 5 tasks per executor).

So, with the provided cluster configuration, your Databricks PySpark cluster can execute 150 parallel tasks.

 

1 REPLY 1

dylanberry
New Contributor II

Hi @Retired_mod , this is really fantastic guidance, will something similar be added to the Databricks docs?

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now