Hadoop Kernel tunning

Hadoop性能调优配置
本文介绍了如何通过配置文件limits.conf和sysctl.conf来优化Hadoop集群的性能,包括设置文件描述符数量、内存锁定限制及调整虚拟内存策略等。
/etc/security/limits.conf

@ochadoop soft nofile 102642
@ochadoop hard nofile 102642
@ochadoop soft nproc unlimited
@ochadoop hard nproc unlimited
@ochadoop soft memlock unlimited
@ochadoop hard memlock unlimited

/etc/sysctl.conf

#尽可能少地让应用把内容交换到硬盘
echo "vm.swappiness = 0" >> /etc/sysctl.conf
#可以让应用在请求内存的时候使用交换
echo 'vm.overcommit_memory = 1' >> /etc/sysctl.conf

Mount options:disabling file access time

The real problem with maintaining access time (or
atime as it’s commonly called) is that every time a file is read, the metadata needs to be
updated. That is, for each read, there’s also a mandatory write. This is relatively expensive at scale and can negatively impact the overall performance of Hadoop

sample:

LABEL=/ / ext3 noatime,nodiratime 1 1
LABEL=/data/1 /data/1 ext3 noatime,nodiratime 1 2
LABEL=/data/2 /data/2 ext3 noatime,nodiratime 1 2
LABEL=/data/3 /data/3 ext3 noatime,nodiratime 1 2
LABEL=/data/4 /data/4 ext3 noatime,nodiratime 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda2 swap swap defaults 0 0

转载于:https://www.cnblogs.com/huaxiaoyao/p/5050033.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值