Developer Tools Blog

Evolphin, Version Control, Visual Workflow, Collaboration software, Version Cue, Subversion

Thread per connection : NIO, Linux NPTL and epoll

June 18th, 2004 by rahul

This article was originally posted by me on theserverside.com, it is reproduced here

I have been benchmarking Java NIO with various JDKs on Linux. Server is running on a 2 CPU 1.7 GHz, 1GB RAM, Ultra160 SCSI 36GB disk

With Linux kernel 2.6.5 (Gentoo) I had NPTL turned on and support for epoll compiled in. The server application was designed to support multiple disptach models :

  1. Reactor with Iterative Disptach with multiple selector threads. Essentially the accepted connections were load-balanced between varying number of selector threads. The benchmark then applied a step function to experimentally determine the optimal # of threads and connection per selector ratio.
  2. Also a simple concurrent blocking disptach model was supported. This is essentially a reader thread per connection model.

Read the rest of this entry »

Posted in Server Side | 1 Comment »