On 02/25/2012 05:47 PM, Sven Van Caekenberghe wrote:
Philippe ,

That is incredibly fast, I just tried and I can't even get plain apache2 serve 
the static.html that fast over the local network !

When I have more time, I really have to try to repeat your results with your 
code ( as well as study the code ;-)

The biggest thing is probably the recycling of the response buffers. Each worker thread has a response buffer that is reused. I found that request handling is very sensitive to allocation. There is a direct correlation between removing allocation and handling more requests and having a bigger throughput. The more allocation you can remove the better. Especially things like Stream >> #contents.

There is also some code to have buffers that can efficiently work on both ByteArray and ByteString.

Cheers
Philippe


Reply via email to