Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-786

Handling network I/O process in pooled threads instead of selectThread_ in THsHaServer.java

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.2
    • None
    • Java - Library
    • None
    • Linux 2.6.18 Xeon 5130 dual core X 2

    Description

      In my test environment, I've made a few modification to TNonblockingServer and THsHaServer to let the thread pool executor to take over I/O handling. selectThread_ selects, maintains interestOps of all keys, and submit tasks when there is something to read or write.

      This modification boosts my thrift server from 7k req/s to 10k req/s, using php client code. I think this is worth doing.

      Attachments

        1. TNonblockingServer.java
          27 kB
          Lisen Mu
        2. THsHaServer.java
          13 kB
          Lisen Mu

        Issue Links

          Activity

            People

              bryanduxbury Bryan Duxbury
              immars Lisen Mu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: