如何扩展 Azure VM 内核

How to scale Azure VM Cores

我有一个 Python 代码,我需要 运行 在并行计算的 1000 个 CSV 上进行计算。一个 CPU 核心可以在 8 小时内完成每个 CSV 的代码 运行ning。

因此,我正在寻找一种为此使用 Azure 的方法。我想创建几个虚拟机,比如 4x D5v2,每个 16 个内核,以访问一个 Windows 服务器,该服务器在 64 核机器上 运行s。

我尝试在同一个云服务中创建这些 VM,并将它们放入同一个可用性集中,效果很好。当所有 VM 都处于 运行ning 并且我访问其中任何一个 VM 时,我看到所有其他 VM 上的内核都分配给 "Other Roles".

我的问题是:

1) 是否可以从 4 个 VM 中创建一个假设的 VM 以使用更多内核?

2) 如何手动将云服务中的所有核心分配给一个特定的虚拟机?

1) 是否可以从 4 个 VM 中创建一个假设的 VM 以使用更多内核?

不,你不能。

2) 如何手动将云服务中的所有核心分配给一个特定的虚拟机?

你不能这样做。您需要使用云原生解决方案在多个资源上扩展您的流程。

您最好的解决方案是使用 Azure Batch 通过 Batch 创建一个作业,它会 运行 在您指定的 CPU 上 [=17] =] 上。

取自批处理首页

When you are ready to run a job, Batch starts a pool of compute virtual machines for you, installing applications and staging data, running jobs with as many tasks as you have, identifying failures and re-queuing work and scaling down the pool as work completes. You have control over scale to meet deadlines, manage costs, and run at the right scale for your application.