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

the lock of ShortCircuitCache is hold while close the ShortCircuitReplica

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.0.2
    • None
    • hdfs-client
    • None

    Description

      When we are profiling SC read, we find that ShortCircuitCache's lock is a hot spot. After look into the code, we find that when close BlockReaderLocal, it tries to  trimEvictionMaps, and several ShortCircuitReplicas are closed while the lock being hold.  This slows down the close of the BlockReaderLocal, and the worse is that it blocks the other allocating of the new ShortCircuitReplicas. 

      An idea to avoid this is to close the replica in an async way. I will do a prototype and get the performance.

      Attachments

        1. no_hdfs.svg
          1.06 MB
          Gang Xie

        Activity

          People

            leosun08 Lisheng Sun
            xiegang112 Gang Xie
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: