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

Try a pool of direct byte buffers handling incoming ipc requests

    XMLWordPrintableJSON

Details

    • Brainstorming
    • Status: Closed
    • Major
    • Resolution: Implemented
    • None
    • None
    • None
    • None

    Description

      ipc takes in a query by allocating a ByteBuffer of the size of the request and then reading off the socket into this on-heap BB.

      Experiment with keeping a pool of BBs so we have some buffer reuse to cut on garbage generated. Could checkout from pool in RpcServer#Reader. Could check back into the pool when Handler is done just before it queues the response on the Responder's queue. We should be good since, at least for now, kvs get copied up into MSLAB (not references) when data gets stuffed into MemStore; this should make it so no references left over when we check the BB back into the pool for use next time around.

      If on-heap BBs work, we could then try direct BBs (Allocation of DBBs takes time so if already allocated, should be good. GC of DBBs is a pain but if in a pool, we shouldn't be wanting this to happen). The copy from socket to the DBB will be off-heap (should be fast).

      Could start w/ the HDFS DirectBufferPool. It is unbounded and keeps items by size (we might want to bypass the pool if an object is > size N).

      DBBs for this task would contend w/ offheap BBs used in BlockReadLocal when short-circuit reading. It'd be a bummer if we had to allocate big objects on-heap. Would still be an improvement.

      Attachments

        1. 9535.v3.patch
          35 kB
          Nicolas Liochon
        2. 9535.v2-trunk.patch
          34 kB
          Nicolas Liochon
        3. 9535.v2.patch
          24 kB
          Nicolas Liochon
        4. 9535.v1.patch
          27 kB
          Nicolas Liochon

        Issue Links

          Activity

            People

              nkeywal Nicolas Liochon
              stack Michael Stack
              Votes:
              0 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: