On 09/01/2015 23:57, Rémy Maucherat wrote: > 2015-01-09 22:44 GMT+01:00 Mark Thomas <ma...@apache.org>: > >>> I made a mistake, which also made me think that the NIO connector didn't >>> suffer from the NPE. In the end, there's no significant improvement >> there. >> >> That matches my results. NIO is about the same in 8.0.x and 9.0.x for me. >> >>>> The other thing to keep in mind is that these performance figures could >>>> easily shift a lot further as the code clean-up continues. We should >>>> defer any decision about removing an implementation until after the >>>> refactoring is complete. Looking further ahead, the HTTP/2 work may >>>> impact performance as well. >>>> >>>> On balance I think we should keep all three implementations since there >>>> are always likely to be loads that are better suited to one >>>> implementation than the others. >>>> >>> No problem with that. >> >> Bingo. The tweaks I made might have provided a few % points but it is >> the buffering that makes all the difference. I have a local hack that >> restores it for NIO2 and performance immediately goes up by ~15%. Rather >> than commit this hack, I am going to work on a more general fix. I >> should have something early next week. >> > Ok, good to know. I wonder if the NIO connector IO is optimal, I'll have > some time to look at it relatively soon, probably.
Just for info, I have found that none of the non-blocking IO (including that used by the WebSocket impl) was using the socket write buffer. I'm making good progress refactoring things so everything is buffered by default but it has triggered a lot of bugs that need fixing by inserting a ServletOutputStream.flush() at an appropriate point. This might turn into something that causes apps issues (if indeed any apps at all are using the HTTP upgrade API). If this is the case we can add an option to always flush an upgraded OutputStream after a write but for now I plan to leave this as a TODO. My impressions of performance so far is good but I want to do some side by side comparisons of 8.0.x vs 9.0.x for various cases once I have the refactoring complete to see what the real differences are. If it turns out to be positive, I may see if I can structure an ApacheCon talk out of it. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org