Class VmSchedulerTimeSharedOverSubscription

java.lang.Object
org.cloudbus.cloudsim.schedulers.vm.VmSchedulerAbstract
org.cloudbus.cloudsim.schedulers.vm.VmSchedulerTimeShared
org.cloudbus.cloudsim.schedulers.vm.VmSchedulerTimeSharedOverSubscription
All Implemented Interfaces:
VmScheduler

public class VmSchedulerTimeSharedOverSubscription
extends VmSchedulerTimeShared
A Time-Shared VM Scheduler which allows over-subscription. In other words, the scheduler still enables allocating into a Host, VMs which require more CPU MIPS than there is available. If the Host has at least the number of PEs a VM requires, the VM will be allowed to run into it.

The scheduler doesn't in fact allocates more MIPS for Virtual PEs (vPEs) than there is in the physical PEs. It just reduces the allocated amount according to the available MIPS. This is an over-subscription, resulting in performance degradation because less MIPS may be allocated than the required by a VM.

Since:
CloudSim Toolkit 3.0
Author:
Anton Beloglazov, Rodrigo N. Calheiros, Manoel Campos da Silva Filho
  • Constructor Details

    • VmSchedulerTimeSharedOverSubscription

      public VmSchedulerTimeSharedOverSubscription()
      Creates a time-shared over-subscription VM scheduler.
    • VmSchedulerTimeSharedOverSubscription

      public VmSchedulerTimeSharedOverSubscription​(double vmMigrationCpuOverhead)
      Creates a time-shared over-subscription VM scheduler, defining a CPU overhead for VM migration.
      Parameters:
      vmMigrationCpuOverhead - the percentage of Host's CPU usage increase when a VM is migrating in or out of the Host. The value is in scale from 0 to 1 (where 1 is 100%).
  • Method Details

    • isSuitableForVmInternal

      protected boolean isSuitableForVmInternal​(Vm vm, java.util.List<java.lang.Double> requestedMips)
      Checks if a list of MIPS requested by a VM is allowed to be allocated or not. When there isn't the amount of requested MIPS available, this VmScheduler allows to allocate what is available for the requesting VM, allocating less that is requested.

      This way, the only situation when it will not allow the allocation of MIPS for a VM is when the number of PEs required is greater than the total number of physical PEs. Even when there is not available MIPS at all, it allows the allocation of MIPS for the VM by reducing the allocation of other VMs.

      Overrides:
      isSuitableForVmInternal in class VmSchedulerTimeShared
      Parameters:
      vm -
      requestedMips -
      Returns:
      true if the requested MIPS List is allowed to be allocated to the VM, false otherwise
      See Also:
      allocateMipsShareForVm(Vm, List)
    • allocateMipsShareForVm

      protected void allocateMipsShareForVm​(Vm vm, java.util.List<java.lang.Double> requestedMipsReduced)
      Description copied from class: VmSchedulerTimeShared
      Performs the allocation of a MIPS List to a given VM. The actual MIPS to be allocated to the VM may be reduced if the VM is in migration, due to migration overhead.
      Overrides:
      allocateMipsShareForVm in class VmSchedulerTimeShared
      Parameters:
      vm - the VM to allocate MIPS to
      requestedMipsReduced - the list of MIPS to allocate to the VM, after it being adjusted by the VmSchedulerAbstract.getMipsShareRequestedReduced(Vm, List) method.
      See Also:
      VmSchedulerAbstract.getMipsShareRequestedReduced(Vm, List)