You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hope this message finds you well.
I have been using CloudSim and recently came across what appears to be a potential issue in the implementation of the Power-aware, Best-Fit (PABFD) Virtual Machine allocation policy through the findHostForVm function.
The issue I've observed pertains to the calculation of powerDiff before and after creating a virtual machine on a given host. It seems that the original algorithm, as implemented in CloudSim, does not take into account the presence of other VMs that may already created on the host during the current vmList placement, before allocating the current VM.
To address this, I have made a modification to the code.
Instead of using host.getPower(), I suggest using getUtilizationOfCpuMips(host) to obtain the host's utilization.
This modification allows for a more accurate calculation of powerDiff while considering existing VMs on the host.
Additionally, when allocating a VM on a host that is switched off and has no utilization,
I propose that the cost should be based solely on powerAfterAllocation rather than powerAfterAllocation - powerBeforeAllocation.
This adjustment accounts for the fact that powerBeforeAllocation is equal to zero when the host is switched off.
Here is the modified code snippet that reflects these changes:
Dear CloudSim Development Team,
I hope this message finds you well.
I have been using CloudSim and recently came across what appears to be a potential issue in the implementation of the Power-aware, Best-Fit (PABFD) Virtual Machine allocation policy through the
findHostForVm
function.The issue I've observed pertains to the calculation of
powerDiff
before and after creating a virtual machine on a given host. It seems that the original algorithm, as implemented in CloudSim, does not take into account the presence of other VMs that may already created on the host during the current vmList placement, before allocating the current VM.To address this, I have made a modification to the code.
Instead of using
host.getPower()
, I suggest usinggetUtilizationOfCpuMips(host)
to obtain the host's utilization.This modification allows for a more accurate calculation of
powerDiff
while considering existing VMs on the host.Additionally, when allocating a VM on a host that is switched off and has no utilization,
I propose that the cost should be based solely on
powerAfterAllocation
rather thanpowerAfterAllocation - powerBeforeAllocation
.This adjustment accounts for the fact that
powerBeforeAllocation
is equal to zero when the host is switched off.Here is the modified code snippet that reflects these changes:
`public PowerHost findHostForVm2(Vm vm, Set<? extends Host> excludedHosts) {
double minPower = Double.MAX_VALUE;
PowerHost allocatedHost = null;
I kindly request your consideration of these suggestions for improving the accuracy of the PABFD algorithm in CloudSim.
Best regards,
The text was updated successfully, but these errors were encountered: