Re: Out of memory errors at end of a run

Gary Mulder <[email protected]> Wed, 2 Mar 2016 13:21:36 +0000
Newsgroups gmane.comp.java.grinder.user
Message-ID <CAKy9zTBAu82LwBeV5o6sPwrQ-DZf1UqOe7hG9w4PLq7c5t7PYg@mail.gmail.com>
--===============5846030408993383052==
Content-Type: multipart/alternative; boundary=047d7bb03ea050fe00052d10c5bc

--047d7bb03ea050fe00052d10c5bc
Content-Type: text/plain; charset=UTF-8

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
>
>

--047d7bb03ea050fe00052d10c5bc
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>John,</div><div><br></div><div>I usually allocate abo=
ut 1GB of RAM per 100 threads, but it is of course very dependent on the co=
mplexity of your Jython scripts.</div><div><br></div>Check out the followin=
g article on GC logging which might provide more information on when you&#3=
9;re using your memory:<div><br></div><blockquote style=3D"margin:0 0 0 40p=
x;border:none;padding:0px"><div><a href=3D"http://grinder.sourceforge.net/g=
3/garbage-collection.html">http://grinder.sourceforge.net/g3/garbage-collec=
tion.html</a></div></blockquote><div><br></div><div>For performance and GC =
pause reasons I&#39;d consider running multiple Grinder instances with less=
 threads, e.g. try 2 x 300 or 4 x 150.</div><div><br></div><div>Regards,</d=
iv><div>Gary</div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_=
quote">On 2 March 2016 at 12:56, John K <span dir=3D"ltr">&lt;<a href=3D"ma=
ilto:[email protected]" target=3D"_blank">[email protected]</a>&gt;</=
span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e=
x;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir=3D"ltr">Hello all,<br><br>I&#39;m running Grinder 3.11 on RHE=
L 7.2 with the following JDK:<br><br>java version &quot;1.7.0&quot;<br>Java=
(TM) SE Runtime Environment (build pxa6470sr6fp1-20140108_01(SR6 FP1))<br>I=
BM J9 VM (build 2.6, JRE 1.7.0 Linux amd64-64 Compressed References 2014010=
6_181350 (JIT enabled, AOT enabled)<br>J9VM - R26_Java726_SR6_20140106_1601=
_B181350<br>JIT=C2=A0 - r11.b05_20131003_47443.02<br>GC=C2=A0=C2=A0 - R26_J=
ava726_SR6_20140106_1601_B181350_CMPRSS<br>J9CL - 20140106_181350)<br>JCL -=
 20140103_01 based on Oracle 7u51-b11<br><br>My Python script is just HTTP =
posts to a servlet and itself is very simple. I&#39;m running this for a 4 =
hour duration with 7 processes and 600 threads. In my grinder.properties, I=
 have this set &quot;grinder.jvm.arguments=3D-mx2048M&quot;.<br><br>When my=
 run ends, I get lots of heap dumps and error stacks like the below. I alre=
ady have the memory for each worker thread set to 2GB, do I need to set it =
even higher? I&#39;m hoping not as I&#39;m reaching the limit in memory on =
my machine. I&#39;m not using the Grinder statistics for anything so if I c=
an disable them to avoid this error, I&#39;m find with that.<br><br>Any ide=
as on how to proceed?<br><br>2016-03-01 18:28:35,512 ERROR worker-bootstrap=
: Error running worker process<br>java.lang.OutOfMemoryError: Java heap spa=
ce<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.lang.StringBuffer.=
ensureCapacityImpl(StringBuffer.java:338) ~[na:1.7.0]<br>=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0 at java.lang.StringBuffer.append(StringBuffer.java=
:204) ~[na:1.7.0]<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.io.=
StringWriter.write(StringWriter.java:123) ~[na:1.7.0]<br>=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0 at java.io.PrintWriter.write(PrintWriter.java:467)=
 ~[na:1.7.0]<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.io.Print=
Writer.write(PrintWriter.java:484) ~[na:1.7.0]<br>=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0 at java.io.PrintWriter.print(PrintWriter.java:614) ~[na:=
1.7.0]<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at net.grinder.statist=
ics.StatisticsTable$1.next(StatisticsTable.java:150) ~[grinder-core-3.11.ja=
r:na]<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at net.grinder.statisti=
cs.TestStatisticsMap$ForEach.iterate(TestStatisticsMap.java:355) ~[grinder-=
core-3.11.jar:na]<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at net.grin=
der.statistics.StatisticsTable.print(StatisticsTable.java:146) ~[grinder-co=
re-3.11.jar:na]<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at net.grinde=
r.engine.process.GrinderProcess.run(GrinderProcess.java:554) ~[grinder-core=
-3.11.jar:na]<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at net.grinder.=
engine.process.WorkerProcessEntryPoint.run(WorkerProcessEntryPoint.java:86)=
 [grinder-core-3.11.jar:na]<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 a=
t net.grinder.engine.process.WorkerProcessEntryPoint.main(WorkerProcessEntr=
yPoint.java:59) [grinder-core-3.11.jar:na]<br> 		 	   		  </div></div>
<br>-----------------------------------------------------------------------=
-------<br>
Site24x7 APM Insight: Get Deep Visibility into Application Performance<br>
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month<br>
Monitor end-to-end web transactions and take corrective actions now<br>
Troubleshoot faster and improve end-user experience. Signup Now!<br>
<a href=3D"http://pubads.g.doubleclick.net/gampad/clk?id=3D272487151&amp;iu=
=3D/4140" rel=3D"noreferrer" target=3D"_blank">http://pubads.g.doubleclick.=
net/gampad/clk?id=3D272487151&amp;iu=3D/4140</a><br>_______________________=
________________________<br>
grinder-use mailing list<br>
<a href=3D"mailto:[email protected]">[email protected]=
ceforge.net</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/grinder-use" rel=3D=
"noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo=
/grinder-use</a><br>
<br></blockquote></div><br></div>

--047d7bb03ea050fe00052d10c5bc--


--===============5846030408993383052==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
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
--===============5846030408993383052==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
grinder-use mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/grinder-use

--===============5846030408993383052==--