cloudsimplus / cloudsimplus

State-of-the-art Framework 🏗 for Cloud Computing ⛅️ Simulation: a modern, full-featured, easier-to-use, highly extensible 🧩, faster 🚀 and more accurate ☕️ Java 17+ tool for cloud computing research 🎓. Examples: https://github.com/cloudsimplus/cloudsimplus-examples

Home Page:https://cloudsimplus.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vertical VM Scaling

manoelcampos opened this issue · comments

Implement a mechanism for scaling up and down VM resources during simulation execution.

Included Examples

Examples are available here.

Detailed information about how the feature should work

The VM should have a property to enable vertically scaling RAM, CPU and BW.

This can be tricky in real cloud environments, once both hypervisor and guest operating systems may have to support hot adding resources such as RAM and CPU. For instance, it is reported that KVM and Microsoft Hyper-V support such a feature.
However, the guest OS has to provide a so-called "ballon driver" to enable hot addition of memory and CPU (without requiring to reboot the VM).

Approaches

There are two different ways to vertically scale a specific resource, by:

  1. resizing the current resource - the current capacity of a resource such as RAM can be dynamically resized. The VM will continue to have the same number of virtual devices (such as virtual memory cards), but with a different capacity. However, doing the same for CPU may not be possible in actual hypervisors. Thus, the best approach for CPU could be the second one below.
  2. adding another virtual device to a VM - for instance, to vertically scale the RAM, a new virtual memory card can be attached to the VM. A new CPU core can be attached as well. This is like performing a horizontal scaling at the resource level (since more CPUs will be made available).

Vertical scaling of RAM, Storage and BW follows the 1st approach, by resizing the resource to scale it up or down.

Vertical scaling of PEs uses the 2nd approach. Since the VM doesn't have a List of PE objects, but just stores the number of PEs and MIPS capacity of each one, the scaling is performed by just increasing or decreasing the numberOfPes attribute to simulate the addition of a virtual CPU core.

The Processor class is currently being used in the Vm class to put together the numberOfPes and MIPS. Since the Processor implements the ResourceManageable interface, this approach enabled to detect under and overload in a polymorphic way, but the actual scaling of CPU is not implemented polymorphically, due to some design issues.

References

An example scenario where this feature should be used

  • When a VM requires more resources and there are enough resources into the PM that can be assigned to the VM, in order to VM migration.
  • When a VM is requiring more resources and the PM doesn't have enough ones, but other co-hosted VM is not using all allocated resources and would lend it to the requesting VM.

A brief explanation of why you think this feature is useful

It allows physical resources to be used in a more granular and efficient way, reducing resource wastage and VM migrations.

Related Issues

Hi @manoelcampos,

Are you working on this feature? Are you thinking to also implement vertical scaling for hosts?

Cheers,

Hello @giovannifs,
I'm currently entirely re-engineering the network module that clearly was designed just to produce the results shown in the paper where it was presented (NetworkCloudSim paper).
It is not possible to use this module without performing changes in the source code. There is a lot of hardcoded parameters and the code is not totally reusable.

This is my top priority. After that, I will analyse the next feature to work on.