tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <>
Subject Re: NIO vs BIO speed
Date Fri, 23 Jun 2006 00:09:14 GMT
Remy Maucherat wrote:
> Filip Hanik - Dev Lists wrote:
>> Here is another test that I ran from a remote machine, setting 
>> maxThreads="25" and ab concurrency to 50 and keepalive on.
>> In this case, NIO is a lot faster. Turn off keepalive on ab, and we 
>> get similar results to previous run, where BIO is a tad faster.
> Scaling the thread per connection model is done by increasing the 
> amount of threads. This particular test demonstrates the obvious.
yes, what is interesting though, is my NIO connector is not really true 
NIO, as it ties up a thread while polling for data. The true 
implementation would have not invoked that thread yet, but for that I 
would have had to rewritten the connector from scratch as I couldn't 
have taken advantage of code already written and tested.
The reason it was done like this, is cause that way I could use almost 
all the code from the APR connector.
So you could call it a semi-"thread-per-connection" model, yet handles 
better than the true thread per connection model.
APR does the same thing.

> If I understand the results correctly, the results would be acceptable 
> on Unix.
yes, I think they are looking pretty good. And I am fairly confident in 
this new code, as most of it, is old tested APR code.



Filip Hanik

View raw message