Intro:
I am currently working on a piece of software where I benchmark a sequential program with a multithreaded one. My hardware has 24 cores available and 16GB of RAM. My program is written in Java but executed from MATLAB due to the need for plotting. Upon opening of MATLAB the following message is displayed:
Picked up JAVA_TOOL:OPTIONS: -XX:parallelGCThreads = 8 - Xmx8g -Dsun.java2d.pmoffscreen = false
Theory
Now in accordance with Amdahl's Law the maksimum performance increase would be defined as 1/(B-(1-B)/P), where B is the sequential fraction and P is the number of processors. In my case I have that B = 0.01, (1-B = .99) and P = 24 This gives me a theoretical maximum performance increase of around 20.
Now, as I understand parallelGCThreads
it is the maximum number of Garbage Collector threads available. After doing some intensive testing on my program it appears that the maximum ratio increase I have been able to achieve was a factor of 7.5 which is no where near the theoretical of 20. However, If I substitute P = 8 I get a theoretical limit of 7.8 which is very close to the one obtained in my program.
Question
Does parallelGCThreads
actually limit the amount of threads such that Amdahl's law should be used with P = 8 and not P = 24?
Thanks in advance!