mbien commented on code in PR #4284:
URL: https://github.com/apache/netbeans/pull/4284#discussion_r906847815


##########
nbbuild/templates/projectized.xml:
##########
@@ -290,7 +290,7 @@
     <target name="test-lib-init" 
depends="-init-bootclasspath-prepend,init,-build-libs.junit4">
         <path id="test.unit.lib.cp"/>
         <property name="test.jms.flags" value=""/>
-        <property name="test.run.args" value="-ea -Xmx700m 
${metabuild.jms-flags.jvm} ${test.jms.flags} -XX:+IgnoreUnrecognizedVMOptions"/>
+        <property name="test.run.args" value="-ea -Xms1200m -Xmx1200m 
-XX:+UseParallelGC ${metabuild.jms-flags.jvm} ${test.jms.flags} 
-XX:+IgnoreUnrecognizedVMOptions"/>

Review Comment:
   Hi Matthias,
   
   ParallelGC is a generational throughput GC. It is available on all JDKs from 
all hotspot vendors and designed for tasks which are willing to trade latency 
for throughput (batch processing or tests). The GC can do that since it is not 
concurrent, and has therefore no additional runtime overhead (for both CPU and 
heap upkeep overhead).
   
   G1 (new default), Shenandoha and ZGC are the concurrent GCs which try to 
keep latency low but have more overhead. G1 is general purpose, ZGC is mostly 
for very large heaps, Shenandoah scales well from small to large heaps and has 
also lower heap size overhead compared to other concurrent GCs, but is not 
included in Oracle JDKs. (picking between the 3 concurrent GCs is often 
application specific and requires testing)
   
   SerialGC is like parallel just single threaded, nice for small heaps, e.g 
embedded or single threaded micro service deployment (Shenandoah is also nice 
for embedded if you have multiple cores and low throughput).
   
   Our nodes (both gh actions and travis have 2 threads minimum, and 7GB RAM 
(travis might have 4GB)) so we can use ParallelGC instead of SerialGC. Further, 
increasing heap size even allows to run some tests without triggering a GC 
cycle at all. By using a non-concurrent GC we also get lower overhead, even if 
it doesn't run. We could likely further tweak this by increasing Xmx, but the 
gain might be fairly small.
   
   Did I measure that for the tests? No since we have 14h of test jobs. But 
since we are looking for throughput and don't care about latency the choice is 
fairly simple since there is only one GC available on hotspot distributions 
which is made for this usecase.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to