title: Should I use every core when doing parallel processing in R?
body: <p>I'm using R to convert some shapefiles. R does this using just one core of my processor, and I want to speed it up using parallel processing. So I've parallelized the process like this.</p>
  
  <p>Given <code>files</code> which is a list of files to convert:</p>
  
  <pre><code>library(doMC)
  registerDoMC()
  
  foreach(f=files) %dopar% {
    # Code to do the conversion
  }
  </code></pre>
  
  <p>This works just fine and it uses 2 cores. According to the <a href="http://www.rdocumentation.org/packages/doMC/functions/registerDoMC">documentation</a> for <code>registerDoMC()</code>, by default that function uses half the cores detected by the <code>parallel</code> package. </p>
  
  <p>My question is why should I use half of the cores instead of all the cores? (In this case, 4 cores.) By using the function <code>registerDoMC(detectCores())</code> I can use all the cores on my system. What, if any, are the downsides to doing this?</p>