gpt4 book ai didi

hadoop ulimit 打开文件名

转载 作者:可可西里 更新时间:2023-11-01 15:06:20 26 4
gpt4 key购买 nike

我有一个 hadoop 集群,我们假设它的性能非常“糟糕”。节点非常强大.. 24 个内核,60+G RAM ..等。我们想知道是否有一些基本的 linux/hadoop 默认配置阻止 hadoop 充分利用我们的硬件。

有一个post这里描述了一些我认为可能是真的可能性。

我尝试以 root、hdfs 和我自己的身份登录名称节点,并尝试查看 lsof 的输出以及 ulimit 的设置。这是输出,任何人都可以帮助我理解为什么设置与打开的文件数不匹配。

例如,当我以 root 身份登录时。 lsof 看起来像这样:

[root@box ~]# lsof | awk '{print $3}' | sort | uniq -c | sort -nr
7256 cloudera-scm
3910 root
2173 oracle
1886 hbase
1575 hue
1180 hive
801 mapred
470 oozie
427 yarn
418 hdfs
244 oragrid
241 zookeeper
94 postfix
87 httpfs
...

但是当我查看 ulimit 输出时,它看起来像这样:

core file size          (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 806018
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 1024
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

我假设,一个用户打开的文件应该不超过 1024 个,但是,当您查看 lsof 的输出时,一个用户打开了 7000 多个文件,任何人都可以帮忙解释一下这是怎么回事?如果我在理解 ulimitlsof 之间的关系时犯了任何错误,请纠正我。

非常感谢!

最佳答案

您需要检查流程的限制。它可能与您的 shell session 不同:

例如:

[root@ADWEB_HAPROXY3 ~]# cat /proc/$(pidof haproxy)/limits | grep open
Max open files 65536 65536 files
[root@ADWEB_HAPROXY3 ~]# ulimit -n
4096

在我的例子中,haproxy 在其配置文件中有一个指令来更改最大打开文件数,hadoop 也应该有一些东西

关于hadoop ulimit 打开文件名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23705006/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com