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

NameNode seems unstable on a cluster with little space left

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.17.1
    • 0.20.0
    • None
    • None
    • Reviewed

    Description

      NameNode seems not very responsive and unstable when the cluster has very little space left. The clients timeout. The main problem is that it is not clear to the user what is going on. Once I have more details about a NameNode that was in this state, I will fill in here.

      If there is not enough space left on a cluster, it is ok for clients to receive something like "DiskOutOfSpace" exception.

      Right now it looks like NameNode tries too hard find a node with any space left and ends up being slow to respond to clients. If the CPU taken by chooseTarger() is the main cause, there are two possible fixes :

      1. chooseTarget() iterates and takes quite a bit of CPU for allocating datanodes. Usually this not much of a problem. It takes even more cpu when it needs to search multiple racks for a datanode. We could probably reduce some CPU for these searches. The benefit should be measurable.
      2. Once NameNode can not find any datanode that has space on a rack, it could mark the rack as "full" and skip searching the rack for next one minute or so. This flag gets cleared after a minute or if any new node is added to the rack.
        • Of course, this might not be optimal w.r.t disk space usage.. but only for a short duration. Once a cluster is mostly full, the user does expect errors.
        • On the flip side, this fix does not require extremely CPU optimized version of chooseTarget().
        • I think it is reasonable for NameNode to throw DiskOutOfSpace exception, even though it could have found space if it searched much more extensively.


      edit : minor changes

      Attachments

        1. simon-namenode.PNG
          99 kB
          Raghu Angadi
        2. globalLock1.patch
          11 kB
          Hairong Kuang
        3. globalLock.patch
          15 kB
          Hairong Kuang

        Issue Links

          Activity

            People

              hairong Hairong Kuang
              rangadi Raghu Angadi
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: