Have you ever configured -XX:ConcGCThreads to some random value with out understanding much about it. If yes, you should have got stuck with following JVM startup issue,

Java HotSpot(TM) 64-Bit Server VM warning: Can't have more ConcGCThreads (9) than ParallelGCThreads (8).
Error occurred during initialization of VM
Could not create/initialize ConcurrentMark
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

In short, This is an JVM option available for you to configure number of concurrent threads to be used as marker threads in G1GC. In most of the cases the default value (platform specific) should be sufficient. Following is the formula which can help you understand the defaults and it might help you fine tune your JVM configuration

-XX:ParallelGCThreads: if #processor <=8 -> Set 8; else -> Set 8+(#proc-8)*(5/8)
-XX:ConcGCThreads: max((ParallelGCThreads+2)/4, 1)
-XX:G1ConcRefinementThreads: ParallelGCThreads+1

Now the question will be how you will identify the number of processor in Linux system. You can use following command,

cat /proc/cpuinfo | grep processor | wc -l

Good luck with your JVM performance tuning 🙂

Leave a Reply

Your email address will not be published.

WP2Social Auto Publish Powered By : XYZScripts.com