Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-14938

Configuration.updatingResource map should be initialized lazily

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.9.0, 3.0.0
    • None
    • None
    • Reviewed

    Description

      Using jxray (www.jxray.com), I've analyzed a heap dump of YARN RM running in a big cluster. The tool uncovered several inefficiencies in the RM memory. It turns out that one of the biggest sources of memory waste, responsible for almost 1/4 of used memory, is empty ConcurrentHashMap instances in org.apache.hadoop.conf.Configuration.updatingResource:

      905,551K (24.0%): java.util.concurrent.ConcurrentHashMap: 22118 / 100% of empty 905,551K (24.0%)
      ↖org.apache.hadoop.conf.Configuration.updatingResource
      ↖{j.u.WeakHashMap}.keys
      ↖Java Static org.apache.hadoop.conf.Configuration.REGISTRY
      

      That is, there are 22118 empty ConcurrentHashMaps here, and they collectively waste ~905MB of memory. This is caused by eager initialization of these maps. To address this problem, we should initialize them lazily.

      Attachments

        1. HADOOP-14938.01.patch
          6 kB
          Misha Dmitriev
        2. HADOOP-14938.02.patch
          6 kB
          Misha Dmitriev
        3. HADOOP-14938.03.patch
          8 kB
          Misha Dmitriev
        4. HADOOP-14938.branch-2.01.patch
          8 kB
          Misha Dmitriev
        5. HADOOP-14938.branch-3.0.01.patch
          8 kB
          Misha Dmitriev

        Activity

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

          People

            misha@cloudera.com Misha Dmitriev Assign to me
            misha@cloudera.com Misha Dmitriev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment