WJCarpenter wrote:
From a quick look with "-verbose:gc" on the client JVM the 320KB messages are showing several partial garbage collections for each request/response round trip, with a total of about 12MB collected. In a run of 11 round trips I had one full garbage collection after the 10th round trip, which collected about 58MB. Judging from this it looks like the total trash generated on the client side is about 18MB for each round trip of my 320KB message.the times). These figures are from Sun JRE 1.3.1 on Linux, running on aI am curious if you measured heap use and if 64 MB is enough? I haven't
PIIIm with 256MB RAM. I used "-Xmx64M -Xms64M" options on the Java
command line to avoid a lot of threshing as the heap grew; running with
done any testing of this sort with Axis, but in Apache SOAP I routinely
use 256 MB and it is often worth it. Anyhow, it would be interesting
to hear about memory figures for Axis, too.
That's pretty high, but consistent with what I've seen of the code. There's a lot of short-lived object creation. A lot of it looks tied to the JAX-RPC interface, and that's going to be difficult to change.
From looking at these figures it doesn't look like adding more memory is going to help on the client side, unless you're sending really huge (multi-MB) messages - in which case you should probably not be using SOAP. :-) If you run with the default JVM settings you start with only 2MB, which is definitely not enough, but setting "-Xms32M" or "-Xms64M" should be more than enough for any practical client applications. For the server more memory is definitely going to be useful, especially for real world applications with multiple overlapping requests. Just how much depends on the message size and rate, as well as other demands on the server - it's probably good to start with at least "-Xmx64M -Xms64M" and try going up from there to see if it helps your particular environment.
- Dennis
Dennis M. Sosnoski
Enterprise Java, XML, and Web Services Support
http://www.sosnoski.com
