• Keine Ergebnisse gefunden

6 Dynamic Resource Management

A way out of this problem is to directly measure the targeted QoS attribute (e.g. response time or throughput), for which a performance goal is defined in the SLO. In case of violations, obviously a resource shortage has been detected that must be caused by incorrectly forecasted resource demand. The respective service must support to measure such QoS attribute and to send this information to the resource management to apply this technique.

An artificial resource buffer can be used, if a direct feedback from the service is not applicable.

Slightly less resource capacity than actually present can be defined for each server to generate this buffer. Exceeding demand can be directly measured as long as this buffer is not depleted.

6.5.3 Adapting the Model

Adapting the models to changes at runtime can help to prevent unexpected resource shortages in the future. Once the models are changed, the scheduling algorithms directly adapts these changes, when it looks for upcoming resource shortages or when it tries to consolidate VMs.

Adapting the long term trend is quite simple. The parameters of the forecasting model LTi(t) are continuously updated by new ones, which are determined using the demand behavior observed at runtime.

The resourcesRi(t) that have actually been demanded by each VMiat runtime are required to update the models that describe the seasonal trend and the noise. The resource capacity Ai(t) that should have been provided to the VM to not violate any SLO can be determined from this resource demand the same way like used before to characterize the model ˆAi(t) itself.

The respective values in ˆAi(t) must be updated upwards, if the result exceeds the forecasts of the model.

The actual resource demand can be determined either indirectly by getting feedback from the service or directly using an artificial resource buffer as discussed in previous section.

A model similar to the one introduced in Section 5.2.3 is needed in the first case. This model must map the difference between the required and the actual value of the targeted performance metric onto the additionally required resource capacity. The actual resource demand can then be determined from the measured value of the performance metric using this model.

In the second case, the actual resource demand can be directly measured from the virtual-ization environment. The measures equal the demand as long as the demand does not exceed the provided capacity including the additional buffer. Increased demand behavior has been detected but cannot be quantified exactly, when the demand exceeds the capacity reserve. The models are only adjusted upwards by the size of the buffer in this case. This can require to update the model later again to capture the whole increase of the demand.

122

6.5 Changes in Demand Behavior

6.5.4 Resolving Resource Shortages

Slightly increasing the forecasted resource demand must not necessarily lead to resource short-ages. Unused capacity caused by discretization effects can be used to compensate such ex-ceedances as already discussed. This remaining capacity can be provided to all VMs currently placed on a server as shared resources. Resource shortages will not occur this way before the additional capacity is depleted by one or more VMs.

The dynamic resource management must react, if nonetheless resource shortages occur.

The models that describe the demand behavior of one or more VMs seem not to be valid any longer. Hence, they should not be used for dynamic resource management any more. Instead, the scheduling algorithm allocates the maximally required resource capacity Amaxi for the affected VMs to not violate the respective SLOs any more. The resolve part of the dynamic scheduling algorithm can be used to immediately free the additional resource capacity required.

Setting the required resources for a VM to the respective Amaxi informs the algorithm about the resource shortage, which is then resolved by an appropriate sequence of redistribution operations.

Time dependent resource demand variations of the VM are not considered for dynamic resource management any more once the forecasting model of a VM has been disabled. The achievable energy savings are reduced. The administrator must analyze the reason of the deviation between the forecasts and the actual demand of a VM. The original model can be reactivated again without any changes in case of an onetime event. Otherwise, the new demand behavior must be observed and the whole characterization process (cf. Section 6.3.3) must be repeated again.

6.5.5 Limiting the Impact of Changed Demand Behavior

Two additional parameters have been worked out in Section 6.2 that should be part of the SLA, when dynamic resource management is applied. The purpose of both is to limit the impact of resource shortages caused by unexpected demand behavior of VMs.

The first one, ∆tresolvei , defines the maximal duration of possible resource shortages of a VMi. It must be ensured that any possible resource shortage can be resolved in a time period shorter than ∆tresolvei to meet this constraint. In worst case, a resource shortages can be only resolved by completely restoring the safe distribution of VMs to servers. This will not take longer than specified by the actual planning period ∆tf traccording to the dynamic scheduling algorithm. Hence, the scheduling algorithm must ensure that the resulting planning period

∆tf tr does never exceed the limit ∆tresolvei .

The second parameterAmini ensures a minimal QoS by reserving a fixed amount of resource capacity at any time. The scheduling algorithm must consider following additional constraint

6 Dynamic Resource Management

to support this parameter:

∀k, t: X

i:B(i,t)=k

Amini ≤Ck. (6.12)

The sum of resourcesAmini minimally required by all VMsiplaced on the same server must not exceed its capacity. Furthermore, the virtualization environment must ensure that independent from Ai(t) the respective minimal amount of resource capacityAmini is reserved for each VM at any time.

6.5.6 Discussion

The efficiency the dynamic resource management can deal with changed demand concerning energy savings and occurring SLO violations strongly depends on the kind of changes. Hence, different kinds of possible changes will be presented and discussed in the following. Further-more, some questions are left open for ongoing research. They will be discussed in the following as well.

Different Kinds of Changes

It can be distinguished mainly between three types of changed demand behavior.

First, unexpected demand behavior in an instance of the predominant period can occur that has not yet been observed in the past (e.g. on a bank holiday during normal weekly work).

The model for the seasonal trend and the noise will be adapted as described in Section 6.5.3, if the observed demand is higher than the expected one. The changes will take effect in the next instance of the period.

The adapted models lead to wasted resources from now on, if the unexpected demand behav-ior was an onetime event. More resources than actually required are allocated in some cases.

Additional occurrences of such onetime events at different times will more and more adapt the model upwards. Finally, the forecasts will not vary any more. The resource management can not use them to save energy. Hence, models should be completely recharacterized from time to time using data observed in the closest past to prevent this case.

Second, the predominant period or the trend behavior within the period can significantly change. Underestimates are corrected when they are detected, while overestimates are ignored as described before. The models are adjusted upwards finally leading to a static model again, which can not be used any more to save energy. Again, a complete recharacterization will be required to create a new model that appropriately describes the changed behavior.

Third, the long term trend can change over time. Such changes are adapted by the part of the model that described the long term trend. The scheduling algorithm directly considers such changes for ongoing redistribution decisions. Hence, neither an increasing nor an decreasing

124