Re: out of memory error
Martin Klang <[email protected]> Wed, 31 Aug 2005 22:20:21 +0100
| Newsgroups | gmane.text.xml.o-xml |
|---|---|
| Message-ID | <[email protected]> |
I've now conducted some memory profiling tests. The memory usage appears flat over large numbers of requests and/or high concurrency, detailed results follow. The tests consist of sending repeated HTTP requests, using Apache Bench, to the ObjectBox Servlet. The target program uses several o:Lib types, Java and database extensions, and an XSL transformation of the result XML - it could be said to be of medium complexity. First test 10000 requests total, with 4 concurrent requests at any time. Output from 'top' at the start, middle and end of tests: PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE 136 java 43.6% 2:15:39 44 830 324 100M+ 4.88M 80.1M + 743M+ 136 java 62.8% 2:17:52 44 837 315 101M 4.88M 80.9M + 742M 136 java 0.2% 2:18:33 44 837 314 101M 4.88M 80.9M 742M Second test 1 million requests, with concurrency of 4, over 48 hours. The memory used by the VM stayed at near 100Mb, +/- 2 Mb, during most of the test. Some time after 700000 requests it rose by around 20Mb. After finishing the tests, the VM released the majority of memory in use and shrunk its footprint to 24Mb, about one fifth of the maximum in use. start 1000000 requests 136 java 58.5% 2:18:41 44 837 314 101M 4.88M 80.9M 742M 136 java 62.4% 2:19:13 44 837 316 101M 4.88M 80.1M 742M after 100000: 136 java 69.8% 3:41:21 44 840 318 103M+ 1.12M 73.2M + 746M+ 136 java 76.9% 3:42:02 44 840 314 101M- 1.12M 71.1M- 742M- after 200000: 136 java 84.7% 4:33:34 44 841 316 100M- 1.12M 70.9M- 742M after 400000: 136 java 60.2% 9:35:36 44 843 318 103M+ 1016K 90.1M + 747M+ 136 java 70.2% 9:35:42 44 843 314 100M 1016K 87.2M- 742M- after 600000: 136 java 48.5% 14:52:42 44 848 317 115M+ 580K- 102M + 747M+ 136 java 42.2% 14:53:25 44 848 314 108M 584K 96.5M 742M after 700000: 136 java 68.0% 18:58:31 44 848 314 113M 588K 105M + 742M- after 900000: 136 java 64.0% 28:54:15 44 848 317 130M+ 588K 122M + 747M+ 136 java 62.6% 28:54:28 44 848 314 126M 588K 118M 742M finish 1000000 requests 136 java 0.2% 29:58:53 44 848 316 126M 1.99M 119M 742M 136 java 0.1% 29:59:19 44 848 313 86.4M- 1.02M- 84.8M- 742M 136 java 3.6% 30:00:19 44 848 317 24.8M 620K 23.6M 742M Whereas no significant growth in memory consumption can be seen, memory profiling indicates an increase in DynamicFunction and Type[] objects by just under 500000 new objects (each) after 1.2 million requests. This would indicate a leak - I'm currently investigating the source and a possible solution. regards, /m On 29 Jul 2005, at 21:13, Laura Demange wrote: > I have been having problems with out of memory errors using > o:XML in web services using axis in tomcat. The web services are > written in java and work as follows: When one of its methods is > called, it gets the corresponding o:XML program (using > ProgramProxy), adds java and database extensions, then compiles the > program and runs it with a custom result handler. The out of > memory error occurs after numerous/frequent requests to the service. > > I was just wondering if anyone else has had a similar problem, > or if there is a known memory leak in o:XML? Any ideas or help > would be appreciated. I can provide more info and/or source code if > needed. > > > > Thanks, > > Laura >