Thread per connection : NIO, Linux NPTL and epoll
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 :
- 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.
- Also a simple concurrent blocking disptach model was supported. This is essentially a reader thread per connection model.
Posted in Server Side |
1 Comment »