be.ac.ua.broker.allocation.reserved
Class TippingPointCalculator
java.lang.Object
be.ac.ua.broker.allocation.reserved.TippingPointCalculator
public class TippingPointCalculator
- extends java.lang.Object
Calculator used during the resource allocation phase of the broker, to
determine the tipping point utilization ratio for when reserved is cheaper
than using an on-demand instance. It is also used to determine the tipping
point utilization ratio for when reserved is cheaper than using a spot
instance (uses the average spot price of the schedule period).
- Author:
- Vermeersch Kurt
Method Summary |
static boolean |
determineReservedvsSpot(InstanceSpecification inst,
int nrSpotEnabledSubtasks,
int nrNonSpotEnabledSubtasks,
java.util.Date start,
java.util.Date end)
Determine the tipping point utilization ratio for when a reserved
instance becomes cheaper than using a spot instance. |
static long |
determineThresholdReservedOnDemand(InstanceSpecification inst)
Determine the tipping point utilization ratio for when a reserved
instance becomes cheaper than using an on-demand instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TippingPointCalculator
public TippingPointCalculator()
determineThresholdReservedOnDemand
public static long determineThresholdReservedOnDemand(InstanceSpecification inst)
- Determine the tipping point utilization ratio for when a reserved
instance becomes cheaper than using an on-demand instance.
- Parameters:
inst
- the instance specification to determine the threshold value
for
- Returns:
- the tipping for reserved versus on-demand
determineReservedvsSpot
public static boolean determineReservedvsSpot(InstanceSpecification inst,
int nrSpotEnabledSubtasks,
int nrNonSpotEnabledSubtasks,
java.util.Date start,
java.util.Date end)
- Determine the tipping point utilization ratio for when a reserved
instance becomes cheaper than using a spot instance. Note that in this
calculation the average spot price during the whole scheduling period is
being used. The number of task hours that are scheduled on the instance
that originate from a spot-enabled task and the number of hours from a
not spot-enabled task are taken into account as well.
- Parameters:
inst
- the instance specification to determine the threshold value
fornrSpotEnabledSubtasks
- number of task hours scheduled on the instance originating
from spot-enabled tasksnrNonSpotEnabledSubtasks
- number of task hours scheduled on the instance originating
from not spot-enabled tasksstart
- start time of the scheduleend
- end time of the schedule
- Returns:
- the tipping for reserved versus spot