Re: Unexpected low CPU usage
Peter Booth <[email protected]> Tue, 22 Jan 2008 17:56:28 -0500
| Newsgroups | gmane.comp.windows.devel.java.advanced |
|---|---|
| Message-ID | <[email protected]> |
It's great that you have foudn an issue. You should run the test with perfmon logging to a file every few seconds, with the top ten metrics (see teh gui for these), and with netstat -a piped to a text file. In Linux or Solaris sar will give you the same data. On Jan 21, 2008, at 3:21 PM, Johan Stuyts wrote: >> 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 > =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com