I am using the Java fork-join framework to handle calculations using CPU.
I slightly changed the "sequential threshold" (used to determine whether to create subtasks or do the work), but to my disappointment, switching from single-threaded to 4 + 4 cores only doubles overall performance. The pool reports about 8 processors, and when I manually install 2,3,4, I see a gradual increase in performance, but still it reaches almost twice the throughput of one thread. In addition, monitoring Linux system activity is about 50% for this Java process.
Also very suspicious is the fact that when running several Java processes, the collective bandwidth is closer (almost 4 times faster than a single thread), and the System Activity monitor shows a higher level of CPU usage.
Is it possible that there is a restriction in Java, Linux, or a fork / join framework that would prohibit full CPU usage? Any suggestions or similar events?
NB. This is an Intel 3770 processor with four cores and four hyper-threaded cores, working with Oracle Java 7r13 in a Linux Mint box.
source share