Hadoop调优手册(1)——HDFS核心参数

  • 以下配置均针对Hadoop3.x系列

1.NameNode、DataNode内存配置

* 配置文件

hadoop-env.sh

* 配置参数

由hadoop-env.sh文件中的描述可知:
(1)守护进程将在 _OPT参数中选择 Xmx设置作为Hadoop内存大小。
(2)Hadoop的内存默认是动态分配的:若在 _OPT参数中没有设置 Xmx,则JVM会根据服务器内存大小,自动为Hadoop分配内存。

# The maximum amount of heap to use (Java -Xmx).  If no unit
# is provided, it will be converted to MB.  Daemons will
# prefer any Xmx setting in their respective _OPT variable.
# There is no default; the JVM will autoscale based upon machine
# memory size.
# export HADOOP_HEAPSIZE_MAX=

# The minimum amount of heap to use (Java -Xms).  If no unit
# is provided, it will be converted to MB.  Daemons will
# prefer any Xms setting in their respective _OPT variable.
# There is no default; the JVM will autoscale based upon machine
# memory size.
# export HADOOP_HEAPSIZE_MIN=

所以,我们需要在以下两个参数中分别设置NameNode和DataNode的内存:

HDFS_NAMENODE_OPTS
HDFS_DATANODE_OPTS

继续看hadoop-env.sh文件中的描述:
NameNode 的具体参数:

###
# NameNode specific parameters
###

# Default log level and output location for file system related change
# messages. For non-namenode daemons, the Java property must be set in
# the appropriate _OPTS if one wants something other than INFO,NullAppender
# Java property: hdfs.audit.logger
# export HDFS_AUDIT_LOGGER=INFO,NullAppender

# Specify the JVM options to be used when starting the NameNode.
# These options will be appended to the options specified as HADOOP_OPTS
# and therefore may override any similar flags set in HADOOP_OPTS
#
# a) Set JMX options
# export
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值