title: When should I repartition an RDD?
body: <p>I know that I can <code>repartition</code> an RDD to increase its partitions and use coalesce to decrease its partitions. I have two questions regarding this that I cannot completely understand after reading different resources.</p>
  
  <p>Spark will use a sensible default (1 partition per block which is 64MB in first versions and now 128MB) when generating an RDD. But I also read that it is recommended to use 2 or 3 times the number of cores running the jobs. So here comes the question:</p>
  
  <ol>
  <li><p>How many partitions should I use for a given file? For example, suppose I have a 10GB .parquet file, 3 executors with 2 cores and 3gb memory each.
  Should I repartition? How many partitions should I use? What is the better way to make that choice?</p></li>
  <li><p>Are all data types (ie <code>.txt</code>, <code>.parquet</code>, etc..) repartitioned by default if no partitioning is provided?</p></li>
  </ol>