title: Spark ignores SPARK_WORKER_MEMORY?
body: <p>I'm using standalone cluster mode, 1.5.2.</p>
  
  <p>Even though I'm setting <code>SPARK_WORKER_MEMORY</code> in <code>spark-env.sh</code>, it looks like this setting is ignored. </p>
  
  <p>I can't find any indications at the scripts under <code>bin/sbin</code> that <code>-Xms/-Xmx</code> are set. </p>
  
  <p>If I use <code>ps</code> command the worker <code>pid</code>, it looks like memory set to <code>1G</code>:</p>
  
  <pre><code>[hadoop@sl-env1-hadoop1 spark-1.5.2-bin-hadoop2.6]$ ps -ef | grep 20232
  hadoop   20232     1  0 02:01 ?        00:00:22 /usr/java/latest//bin/java 
  -cp /workspace/3rd-party/spark/spark-1.5.2-bin-hadoop2.6/sbin/../conf/:/workspace/
  3rd-party/spark/spark-1.5.2-bin-hadoop2.6/lib/spark-assembly-1.5.2-hadoop2.6.0.jar:/workspace/
  3rd-party/spark/spark-1.5.2-bin-hadoop2.6/lib/datanucleus-api-jdo-3.2.6.jar:/workspace/
  3rd-party/spark/spark-1.5.2-bin-hadoop2.6/lib/datanucleus-rdbms-3.2.9.jar:/workspace/
  3rd-party/spark/spark-1.5.2-bin-hadoop2.6/lib/datanucleus-core-3.2.10.jar:/workspace/
  3rd-party/hadoop/2.6.3//etc/hadoop/ -Xms1g -Xmx1g org.apache.spark.deploy.worker.Worker 
  --webui-port 8081 spark://10.52.39.92:7077
  </code></pre>
  
  <p>spark-defaults.conf:</p>
  
  <pre><code>spark.master            spark://10.52.39.92:7077
  spark.serializer        org.apache.spark.serializer.KryoSerializer
  spark.executor.memory   2g
  spark.executor.cores    1
  </code></pre>
  
  <p>spark-env.sh:</p>
  
  <pre><code>export SPARK_MASTER_IP=10.52.39.92
  export SPARK_WORKER_INSTANCES=1
  export SPARK_WORKER_MEMORY=12g
  </code></pre>
  
  <p>Am I missing something?</p>
  
  <p>Thanks.</p>