I have a 32 GB heap on a 36 core server.
Each day we get 2 ~20s Full GCs.
The default threads used in Full GC for this setup is 25:
java -XX:+PrintFlagsFinal -version| grep ParallelGCThreads
uintx ParallelGCThreads = 25 {product}
Which is slightly lower than the 5/8 suggested by the documentation
I can't reproduce the production load in a test environment so unfortunately I am having to tweak in production.
Assuming that this is the only/main application running on this server, is there any reason to not set the value to the number of CPUs to try to reduce the full GC time?
-XX:ParallelGCThreads=36
Are there any gains to be had in increasing beyond the number of CPUs?
e.g. would it be detrimental to double it?
-XX:ParallelGCThreads=72
NB: I am separately looking at several other options for reducing the Full GC. Therefore, I am only interested in the answer to the specific question asked and not alternative suggestions for optimising the GC.