【问题标题】:How to implement job migration fault tolerance technique in clousim?如何在clousim中实现作业迁移容错技术?
【发布时间】:2017-12-28 06:44:40
【问题描述】:

我想在cloudsim中为失败的任务实现作业迁移。gitHub等上是否有可用的源代码?

【问题讨论】:

    标签: github machine-learning virtual-machine workflowservice cloudsim


    【解决方案1】:

    CloudSim 不实现 Cloudlet 迁移或故障注入。

    但是,如果您想使用现代、功能齐全、最先进且更易于使用的 CloudSim 分支,请尝试CloudSim Plus。它有一个不迁移 Cloudlets 的故障注入模块,但是当 VM 由于其主机上的故障而发生故障时,会从快照中创建该 VM 的克隆并重新启动 Cloudlets。

    要注入故障并启用虚拟机克隆,您可以执行以下代码:

    long seed = System.currentTimeMillis();
    
    //Creates a random number generator following the Poisson distribution
    //MEAN_FAILURE_NUMBER_PER_HOUR is a constant you have to create
    //to define the mean number of Host failures per hour.
    ContinuousDistribution poisson = new PoissonDistr(MEAN_FAILURE_NUMBER_PER_HOUR, seed);
    
    //The object that will inject random failures into Host's PEs.
    HostFaultInjection fault = new HostFaultInjection(datacenter0, poisson);
    fault.setMaxTimeToFailInHours(800);
    
    //Defines a cloner function (cloneVm method) that will be called 
    //when a VM from a given broker fails due to a Host failure.
    //The call to addVmCloner also defines a method to clone the cloudlets
    //running inside the failed VM. 
    fault.addVmCloner(broker, new VmClonerSimple(this::cloneVm, this::cloneCloudlets)));
    

    要查看和理解完整示例,请关注 CloudSim Plus 中的 this linkfaulinjection package documentation

    【讨论】:

      最近更新 更多