Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-4879

Add "blocked ArrayList" collection to avoid CMS full GCs

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.4-alpha, 3.0.0-alpha1
    • 2.3.0
    • namenode
    • None

    Description

      We recently saw an issue where a large deletion was issued which caused 25M blocks to be collected during deleteInternal. Currently, the list of collected blocks is an ArrayList, meaning that we had to allocate a contiguous 25M-entry array (~400MB). After a NN has been running for a long amount of time, the old generation may become fragmented such that it's hard to find a 400MB contiguous chunk of heap.

      In general, we should try to design the NN such that the only large objects are long-lived and created at startup time. We can improve this particular case (and perhaps some others) by introducing a new List implementation which is made of a linked list of arrays, each of which is size-limited (eg to 1MB).

      Attachments

        1. hdfs-4879.txt
          16 kB
          Todd Lipcon
        2. hdfs-4879.txt
          16 kB
          Todd Lipcon
        3. hdfs-4879.txt
          49 kB
          Todd Lipcon
        4. hdfs-4879.txt
          48 kB
          Todd Lipcon

        Activity

          People

            tlipcon Todd Lipcon
            tlipcon Todd Lipcon
            Votes:
            0 Vote for this issue
            Watchers:
            19 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: