Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-2362 More Improvements on NameNode Scalability
  3. HDFS-2495

Increase granularity of write operations in ReplicationMonitor thus reducing contention for write lock

    Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.23.0
    • Fix Version/s: 2.0.0-alpha, 0.23.7
    • Component/s: namenode
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      For processing blocks in ReplicationMonitor (BlockManager.computeReplicationWork), we first obtain a list of blocks to be replicated by calling chooseUnderReplicatedBlocks, and then for each block which was found, we call computeReplicationWorkForBlock. The latter processes a block in three stages, acquiring the writelock twice per call:

      1. obtaining block related info (livenodes, srcnode, etc.) under lock
      2. choosing target for replication
      3. scheduling replication (under lock)

      We would like to change this behaviour and decrease contention for the write lock, by batching blocks and executing 1,2,3, for sets of blocks, rather than for each one separately. This would decrease the number of writeLock to 2, from 2*numberofblocks.

      Also, the info level logging can be pushed outside the writelock.

      1. replicationMon.patch
        17 kB
        Tomasz Nykiel
      2. replicationMon.patch-1
        18 kB
        Tomasz Nykiel

        Activity

        Kihwal Lee made changes -
        Fix Version/s 0.23.7 [ 12323955 ]
        Arun C Murthy made changes -
        Fix Version/s 2.0.0 [ 12320353 ]
        Fix Version/s 0.24.0 [ 12317653 ]
        Fix Version/s 0.23.3 [ 12320052 ]
        Suresh Srinivas made changes -
        Fix Version/s 0.23.3 [ 12320052 ]
        Affects Version/s 0.23.0 [ 12315571 ]
        Target Version/s 0.23.3 [ 12320052 ]
        Hairong Kuang made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Fix Version/s 0.24.0 [ 12317653 ]
        Resolution Fixed [ 1 ]
        Tsz Wo Nicholas Sze made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Tsz Wo Nicholas Sze made changes -
        Hadoop Flags Reviewed [ 10343 ]
        Tomasz Nykiel made changes -
        Attachment replicationMon.patch-1 [ 12502568 ]
        Tomasz Nykiel made changes -
        Attachment replicationMon.patch [ 12500420 ]
        Tomasz Nykiel made changes -
        Field Original Value New Value
        Component/s name-node [ 12312926 ]
        Tomasz Nykiel created issue -

          People

          • Assignee:
            Tomasz Nykiel
            Reporter:
            Tomasz Nykiel
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development