YARN 中作业的聚合资源分配
Aggregate Resource Allocation for a job in YARN
我是 Hadoop 新手。当我 运行 一个作业时,我看到该作业的总资源分配为 251248654 MB 秒,24462 vcore 秒。但是,当我找到有关集群的详细信息时,它显示总共有 888 Vcores 和 15.90 TB Memory-total。谁能告诉我这有什么关系? MB-second 和 Vcore-seconds 指的是什么。
网上有material知道这些吗?我试过上网,没得到正确答案
VCores-Total: Indicates the total number of VCores available in the cluster
Memory-Total: Indicates the total memory available in the cluster.
例如我有一个单节点集群,其中,我将每个容器的内存要求设置为:1228 MB(由配置确定:yarn.scheduler.minimum-allocation-mb
),每个容器的 vCore 设置为 1 vCore(由配置确定:yarn.scheduler.minimum-allocation-vcores
) .
我已将 yarn.nodemanager.resource.memory-mb
设置为 9830 MB。因此,每个节点总共可以有 8 个容器 (9830 / 1228 = 8)。
因此,对于我的集群:
VCores-Total = 1 (node) * 8 (containers) * 1 (vCore per container) = 8
Memory-Total = 1 (node) * 8 (containers) * 1228 MB (memory per container) = 9824 MB = 9.59375 GB = 9.6 GB
下图显示了我的集群指标:
现在让我们看看 “MB 秒” 和 “vcore 秒”。
根据代码中的描述(ApplicationResourceUsageReport.java):
MB-seconds:应用程序已分配的内存总量(以兆字节为单位)乘以应用程序已分配的秒数运行。
vcore-seconds:应用程序分配的 vcore 总数乘以应用程序已分配的秒数 运行。
描述是不言自明的(记住关键字:聚合)。
让我举个例子来解释一下。
我 运行 一个 DistCp 作业(产生了 25 个容器),为此我得到了以下信息:
Aggregate Resource Allocation: 10361661 MB-seconds, 8424 vcore-seconds
现在,让我们粗略计算一下每个容器花费的时间:
For memory:
10361661 MB-seconds = 10361661 / 25 (containers) / 1228 MB (memory per container) = 337.51 seconds = 5.62 minutes
For CPU
8424 vcore-seconds = 8424 / 25 (containers) / 1 (vCore per container) = 336.96 seconds = 5.616 minutes
这表明平均每个容器执行时间为 5.62 分钟。
我希望这能说明问题。您可以执行作业并自行确认。
我是 Hadoop 新手。当我 运行 一个作业时,我看到该作业的总资源分配为 251248654 MB 秒,24462 vcore 秒。但是,当我找到有关集群的详细信息时,它显示总共有 888 Vcores 和 15.90 TB Memory-total。谁能告诉我这有什么关系? MB-second 和 Vcore-seconds 指的是什么。
网上有material知道这些吗?我试过上网,没得到正确答案
VCores-Total: Indicates the total number of VCores available in the cluster
Memory-Total: Indicates the total memory available in the cluster.
例如我有一个单节点集群,其中,我将每个容器的内存要求设置为:1228 MB(由配置确定:yarn.scheduler.minimum-allocation-mb
),每个容器的 vCore 设置为 1 vCore(由配置确定:yarn.scheduler.minimum-allocation-vcores
) .
我已将 yarn.nodemanager.resource.memory-mb
设置为 9830 MB。因此,每个节点总共可以有 8 个容器 (9830 / 1228 = 8)。
因此,对于我的集群:
VCores-Total = 1 (node) * 8 (containers) * 1 (vCore per container) = 8
Memory-Total = 1 (node) * 8 (containers) * 1228 MB (memory per container) = 9824 MB = 9.59375 GB = 9.6 GB
下图显示了我的集群指标:
现在让我们看看 “MB 秒” 和 “vcore 秒”。 根据代码中的描述(ApplicationResourceUsageReport.java):
MB-seconds:应用程序已分配的内存总量(以兆字节为单位)乘以应用程序已分配的秒数运行。
vcore-seconds:应用程序分配的 vcore 总数乘以应用程序已分配的秒数 运行。
描述是不言自明的(记住关键字:聚合)。
让我举个例子来解释一下。 我 运行 一个 DistCp 作业(产生了 25 个容器),为此我得到了以下信息:
Aggregate Resource Allocation: 10361661 MB-seconds, 8424 vcore-seconds
现在,让我们粗略计算一下每个容器花费的时间:
For memory:
10361661 MB-seconds = 10361661 / 25 (containers) / 1228 MB (memory per container) = 337.51 seconds = 5.62 minutes
For CPU
8424 vcore-seconds = 8424 / 25 (containers) / 1 (vCore per container) = 336.96 seconds = 5.616 minutes
这表明平均每个容器执行时间为 5.62 分钟。
我希望这能说明问题。您可以执行作业并自行确认。