title: Why increasing number of workers (more than number of cores) still decrease execution time?
body: <p>I always sure that there is no point to have more threads/processes than CPU cores (from the performance perspective). However, my python sample shows me a different result.</p>
  
  <pre><code>import concurrent.futures
  import random
  import time
  
  
  def doSomething(task_num):
      print("executing...", task_num)
      time.sleep(1)  # simulate heavy operation that takes ~ 1 second    
      return random.randint(1, 10) * random.randint(1, 500)  # real operation, used random to avoid caches and so on...
  
  
  def main():
      # This part is not taken in consideration because I don't want to
      # measure the worker creation time
      executor = concurrent.futures.ProcessPoolExecutor(max_workers=60)
  
      start_time = time.time()
  
      for i in range(1, 100): # execute 100 tasks
          executor.map(doSomething, [i, ])
      executor.shutdown(wait=True)
  
      print("--- %s seconds ---" % (time.time() - start_time))
  
  
  if __name__ == '__main__':
      main()
  </code></pre>
  
  <p>Program results:</p>
  
  <blockquote>
    <p>1 WORKER  --- 100.28233647346497 seconds ---<br>
    2 WORKERS --- 50.26122164726257 seconds ---<br>
    3 WORKERS --- 33.32741022109985 seconds ---<br>
    4 WORKERS --- 25.399883031845093 seconds ---<br>
    5 WORKERS --- 20.434186220169067 seconds ---<br>
    10 WORKERS--- 10.903695344924927 seconds ---<br>
    50 WORKERS--- 6.363946914672852 seconds ---<br>
    60 WORKERS--- 4.819359302520752 seconds ---  </p>
  </blockquote>
  
  <p><strong>How this can work faster having just 4 Logical processors ?</strong></p>
  
  <p>Here is my Computer specifications (Tested on Windows 8 and Ubuntu 14):</p>
  
  <blockquote>
    <p>CPU Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz 
     Sockets: 1 
     Cores:   2
     <strong>Logical processors:    4</strong></p>
  </blockquote>