如何在 CloudSim Plus 中迁移 Cloudlets?

How to migrate Cloudlets in CloudSim Plus?

我想知道 CloudSim Plus 中是否有允许 Cloudlet 迁移的功能。这意味着 Cloudlet 可以在 VM 上执行或正在等待在 VM 上执行并且可以发送到另一个 VM(可能位于另一个数据中心)以执行。在 CloudSim Plus API 中,我只看到了用于迁移的 VM 分配策略,而没有看到 Cloudlet 迁移。

CloudSim Plus 没有任何方法可以迁移 Cloudlets。在真实的云计算环境中,我们不迁移 Cloudlet,而是迁移 VM 中的容器。此 VM/container 可以托管当前正在执行的 Cloudlet,并且可以迁移到另一个数据中心以继续执行。以这种方式(使用 VMs/containers)迁移 Cloudlets 是有意义的。 VMs/Containers 用于封装应用程序的依赖项和配置。 Cloudlet 迁移是一项复杂的任务,无法自动完成。很难确定必须迁移以允许应用程序 (Cloudlet) 执行的依赖项和配置。

据 CloudSim 和 CloudSim Plus 的主要开发人员介绍:

However, CloudSim Plus doesn't support container abstration and it's not intended to support in the short or medium term. CloudSim 4 includes container support, but the way this feature was implemented (literally by copying and pasting entire packages of classes) made us to create CloudSim Plus as an independent fork.

了解 Cloudlet 在 运行 时映射到 Vm 的时间也很重要,它不能更改,因为这将允许 Cloudlet 迁移到 CloudSim 不允许的不同 Vm .作为替代方案,您可以尝试定义自己的策略,将传入的 Cloudlet 映射到位于 运行 time/dynamically 的 Vms(选择 Vms 来执行 Cloudlet)。

您可以通过扩展 DatacenterBrokerSimple class 和更改 defaultVmMapper() 方法来实现。如果您的策略无法将 Cloudlet 映射到 Vm,它将调用 DatacenterBrokerSimple 中的 defaultVmMapper

DatacenterBrokerSimple 中的 setVmMapper() 方法允许您定义一个策略,在 运行 时间将 Cloudlet 映射到 Vm(它设置适当的映射器方法)。此方法可用于在 运行 时间更改策略。

要了解更多信息,请参阅 2 CloudSim Plus Google 群组论坛: 1, 2.