Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-25837

Web UI does not respect spark.ui.retainedJobs in some instances

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.1
    • Fix Version/s: 2.3.3, 2.4.1, 3.0.0
    • Component/s: Web UI
    • Labels:
      None
    • Environment:

      Reproduction Environment:

      Spark 2.3.1

      Dataproc 1.3-deb9

      1x master 4 vCPUs, 15 GB

      2x workers 4 vCPUs, 15 GB

       

      Description

      Expected Behavior: Web UI only displays 1 completed job and remains responsive.

      Actual Behavior: Both during job execution and following all job completion for some non short amount of time the UI retains many completed jobs, causing limited responsiveness.

       

      To reproduce:

       
      > spark-shell --conf spark.ui.retainedJobs=1
       
      scala> import scala.concurrent._
      scala> import scala.concurrent.ExecutionContext.Implicits.global
      scala> for (i <- 0 until 50000) { Future

      { println(sc.parallelize(0 until i).collect.length) }

      }
       

       

       

      The attached screenshot shows the state of the webui after running the repro code, you can see the ui is displaying some 43k completed jobs (takes a long time to load) after a few minutes of inactivity this will clear out, however in an application which continues to submit jobs every once in a while, the issue persists.

       

      The issue seems to appear when running multiple jobs at once as well as in sequence for a while and may as well have something to do with high master CPU usage (thus the collect in the repro code). My rough guess would be whatever is managing clearing out completed jobs gets overwhelmed (on the master during repro htop reported almost full CPU usage across all 4 cores).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                patrick.brown Patrick Brown
                Reporter:
                patrick.brown Patrick Brown
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: