cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Knowledge Sharing Hub
Dive into a collaborative space where members like YOU can exchange knowledge, tips, and best practices. Join the conversation today and unlock a wealth of collective wisdom to enhance your experience and drive success.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to deal with Slow Jobs?

NandiniN
Databricks Employee
Databricks Employee

Definitely configure job timeouts, and configure notifications.

This will help you to identify slowness due to various factors.

It is crucial to also investigate and fix the issue causing the slowness.

  1. The first step is to identify the problem. This can be done by comparing the run times of the same job at different instances. 
  2.  The next step is to analyze the details of the job. This can be done by checking the SQL query plan, the read time, and the cloud storage request duration, etc from the Spark UI.
  3. External factors such as storage and network can also affect the job run time. Checking Logs and some system level commands can give insights if the vm is still up and running.

While comparing the two runs (good and bad), try answering the following

  • Is this an intermittent failure or it degraded after a certain point of time.
  • If it is slow after a certain time consistently was there a DBR change?
  • Is the volume of the data the same?
  • Have the cluster configs changed/updated?

While comparing the DAGs and sql plan

  • Look for the stages that took most time.
  • Use filters and reduce data size.
  • Check the joins, metrics.

In the logs

  • You can check for errors, warnings.
  • Go to the timestamp when the stage was delayed.
  • Compare it with a run where it took the expected time.

Bonus tip - Enable speculative execution for tasks to re-run slow tasks in parallel. spark.speculation=true

Keep a look out for my new post for more tuning on a slow task/jobs.

 

 

 

0 REPLIES 0

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