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

Add -XX:MaxDirectMemorySize jvm options in yarn mode

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Invalid
    • 3.0.0
    • None
    • Spark Core, YARN
    • None

    Description

      Current memory composition `amMemory` + `amMemoryOverhead`

      val capability = Records.newRecord(classOf[Resource])
      capability.setMemory(amMemory + amMemoryOverhead)
      capability.setVirtualCores(amCores)
      if (amResources.nonEmpty) {
       ResourceRequestHelper.setResourceRequests(amResources, capability)
      }
      logDebug(s"Created resource capability for AM request: $capability")
      
       // Add Xmx for AM memory 
      javaOpts += "-Xmx" + amMemory + "m"
      

      It is possible that the physical memory of the container exceeds the limit and is killed by yarn.
      I suggest setting `-XX:MaxDirectMemorySize` here

      // Add Xmx for AM memory
      javaOpts += "-Xmx" + amMemory + "m"
      javaOpts += s"-XX:MaxDirectMemorySize=${amMemoryOverhead}m"

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              wangzhun wang-zhun
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: