Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-7295

Contention in HBaseClient.getConnection

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Abandoned
    • 0.94.3
    • None
    • None
    • None
    • Reviewed

    Description

      HBaseClient.getConnection() synchronizes on the connections object. We found severe contention on a thrift gateway which was fanning out roughly 3000+ calls per second to hbase region servers. The thrift gateway had 2000+ threads for handling incoming connections. Threads were blocked on the syncrhonized block - we set ipc.pool.size to 200. Since we are using RoundRobin/ThreadLocal pool only - its not necessary to synchronize on connections - it might lead to cases where we might go slightly over the ipc.max.pool.size() but the additional connections would timeout after maxIdleTime - underlying PoolMap connections object is thread safe.

      Attachments

        1. volatile_output.txt
          28 kB
          Varun Sharma
        2. TestVolatile.java
          1 kB
          Varun Sharma
        3. TestSynchronized.java
          1 kB
          Varun Sharma
        4. synchronized_output.txt
          28 kB
          Varun Sharma
        5. 7295-trunk-v4.txt
          2 kB
          Varun Sharma
        6. 7295-trunk-v3.txt
          2 kB
          Varun Sharma
        7. 7295-trunk-v3.txt
          2 kB
          Varun Sharma
        8. 7295-trunk-v2.txt
          3 kB
          Varun Sharma
        9. 7295-trunk.txt
          3 kB
          Ted Yu
        10. 7295-trunk.txt
          3 kB
          Varun Sharma
        11. 7295-0.94-v5.txt
          2 kB
          Varun Sharma
        12. 7295-0.94-v4.txt
          3 kB
          Varun Sharma
        13. 7295-0.94-v3.txt
          3 kB
          Varun Sharma
        14. 7295-0.94-v2.txt
          4 kB
          Varun Sharma
        15. 7295-0.94.txt
          3 kB
          Varun Sharma

        Activity

          People

            Unassigned Unassigned
            varunsharma Varun Sharma
            Votes:
            0 Vote for this issue
            Watchers:
            15 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: