Hi folks,
Solaris 9. TS 6.5 SP2 + Patch 1614.
I'm trying to control the memory usage of servletd on our DEV box, where we have limited memory (512M) and equally limited swap space... Teamsite often hangs on this machine, reporting "low on virtual memory, shutting down".
The other day, we changed in IWHOME/servletd/bin/servletd the JAVA_OPTS to say -Xms64m -Xmx256m (down from -Xmx512m).
I'm surprised to see that the process is still using quite a lot of memory... it started low, at about 160M or so, but after about a week, this is now 450M.
$ prstat -s size
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
6580 iwui 448M 269M sleep 29 10 0:13:55 0.0% java/45
[...]
$ pargs 6580
6580: /extra/app/gwts/iw-home/tools/java/bin/java -server -Xms64m -Xmx256m -Djava.lib
argv[0]: /extra/app/gwts/iw-home/tools/java/bin/java
argv[1]: -server
argv[2]: -Xms64m
argv[3]: -Xmx256m
argv[4]: -Djava.library.path=/extra/app/gwts/iw-home/cssdk:/extra/app/gwts/iw-home/lib
argv[5]: -Dcssdk.cfg.path=/extra/app/gwts/iw-home/cssdk/cssdk.cfg
argv[6]: -Djava.endorsed.dirs=/extra/app/gwts/iw-home/servletd/common/endorsed
argv[7]: -classpath
argv[8]: /extra/app/gwts/iw-home/tools/java/lib/tools.jar:/extra/app/gwts/iw-home/tools/java/lib/tools.jar:/extra/app/gwts/iw-home/cssdk/cssdkjni.jar:/extra/app/gwts/iw-home/cssdk/cssdkiface.jar:/extra/app/gwts/iw-home/servletd/bin/bootstrap.jar:/extra/app/gwts/iw-home/servletd/bin/commons-logging-api.jar
argv[9]: -Dcatalina.base=/extra/app/gwts/iw-home/servletd
argv[10]: -Dcatalina.home=/extra/app/gwts/iw-home/servletd
argv[11]: -Djava.io.tmpdir=/extra/app/gwts/iw-home/servletd/temp
argv[12]: org.apache.catalina.startup.Bootstrap
argv[13]: start
A simple jsp page with
<% java.lang.Runtime rt=java.lang.Runtime.getRuntime(); %>
Current heap size: <%= rt.totalMemory() %>
Unused heap: <%= rt.freeMemory() %>
Max memory: <%= rt.maxMemory() %>
... reports that only 66MB is reserved as heap. Also, the -Xmx256m is confirmed.
Current heap size: 66879488
Unused heap: 15363640
Max memory: 265814016
My hands-on Tomcat experience used to be better some years ago, now I haven't played with them so much recently... still though, this strikes me as odd.
ideas?
thx, Fred.