title: Spark set more node worker instances in nodes with larger memory
body: <p>In my Spark (1.6.1) cluster some nodes have more physical memory than others. However in <code>executor.memory</code> I have to put a fix value that applies equally to each node and hence to each node's worker. </p>
  
  <p>Some nodes have twice as much memory but cannot use it all. A work around to utilize <em>all</em> the available memory is proposed <a href="https://stackoverflow.com/q/34875550/6138883">here</a> where the number of node workers is increased in nodes with more memory using <code>SPARK_WORKER_INSTANCES</code>. </p>
  
  <p>How to configure worker instances for each node ?</p>