<div dir="ltr"><div>Ok, so the biggest problem is that TestNG keeps test instances around until the end of the test suite, and many of our tests are quite heavyweight because they keep references to caches/managers even after they finish. I&#39;ve opened a PR to set those fields to null, fix some smaller leaks, and use -XX:+UseG1GC -XX:-TieredCompilation, and I&#39;m getting ~ 11 mins on my laptop.<br></div><br><div><a href="https://github.com/infinispan/infinispan/pull/5768">https://github.com/infinispan/infinispan/pull/5768</a><br><br></div><div>It&#39;s still a lot, especially knowing that not long ago it would take half of that, but making it shorter would probably involve looking deeper into the (many) tests that we&#39;ve added in the last year or so.<br><br></div><div>Cheers<br></div><div>Dan<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 16, 2018 at 8:05 AM, Dan Berindei <span dir="ltr">&lt;<a href="mailto:dan.berindei@gmail.com" target="_blank">dan.berindei@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Yeah, I got a much slower run with the default collector (parallel):<br><br></div>[INFO] Total time: 17:45 min<br></div>GC Time: 2m 43s<br></div>Compile time: 18m 20s<br><br></div>I&#39;m not sure if it&#39;s really the GC affecting the compile time or there&#39;s another factor hiding there. But I did get a heap dump and I&#39;m analyzing it now.<br><br></div><div>Cheers<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">Dan<br><br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 15, 2018 at 1:59 PM, Dan Berindei <span dir="ltr">&lt;<a href="mailto:dan.berindei@gmail.com" target="_blank">dan.berindei@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Hmmm, I didn&#39;t notice that I was running with -XX:+UseG1GC, so perhaps our test suite is a pathological case for the default collector?<br><br>[INFO] Total time: 12:45 min<br></div>GC Time: 52.593s<br></div>Class Loader Time: 1m 26.007s<br></div>Compile Time: 10m 10.216s<br><br></div>I&#39;ll try without -XX:+UseG1GC later.<br><br></div>Cheers<span class="m_3007169044812459004HOEnZb"><font color="#888888"><br></font></span></div><span class="m_3007169044812459004HOEnZb"><font color="#888888">Dan<br><br></font></span></div><div class="m_3007169044812459004HOEnZb"><div class="m_3007169044812459004h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 15, 2018 at 1:39 PM, Dan Berindei <span dir="ltr">&lt;<a href="mailto:dan.berindei@gmail.com" target="_blank">dan.berindei@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>And here I was thinking that by adding  -XX:+HeapDumpOnOutOfMemoryErro<wbr>r anyone would be able to look into OOMEs and I wouldn&#39;t have to reproduce the failures myself :)<span class="m_3007169044812459004m_6817175125519693740HOEnZb"><font color="#888888"><br><br></font></span></div><span class="m_3007169044812459004m_6817175125519693740HOEnZb"><font color="#888888">Dan<br><br></font></span></div><div class="m_3007169044812459004m_6817175125519693740HOEnZb"><div class="m_3007169044812459004m_6817175125519693740h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 15, 2018 at 1:32 PM, William Burns <span dir="ltr">&lt;<a href="mailto:mudokonman@gmail.com" target="_blank">mudokonman@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">So I must admit I had noticed a while back that I was having some issues with running the core test suite. Unfortunately at the time CI and everyone else seemed to not have any issues. I just ignored it because at the time I didn&#39;t need to run core tests. But now that Sanne pointed this out, by increasing the heap variable in the pom.xml, I was for the first time able to run the test suite completely. It would normally hang for an extremely long time near the 9k-10K test completed point and never finish for me (at least I didn&#39;t wait long enough).<div><br></div><div>So it definitely seems there is something leaking in the test suite causing the GC to use a ton of CPU time.</div><div><br></div><div> - Will</div></div><div class="m_3007169044812459004m_6817175125519693740m_3583478723759476322HOEnZb"><div class="m_3007169044812459004m_6817175125519693740m_3583478723759476322h5"><br><div class="gmail_quote"><div dir="ltr">On Thu, Feb 15, 2018 at 5:40 AM Sanne Grinovero &lt;<a href="mailto:sanne@infinispan.org" target="_blank">sanne@infinispan.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Dan.<br>
<br>
Do you happen to have observed the memory trend during a build?<br>
<br>
After a couple more attempts it passed the build once, so that shows<br>
it&#39;s possible to pass.. but even though it&#39;s a small sample so far<br>
that&#39;s 1 pass vs 3 OOMs on my machine.<br>
<br>
Even the one time it successfully completed the tests I see it wasted<br>
~80% of total build time doing GC runs.. it was likely very close to<br>
fall over, and definitely not an efficient setting for regular builds.<br>
Observing trends on my machine I&#39;d guess a reasonable value to be<br>
around 5GB to keep builds fast, or a minimum of 1.3 GB to be able to<br>
complete successfully without often failing.<br>
<br>
The memory issues are worse towards the end of the testsuite, and<br>
steadily growing.<br>
<br>
I won&#39;t be able to investigate further as I need to urgently work on<br>
modules, but I noticed there are quite some MBeans according to<br>
JConsole. I guess it would be good to check if we&#39;re not leaking the<br>
MBean registration, and therefore leaking (stopped?) CacheManagers<br>
from there?<br>
<br>
Even near the beginning of the tests, when forcing a full GC I see<br>
about 400MB being &quot;not free&quot;. That&#39;s quite a lot for some simple<br>
tests, no?<br>
<br>
Thanks,<br>
Sanne<br>
<br>
<br>
On 15 February 2018 at 06:51, Dan Berindei &lt;<a href="mailto:dan.berindei@gmail.com" target="_blank">dan.berindei@gmail.com</a>&gt; wrote:<br>
&gt; forkJvmArgs used to be &quot;-Xmx2G&quot; before ISPN-8478. I reduced the heap to 1G<br>
&gt; because we were trying to run the build on agent VMs with only 4GB of RAM,<br>
&gt; and the 2GB heap was making the build run out of native memory.<br>
&gt;<br>
&gt; I&#39;ve yet to see an OOME in the core tests, locally or in CI. But I also<br>
&gt; included -XX:+HeapDumpOnOutOfMemoryErro<wbr>r in forkJvmArgs, so assuming there&#39;s<br>
&gt; a new leak it should be easy to track down in the heap dump.<br>
&gt;<br>
&gt; Cheers<br>
&gt; Dan<br>
&gt;<br>
&gt;<br>
&gt; On Wed, Feb 14, 2018 at 11:46 PM, Sanne Grinovero &lt;<a href="mailto:sanne@infinispan.org" target="_blank">sanne@infinispan.org</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hey all,<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m having OOMs running the tests of infinispan-core.<br>
&gt;&gt;<br>
&gt;&gt; Initially I thought it was related to limits and security as that&#39;s<br>
&gt;&gt; the usual suspect, but no it&#39;s really just not enough memory :)<br>
&gt;&gt;<br>
&gt;&gt; Found that the root pom.xml sets a &lt;forkJvmArgs&gt; property to Xmx1G for<br>
&gt;&gt; surefire; I&#39;ve been observing the growth of heap usage in JConsole and<br>
&gt;&gt; it&#39;s clearly not enough.<br>
&gt;&gt;<br>
&gt;&gt; What surprises me is that - as an occasional tester - I shouldn&#39;t be<br>
&gt;&gt; the one to notice such a new requirement first. A leak which only<br>
&gt;&gt; manifests in certain conditions?<br>
&gt;&gt;<br>
&gt;&gt; What do others observe?<br>
&gt;&gt;<br>
&gt;&gt; FWIW, I&#39;m running it with 8G heap now and it&#39;s working much better;<br>
&gt;&gt; still a couple of failures but at least they&#39;re not OOM related.<br>
&gt;&gt;<br>
&gt;&gt; Thanks,<br>
&gt;&gt; Sanne<br>
&gt;&gt; ______________________________<wbr>_________________<br>
&gt;&gt; infinispan-dev mailing list<br>
&gt;&gt; <a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/infinispan-dev</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ______________________________<wbr>_________________<br>
&gt; infinispan-dev mailing list<br>
&gt; <a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/infinispan-dev</a><br>
______________________________<wbr>_________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/infinispan-dev</a><br>
</blockquote></div>
</div></div><br>______________________________<wbr>_________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/infinispan-dev</a><br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>