gpt4 book ai didi

azure - 此 Azure Batch Autoscale 公式的含义是什么?

转载 作者:行者123 更新时间:2023-12-03 05:47:03 25 4
gpt4 key购买 nike

这是来自 Azure 文档的示例。然而,我发现这很令人困惑。

startingNumberOfVMs = 1;
maxNumberofVMs = 25;
pendingTaskSamplePercent = $PendingTasks.GetSamplePercent(180 * TimeInterval_Second);
pendingTaskSamples = pendingTaskSamplePercent < 70 ? startingNumberOfVMs : avg($PendingTasks.GetSample(180 * TimeInterval_Second));
$TargetDedicatedNodes=min(maxNumberofVMs, pendingTaskSamples);

我对这个公式的看法是:

- We start with 1 VM
- The maximum VM we can reach to is 25
- PendingTasks = the number of running VM. Let say 10 VMs are running.
- In last 180 seconds, if the percent of pending task < 70% (that means < 3 VM running?) then ...

请有人详细解释一下,因为我对此没有任何经验。

最佳答案

对于自动缩放公式:

The Batch service uses your formula to determine the target number of compute nodes in the pool for the next interval of processing.

所以这个例子的意思是:

Batch 池从 1 个节点开始,最大节点数为 25。这意味着最多只能有 25 个节点。

并且在下一个处理间隔中,如果公式发现最近 180 秒内的平均待处理任务数小于 70(您可以根据自己的环境更改此数字),则表示待处理任务是数量不会太多,工作也不会太重。所以目标节点仍然是1,不需要增长。但如果平均数量超过70,则目标节点需要自动缩放。该公式确保专用节点的目标数量永远不会超过 25 个虚拟机。所以

$TargetDedicatedNodes=min(maxNumberofVMs, pendingTaskSamples)

随着新任务的提交,池会自动增长。任务完成后,虚拟机将逐个释放,自动缩放公式会缩小池大小。

这就是我对批量自动缩放的理解。希望这会对您有所帮助。

关于azure - 此 Azure Batch Autoscale 公式的含义是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52925265/

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