title: Why does cloudera recommend choosing the number of executors, cores, and RAM they do in Spark
body: <p>In the blog post:</p>
  
  <p><a href="http://blog.cloudera.com/blog/2015/03/how-to-tune-your-apache-spark-jobs-part-2/" rel="nofollow">http://blog.cloudera.com/blog/2015/03/how-to-tune-your-apache-spark-jobs-part-2/</a></p>
  
  <p>I was going about it in the naive way:</p>
  
  <p>given 16 cores, 64 RAM, 8 threads - use 15 cores, 63 RAM, 6 executors.</p>
  
  <p>Instead they recommend 17 executors, 5 cores, and 19 RAM. I see that they have an equation for RAM but I have no idea what’s going on.</p>
  
  <p>Also does this still hold true if you are running it only on one machine(not through HDFS)?</p>
  
  <p>Thanks for the help</p>