Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-3491

PublicLocalizer#addResource is too slow.

VotersStop watchingWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.7.0
    • 2.8.0, 3.0.0-alpha1
    • nodemanager
    • None
    • Reviewed

    Description

      Based on the profiling, The bottleneck in PublicLocalizer#addResource is getInitializedLocalDirs. getInitializedLocalDirs call checkLocalDir.
      checkLocalDir is very slow which takes about 10+ ms.
      The total delay will be approximately number of local dirs * 10+ ms.
      This delay will be added for each public resource localization.
      Because PublicLocalizer#addResource is slow, the thread pool can't be fully utilized. Instead of doing public resource localization in parallel(multithreading), public resource localization is serialized most of the time.

      And also PublicLocalizer#addResource is running in Dispatcher thread,
      So the Dispatcher thread will be blocked by PublicLocalizer#addResource for long time.

      Attachments

        1. YARN-3491.004.patch
          16 kB
          Zhihai Xu
        2. YARN-3491.003.patch
          15 kB
          Zhihai Xu
        3. YARN-3491.002.patch
          5 kB
          Zhihai Xu
        4. YARN-3491.001.patch
          3 kB
          Zhihai Xu
        5. YARN-3491.000.patch
          2 kB
          Zhihai Xu

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            zxu Zhihai Xu
            zxu Zhihai Xu
            Votes:
            0 Vote for this issue
            Watchers:
            19 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment