title: Java: Executor Service runs slow on linux and not on Windows
body: <p>INITIAL QUESTION:</p>
  
  <p>I have an app that uses     ExecutorService to run 4 fixedThreadPool. When I use this architecture the app runs faster on Windows vice a single threaded architecture. But when I ran the ExecutorService architecture in linux my app's performance was worser than singe threaded app.  </p>
  
  <p>The CPU and other hardwares on both the machines are identical. I even tried on different machines and got the same result. I even tried to limit the fixedThreadPool to 3 or 2 and still got slower performance. What could be the variable that I'm missing causing the slowness in linux machines?</p>
  
  <pre><code>ExecutorService execSvc =
       Executors.newFixedThreadPool(NUMBER_OF_PROCESSORS);
  Perform perform[] = new Perform[n];
  Future&lt;?&gt;[] future = new Future&lt;?&gt;[n];
  for(int i=0;i&lt;n;i++)
     future = execSvc.submit(perform[i]);
  for(int i=0;i&lt;n;i++)
  //To wait until all done
     future[i].get();
  </code></pre>
  
  <p>Both the OS runs on same machine.
  JAVA Version: windows 1.6.0_22, linux Open JDK1.6.0_20</p>
  
  <p>EDIT:</p>
  
  <p>I tried adding -Xincgc on linux and seems like for first few minutes the code runs fast as expected and after that it starts to speed and slow rapidly. Please see that the code chunk I created runs gazillion times in my app and can this indicate that the JVM GC behaves differently in different OS?</p>
  
  <p>AFTER TRIALS:</p>
  
  <p>After trying with 4 different linux machines it looks like the openJDK is causing issue. I shouldn't have installed openJDK in the first place but thanks to @Alfabravo for pointing it out.</p>