No subject


Fri Feb 8 15:06:04 EST 2008


interested in the Oracle/Mapserver/Java/Tomcat.

Therfore I'd like to share experiences I made with using 
Connection-Pooling of 
Oracle-Connections inside Java/Tomcat.

Testenvironment: Mapserver 4.6.2; Suse-Linux; Tomcat 4.1.31; Sun-Java 
1.4.2
Simulating 5 Browsers, which produce maps, query features, make 
selections, 
query-legend-pics frequently.

- After using synchronized "enough" I didn't have crashes of Tomcat. 

- Big memory leak: Between the first 5 requests and the next 100 requests 
   the Tomcat-process became about 400MB bigger.  (I use "top" for 
   watching memory-footprint.)

- Cleaning the Connection-Pool "by hand". This means:
  Opening the function msConnPoolCloseUnreferenced in mappool.c
  for use in Java and call it after every request.

- After this I still have memory leaks:  About 100MB for 30.000 requests.
  (I also made a test: 25.000 requests without Connection pooling. Memory 
increased 
    and decreased as expected  in this case.)

- Performancecomparison in my testcase:
  Without use of connection-pooling: ~ 50 Request per minute
  With use of connection-pooling: ~75 Request per minute 


As a result I have the following encouragements:
- Making msConnPoolCloseUnreferenced  availabe for mapscript via swig.
  (I made a hack by directly editing mapscript/java/mapscript_wrap.c and
   Java-Files in mapscript/java/edu/umn/gis/mapscript.) I think this
  function could be part of the mapscript-Object?

- Investigations on the memory leaks. Both leaks shouldn't occure. (I'll 
do
  this, if I find time. but ...)

- Fernando Simon: What about using OCI-Connection-Pooling  for oracle 
instead the mappool.c?
  
http://oraclesvca2.oracle.com/docs/cd/B14117_01/appdev.101/b10779/oci09adv.htm#452244
  (If you don't have time, I maybe could help coding. But would it become 
part uf Mapserver?)

Happy new year to everybody
Benedikt Rothe
--=_alternative 003919A6C12570EA_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Hi list members,</font>
<br>
<br><font size=2 face="sans-serif">From former threads I got the impression,
that there are some folks </font>
<br><font size=2 face="sans-serif">interested in the Oracle/Mapserver/Java/Tomcat.</font>
<br>
<br><font size=2 face="sans-serif">Therfore I'd like to share experiences
I made with using Connection-Pooling of </font>
<br><font size=2 face="sans-serif">Oracle-Connections inside Java/Tomcat.</font>
<br>
<br><font size=2 face="sans-serif">Testenvironment: Mapserver 4.6.2; Suse-Linux;
Tomcat 4.1.31; Sun-Java 1.4.2</font>
<br><font size=2 face="sans-serif">Simulating 5 Browsers, which produce
maps, query features, make selections, </font>
<br><font size=2 face="sans-serif">query-legend-pics frequently.</font>
<br>
<br><font size=2 face="sans-serif">- After using synchronized &quot;enough&quot;
I didn't have crashes of Tomcat. </font>
<br>
<br><font size=2 face="sans-serif">- Big memory leak: Between the first
5 requests and the next 100 requests </font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;the Tomcat-process became
about 400MB bigger. &nbsp;(I use &quot;top&quot; for </font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;watching memory-footprint.)</font>
<br>
<br><font size=2 face="sans-serif">- Cleaning the Connection-Pool &quot;by
hand&quot;. This means:</font>
<br><font size=2 face="sans-serif">&nbsp; Opening the function msConnPoolCloseUnreferenced
in mappool.c</font>
<br><font size=2 face="sans-serif">&nbsp; for use in Java and call it after
every request.</font>
<br>
<br><font size=2 face="sans-serif">- After this I still have memory leaks:
&nbsp;About 100MB for 30.000 requests.</font>
<br><font size=2 face="sans-serif">&nbsp; (I also made a test: 25.000 requests
without Connection pooling. Memory increased </font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; and decreased as expected
&nbsp;in this case.)</font>
<br>
<br><font size=2 face="sans-serif">- Performancecomparison in my testcase:</font>
<br><font size=2 face="sans-serif">&nbsp; Without use of connection-pooling:
~ 50 Request per minute</font>
<br><font size=2 face="sans-serif">&nbsp; With use of connection-pooling:
~75 Request per minute &nbsp;</font>
<br>
<br>
<br><font size=2 face="sans-serif">As a result I have the following encouragements:</font>
<br><font size=2 face="sans-serif">- Making msConnPoolCloseUnreferenced
&nbsp;availabe for mapscript via swig.</font>
<br><font size=2 face="sans-serif">&nbsp; (I made a hack by directly editing
mapscript/java/mapscript_wrap.c and</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;Java-Files in mapscript/java/edu/umn/gis/mapscript.)
I think this</font>
<br><font size=2 face="sans-serif">&nbsp; function could be part of the
mapscript-Object?</font>
<br>
<br><font size=2 face="sans-serif">- Investigations on the memory leaks.
Both leaks shouldn't occure. (I'll do</font>
<br><font size=2 face="sans-serif">&nbsp; this, if I find time. but ...)</font>
<br>
<br><font size=2 face="sans-serif">- Fernando Simon: What about using OCI-Connection-Pooling
&nbsp;for oracle instead the mappool.c?</font>
<br><font size=2 face="sans-serif">&nbsp; http://oraclesvca2.oracle.com/docs/cd/B14117_01/appdev.101/b10779/oci09adv.htm#452244</font>
<br><font size=2 face="sans-serif">&nbsp; (If you don't have time, I maybe
could help coding. But would it become part uf Mapserver?)</font>
<br>
<br><font size=2 face="sans-serif">Happy new year to everybody</font>
<br><font size=2 face="sans-serif">Benedikt Rothe</font>
--=_alternative 003919A6C12570EA_=--



More information about the mapserver-users mailing list