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

[MESOS] More even distribution of executors on Mesos cluster

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Incomplete
    • 2.0.0
    • None
    • Mesos

    Description

      The MesosCoarseGrainedSchedulerBackend launch executors in a round-robin way among accepted offers that are received at once, but it is observed that typically executors are launched on a small number of slaves.

      It is found that MesosCoarseGrainedSchedulerBackend mostly is receiving only one offer once on a cluster composed of many nodes, so that the round-robin assignment of executors among offers do not have expected result, which leads to the fact that executors are located on a smaller number of slave nodes than expected, which suffers bad data locality.

      An experimental slight change to MesosCoarseGrainedSchedulerBackend::buildMesosTasks() shows better executor distribution among nodes:

          while (launchTasks) {
            launchTasks = false
      
            for (offer <- offers) {
              ...
             }
      
      +      if (conf.getBoolean("spark.deploy.spreadOut", true)) {
      +        launchTasks = false
      +      }
          }
          tasks.toMap
      

      One of my spark programs can run 30% faster due to this change because of better data locality.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sunrui Sun Rui
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: