【发布时间】:2013-06-14 20:00:06
【问题描述】:
在spark-env.sh中,可以配置以下环境变量:
# - SPARK_WORKER_MEMORY, to set how much memory to use (e.g. 1000m, 2g)
export SPARK_WORKER_MEMORY=22g
[...]
# - SPARK_MEM, to change the amount of memory used per node (this should
# be in the same format as the JVM's -Xmx option, e.g. 300m or 1g)
export SPARK_MEM=3g
如果我用这个启动一个独立的集群:
$SPARK_HOME/bin/start-all.sh
我可以在 Spark Master UI 网页上看到,所有工作人员一开始都只有 3GB RAM:
-- Workers Memory Column --
22.0 GB (3.0 GB Used)
22.0 GB (3.0 GB Used)
22.0 GB (3.0 GB Used)
[...]
但是,我在spark-env.sh 中将22g 指定为SPARK_WORKER_MEMORY
我对此有些困惑。可能我不明白“节点”和“工人”之间的区别。
谁能解释这两种内存设置之间的区别以及我可能做错了什么?
我正在使用 spark-0.7.0。另请参阅here 了解更多配置信息。
【问题讨论】:
标签: scala mapreduce apache-spark