Re: Unexpected low CPU usage
Johan Stuyts <[email protected]> Mon, 21 Jan 2008 21:21:45 +0100
| Newsgroups | gmane.comp.windows.devel.java.advanced |
|---|---|
| Message-ID | <op.t5aquj0ac4vsc3@audioslave> |
> What happened to the throughput when you enabled keep-alive? I investigated a bit more and here is the whole story. Apache XML-RPC does not use Commons HttpClient by default, but instead it uses the Sun HTTP implementation. Keep-alive is enabled and does *not* cause performance problems. When I switched to the transport factory that uses Commons HttpClient which is included with Apache XML-RPC. This led to the problems with too many ports in the 'TIME_WAIT' state. I looked in the code and saw an HttpClient was created for each request. I wrote a transport factory that uses a single HttpClient with a MultiThreadedConnectionManager for all requests. HttpClient by default uses keep-alive too. The performance of XML-RPC dropped and CPU usage became much lower. I am determining how easy it is to switch XFire to the Sun HTTP implementation. If it is not easy I will see if switching to CXF helps. I have to switch anyway some time in the future as further development will be done at CXF. Note that I still used a single client with a single thread for all three configurations above. Johan Stuyts =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com