Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HostSimple.getUtilizationOfCpuMips() doesn't return the actual CPU utilization #135

Closed
manoelcampos opened this issue May 31, 2018 · 0 comments
Assignees
Labels

Comments

@manoelcampos
Copy link
Collaborator

manoelcampos commented May 31, 2018

Actual behavior

The HostSimple.getUtilizationOfCpuMips() computes the total of MIPS used across its physical PEs as the sum of the total allocated MIPS of all its VMs. However, the amount of allocated MIPS for each VM is usually the amount of MIPS each VM requested. Since how the VM uses CPU depends in its Cloudlets and the Cloudlet's UtilizationModel for CPU, a VM may use less CPU than the total MIPS requested during VM creation. This total MIPS is just the maximum amount of MIPS a VM is allowed to use from its Host.

The VmAllocationPolicyMigrationAbstract is also considering a Host is overloaded based on the total requested MIPS.

Computing the Host CPU usage that way gives the wrong idea that a VM is always using all the allocated MIPS capacity.

Expected behavior

The HostSimple.getUtilizationOfCpuMips() method should sum up the Vm.getTotalCpuMipsUsage() of all its VMs to compute the actual Host CPU usage for the current time.

The VmAllocationPolicyMigrationAbstract should continue to use the total allocated MIPS to check if a Host has enough MIPS to place a VM. However, when checking if a Host is overloaded to start VM migration, it has to use the actual Host CPU usage by calling the HostSimple.getUtilizationOfCpuMips() method (after changing it as discussed in the previous paragraph).

Checking if a Host is underload has to be kept as it is: using the total allocated MIPS, since the underloaded Host is defined based mainly on the number of used PEs. If there are 4 VMs using all the Host's PEs at only 10%, the Host is clearly underloaded. But we can't migrate such VMs because they are in fact using all PEs from that Host. Here we have a different issue which is not tackled by the simulator: underloaded VMs.

Specifications like the version of the project, operating system or workload file used

CloudSim Plus 2.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant