卷曲挂在centos 7 ec2实例上

卷曲挂在centos 7 ec2实例上

我正在尝试运行以下 bash 命令:

seq 1 200 | parallel --eta -j 16 'echo  url: {} && curl -s -o /dev/null https://www.google.com'

在运行即将结束时,该命令会挂起,其中一个或多个curl 命令失败。

如果我将并行进程数减少到 4 个,则该命令始终会完成。尝试使用 5 个和 6 个并行命令有时有效,有时失败。 8 总是失败。

我只需在 shell 脚本中运行一系列命令即可获得类似的结果,如下所示:

curl -s -o /dev/null https://www.google.com &
curl -s -o /dev/null https://www.google.com &
.
. (with 32 curl commands running in the background at once)
.
curl -s -o /dev/null https://www.google.com &
wait

我最初是在 EC2 M4.4xlarge 上遇到这个问题的。升级到M5.4xlarge没有效果,问题依然存在。

我已经执行了 yum 升级。

uname -a

返回:

3.10.0-1160.15.2.el7.x86_64

这显然是某种类型的资源问题,但我无法确定原因。

有人可以建议调整哪些内核参数吗?

相关内容