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

HBaseClient wastes 1 TCP packet per RPC

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.20.1, 0.20.2, 0.20.3, 0.20.4, 0.20.5, 0.20.6, 0.89.20100621
    • 0.90.0
    • Client
    • None
    • Reviewed
    • performance

    Description

      In ipc/HBaseClient.java, the method sendParam does:

      out.writeInt(dataLength);      //first put the data length
      out.write(data, 0, dataLength);//write the data
      

      While analyzing some tcpdump traces tonight, I saw that this consistently translates to 1 TCP packet with a 4 byte payload followed by another TCP packet with the RPC itself. This makes inefficient use of network resources and adversely affects TCP throughput. I believe each of those lines translates to a write system call on the socket's file descriptor (unnecessary system calls are also bad for performance). The code attempts to call out.flush(); but this approach is ineffective on sockets in Java (as far as I empirically noticed over the past few months).

      Attachments

        1. hbase-3115.txt
          1 kB
          Todd Lipcon

        Activity

          People

            tlipcon Todd Lipcon
            tsuna Benoit Sigoure
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: