Re: Unexpected low CPU usage
Johan Stuyts <[email protected]> Wed, 23 Jan 2008 08:48:15 +0100
| Newsgroups | gmane.comp.windows.devel.java.advanced |
|---|---|
| Message-ID | <[email protected]> |
> 1. The Apache Commons HttpClient's keep-alive functionality works and, > in general, is more stable than Sun's default implementation. The > expected usage of this class is to use use a single shared instance and > to use MultiThreadedConnectionManager when concurrent requests are being > made. I have no doubts about the quality of Common HttpClient. I just encountered an issue when I switched to it. It turned out that the default configuration did not match my needs. > 2. I'm assuming the following: > - that you started with -Dhttp.keepAlive=true No, but this seems to be the default for both the Sun HTTP client and the Commons one. > - your code (or the code it calls) explicitly calls close() on > the HttpConnection's InputStream when it has finished reading the > response. I assume XFire and Apache XML-RPC definitely do. > - you are not using HTTPS No, I am using HTTPS. > 3. Assuming you are now past the initial problem with excessive > connections being left in TIME_WAIT state, you didn't mention what this > system will do and how it will be used. I am building an RPC server that exposes all services on multiple protocols so the applications running on it is as open as possible. This is not entirely true. Limitations of a protocol may prevent a few services from being exposed on that protocol. > In your first email you mentioned that your goal is to test the overhead > of your framework. That won't be realized with this setup, which isn't > really simulating a physical network connection. To understand the > overhead the test physical architecture, and specifically the network > latency should be roughly comparable. Published studies that compare the > performance of Soap and RMI typically report an order of magnitude > difference. I don't understand why anyone would choose to use Soap if > they have control of both client and server - choosing complexity, > bloat, and immature test tools. I understand I need to run many more tests using different scenarios to test all aspects of my server. RMI is limited to Java. The advantage of SOAP over XML-RPC is that XFire generates a nice WSDL which can be used to generate client code in for example .Net. The real reason is I just don't want to force somebody to use a particular protocol to be able to use my application. I want the application to be as accessible to developers/administrators/hobbyists/... as possible. > Good luck with your project. If your system has high usage you may want > to reduce the time_wait_interval to something better suited for web > servers. YMMV Thanks. I have solved the TIME_WAIT issues also by configuring the components better. As I sent in another post I found the configuration option that allows me to disable the delay. I have already run successful tests with my SOAP client. It is now doing 800+ roundtrips per second instead of 60+. Johan Stuyts =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com