分类: LINUX
2014-04-27 17:54:25
1. 总的默认的Xmx是1000M
在hadoop启动脚本里
JAVA_HEAP_MAX=-Xmx1000m
2. 改 这个文件也可以改总的Xmx ~/hadoop/conf/hadoop-env.sh
# The maximum amount of heap to use, in MB. Default is 1000.
# export HADOOP_HEAPSIZE=2000
3. 改每个进程的单独的Xmx ,直接改 hadoop脚本,比如
elif [ "$COMMAND" = "tasktracker" ] ; then
#### add by lqy for 20140427,so set alone HEAP
JAVA_HEAP_MAX="-Xmx640m"
CLASS=org.apache.hadoop.mapred.TaskTracker
HADOOP_OPTS="$HADOOP_OPTS $HADOOP_TASKTRACKER_OPTS"