title: FixedThreadPool not parallel enough
body: <p>I create a fixed threadpool using <code>forPool = Executors.newFixedThreadPool(poolSize);</code> where poolSize is initialized to the number of cores on the processor (lets say 4). In some runs, it works fine and the CPU utilisation is consistently at 400%. </p>
  
  <p>But sometimes, the usage drops to 100%, and never rises back to 400%. I have 1000s of tasks scheduled, so the problem is not that. I catch every exception, but no exception is thrown. So the issue is random and not reproducible, but very much present. They are data parallel operations. At the end of each thread, there is a synchronised access to update a single variable. Highly unlikely I have a deadlock there. In fact, once I spot this issue, if I destroy the pool, and create a fresh one of size 4, it is still only 100% usage. There is no I/O.</p>
  
  <p>It seems counter intuitive to java's assurance of a "FixedThreadPool". Am I reading the guarantee wrong? Is only concurrency guaranteed and not parallelism? </p>
  
  <p>And to the question - Have you come across this issue and solved it? If I want parallelism, am I doing the correct thing?</p>
  
  <p>Thanks!</p>
  
  <p>On doing a thread dump:
  I find that there are 4 threads all doing their parallel operations. But the usage is still ~100% only. Here are the thread dumps at <a href="http://pastebin.com/KwVVmQs1" rel="nofollow">400% usage</a> and <a href="http://pastebin.com/DviSQZWW" rel="nofollow">100% usage</a>. I set the number of threads to 16 to trigger the scenario. It runs at 400% for a while, and then drops to 100%. When I use 4 threads, it runs on 400% and only rarely drops to 100%. <a href="https://github.com/sancha/jrae/blob/master/src/parallel/Parallel.java" rel="nofollow">This</a> is the parallelization code.</p>
  
  <p><em><strong></em>**<em>*</em>***<em></strong> [MAJOR UPDATE] <strong></em>**<em>*</em>**<em>*</em></strong></p>
  
  <p>It turns out that if I give the JVM a huge amount of memory to play with, this issue is solved  and the performance does not drop. But I don't know how to use this information to solve this issue. Help! </p>