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

Scan handlers in the RPC executor should match at least one scan queues

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.5.3
    • 2.6.0, 3.0.0-alpha-4, 2.4.17, 2.5.4
    • None
    • None

    Description

      This issue is try to avoid NO scan queues for some scan handlers.
      For example, if we set hbase.regionserver.handler.count=150, hbase.ipc.server.callqueue.scan.ratio=0.1, hbase.ipc.server.callqueue.read.ratio=0.5, hbase.ipc.server.callqueue.handler.factor=0.1, then there will be 150 * 0.5 * 0.1 = 7 scan handlers, but there are 150 * 0.1 * 0.5 * 0.1 = 0 scan RPC queues.

      When there are no scan rpc queues, all the scan and get requests will be dispatched to the read rpc queues, while we we thought they had been dealt with separately, since the scan handler count is not 0. When there are not enough handlers for large scan requests under this circumstance, the small get requests will be blocked in the rpc queues.

      We can see from the codes,

      int scanQueues = Math.max(0, (int) Math.floor(readQueues * callqScanShare));
      int scanHandlers = Math.max(0, (int) Math.floor(readHandlers * callqScanShare));
      
      if ((readQueues - scanQueues) > 0) {
        readQueues -= scanQueues;
        readHandlers -= scanHandlers;
      } else {
        scanQueues = 0;
        scanHandlers = 0;
      } 

      when readQueues * callqScanShare < 1 but readHandlers * callqScanShare > 1, there will be some iddle scan handlers with NO scan queues.

      Attachments

        Issue Links

          Activity

            People

              Xiaolin Ha Xiaolin Ha
              Xiaolin Ha Xiaolin Ha
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: