Re: Out of memory errors at end of a run
Joan Picanyol i Puig <[email protected]> Thu, 3 Mar 2016 10:05:56 +0100
| Newsgroups | gmane.comp.java.grinder.user |
|---|---|
| Message-ID | <[email protected]> |
Have you tried removing the Test.record wrappers? On a side note, I'm wondering on how you gather metrics: do you have a proxy in the way? * John K <[email protected]> [20160302 14:24]: > Hi Gary, > > Thank you for the reply. I can do as you suggest and break up my Grinder workers but I'm only seeing this OutOfMemory error when my run is coming to an end based on grinder.duration. While it is running, everything is fine so I think that what's happening is that when the Grinder is done and tries to tally up some information, it runs out of memory. > > Since I am gathering metrics another way and not relying on any information from Grinder (I've set all my logging to report only errors and have the data log set to /dev/null to save disk space), I was wondering if there is a way to disable Grinder statistics, as from looking at the error stack, it is crashing when trying to report some statistics that I don't use. > > From: [email protected] > Date: Wed, 2 Mar 2016 13:21:36 +0000 > To: [email protected] > Subject: Re: [Grinder-use] Out of memory errors at end of a run > > John, > I usually allocate about 1GB of RAM per 100 threads, but it is of course very dependent on the complexity of your Jython scripts. > Check out the following article on GC logging which might provide more information on when you're using your memory: > http://grinder.sourceforge.net/g3/garbage-collection.html > For performance and GC pause reasons I'd consider running multiple Grinder instances with less threads, e.g. try 2 x 300 or 4 x 150. > Regards,Gary > On 2 March 2016 at 12:56, John K <[email protected]> wrote: > > > > Hello all, > > I'm running Grinder 3.11 on RHEL 7.2 with the following JDK: > > java version "1.7.0" > Java(TM) SE Runtime Environment (build pxa6470sr6fp1-20140108_01(SR6 FP1)) > IBM J9 VM (build 2.6, JRE 1.7.0 Linux amd64-64 Compressed References 20140106_181350 (JIT enabled, AOT enabled) > J9VM - R26_Java726_SR6_20140106_1601_B181350 > JIT - r11.b05_20131003_47443.02 > GC - R26_Java726_SR6_20140106_1601_B181350_CMPRSS > J9CL - 20140106_181350) > JCL - 20140103_01 based on Oracle 7u51-b11 > > My Python script is just HTTP posts to a servlet and itself is very simple. I'm running this for a 4 hour duration with 7 processes and 600 threads. In my grinder.properties, I have this set "grinder.jvm.arguments=-mx2048M". > > When my run ends, I get lots of heap dumps and error stacks like the below. I already have the memory for each worker thread set to 2GB, do I need to set it even higher? I'm hoping not as I'm reaching the limit in memory on my machine. I'm not using the Grinder statistics for anything so if I can disable them to avoid this error, I'm find with that. > > Any ideas on how to proceed? > > 2016-03-01 18:28:35,512 ERROR worker-bootstrap: Error running worker process > java.lang.OutOfMemoryError: Java heap space > at java.lang.StringBuffer.ensureCapacityImpl(StringBuffer.java:338) ~[na:1.7.0] > at java.lang.StringBuffer.append(StringBuffer.java:204) ~[na:1.7.0] > at java.io.StringWriter.write(StringWriter.java:123) ~[na:1.7.0] > at java.io.PrintWriter.write(PrintWriter.java:467) ~[na:1.7.0] > at java.io.PrintWriter.write(PrintWriter.java:484) ~[na:1.7.0] > at java.io.PrintWriter.print(PrintWriter.java:614) ~[na:1.7.0] > at net.grinder.statistics.StatisticsTable$1.next(StatisticsTable.java:150) ~[grinder-core-3.11.jar:na] > at net.grinder.statistics.TestStatisticsMap$ForEach.iterate(TestStatisticsMap.java:355) ~[grinder-core-3.11.jar:na] > at net.grinder.statistics.StatisticsTable.print(StatisticsTable.java:146) ~[grinder-core-3.11.jar:na] > at net.grinder.engine.process.GrinderProcess.run(GrinderProcess.java:554) ~[grinder-core-3.11.jar:na] > at net.grinder.engine.process.WorkerProcessEntryPoint.run(WorkerProcessEntryPoint.java:86) [grinder-core-3.11.jar:na] > at net.grinder.engine.process.WorkerProcessEntryPoint.main(WorkerProcessEntryPoint.java:59) [grinder-core-3.11.jar:na] > > > ------------------------------------------------------------------------------ > > Site24x7 APM Insight: Get Deep Visibility into Application Performance > > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > > Monitor end-to-end web transactions and take corrective actions now > > Troubleshoot faster and improve end-user experience. Signup Now! > > http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 > _______________________________________________ > > grinder-use mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/grinder-use > > > > > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 > _______________________________________________ > grinder-use mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/grinder-use > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 > _______________________________________________ > grinder-use mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/grinder-use -- pica ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140