keith-turner opened a new pull request #1059: Switch to thrift server with multiple selector threads. URL: https://github.com/apache/accumulo/pull/1059 Before this change Accumulo's used the THsHaServer thrift server. This server has a single select threads that read and writes frames to sockets. The select thread puts the frames on a thread pool for processing. On a machine with a lot of cores, this single thread can become a bottleneck. This commit switches to use the thrift TThreadedSelectorServer server which support multiple select threads. To demonstrate the differernce this change can make, the RandomCachedLookupsPT performance test in accumulo-testing was run with and without this change. The test was run on a machine with 16 cores. The test loads a table into cache and then does random lookups with varying numbers of threads. It measures the average lookup time for each lookup. Below is a table of running this test. Threads | Single Selector | Multi Selector | Speedup --------|-----------------|----------------|--------- 1 | 0.14 ms | 0.14 ms | 1.00 4 | 0.18 ms | 0.19 ms | 0.95 8 | 0.24 ms | 0.24 ms | 1.00 16 | 0.44 ms | 0.44 ms | 1.00 32 | 0.85 ms | 0.81 ms | 1.05 64 | 1.74 ms | 1.40 ms | 1.24 128 | 3.51 ms | 2.44 ms | 1.44 256 | 7.21 ms | 4.52 ms | 1.60 This table shows that with 256 client threads doing lookups that each lookup took 7.21ms on average with a single selector thread. With this change and four selector threads, each loopup took 4.52ms on average with 256 client threads. During both test there were 256 threads to process client request on the tserver. The selector threads hand frames off to these 256 threads. Watching top+jstack while running these test show the single selector thread will eventually reach 100% on a core. With 4 selector threads each used 36% CPU when 256 client threads were doing lookups.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
