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

UtilizationModel may enable a Cloudlet to use more resources than its VM has available #126

Closed
manoelcampos opened this issue Apr 16, 2018 · 0 comments
Assignees
Labels

Comments

@manoelcampos
Copy link
Collaborator

manoelcampos commented Apr 16, 2018

UtilizationModel (UM) defines how a Cloudlet uses VM resources. Implementations such as UtilizationModelFull define that the Cloudlet will use 100% of a specific resource all the time.

VM PEs (CPU) can be shared among multiple Cloudlets, according to the CloudletScheduler used. For instance, a CloudletSchedulerTimeShared enables the same VM PE to be used at different times by multiples Cloudlets. Each Cloudlet uses the PE at a specific time and then it is preempted so that the next one can start using the PE. The PE capacity used by a Cloudlet is defined by its CPU UtilizationModel.

On the other hand, resources such as RAM and BW don't have such preemption mechanism, meaning that a specific portion of such resources cannot be used at the same time by multiple Cloudlets. In real environments, it's possible to use virtual memory for RAM (which is like CPU preemption), but such a feature isn't supported by simulation yet (see #170).

Consider the RAM resource. If there are 4 Cloudlets running in a VM and they use a UtilizationModelFull, then the total amount of used RAM will be 400%, that is more than the VM has available.

Expected behavior

When a Cloudlet requests an amount of resource which is not available, just the amount available should be allocated to it. This way, a UtilizationModelFull should be used for RAM, CPU or BW only if there is just one Cloudlet running at a time inside a given VM.

There are several ways to make just one Cloudlet to be executed in a VM at a time. For instance, if a CloudletSchedulerSpaceShared is used and the number of VM PEs is equal to the number of PEs required by each submitted Cloudlet, just one Cloudlet will run at a time.

Actual behavior

Each Cloudlet requests the amount of resources according to the rules defined by the UM. The CloudletSchedulerAbstract updates the processing of Cloudlets and sum up the total amount of a specific resource requested by all Cloudlets. If such amount is greater than the VM capacity, no resource is allocated at all. This way, if a call such as vm.getRam().getAllocatedResource() is made, the result will be zero.

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

This is an issue existing in CloudSim at least as far as version 3.0.3 and that was inherited by CloudSim Plus since version 1.0.

NOTICE

Current examples using a UtilizationModelFull for RAM and BW may show that such resources requested by some Cloudlets will not be allocated due to insufficient capacity. If such resources are important for your simulations, you must exchange the UtilizationModelFull by other implementations such as UtilizationModelDynamic or UtilizationModelStochastic.

For instance, if you have 4 Cloudlets to run inside the same VM, you can define the RAM UtilizationModel for each Cloudlet to use 25% of the total VM's RAM, as below:

UtilizationModelDynamic ramUtilization = new UtilizationModelDynamic(0.25);
cloudlet.setUtilizationModelRam(ramUtilization);

Without such changes, the first Cloudlet will use 100% of the VM's RAM and other running Cloudlets will not get the requested resource.

@manoelcampos manoelcampos added this to the CloudSim Plus 1.4 milestone Apr 16, 2018
@manoelcampos manoelcampos self-assigned this Apr 16, 2018
@manoelcampos manoelcampos modified the milestones: CloudSim Plus 1.4, CloudSim Plus 2.0 Apr 20, 2018
@manoelcampos manoelcampos added network Issues related to the Network Module and removed network Issues related to the Network Module labels Mar 20, 2019
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