• No results found

Dynamic QoS management

5.4 Operational parameters mapping

For many applications there is a direct correspondence between the band- width that is served and the quality experienced by the application. How- ever, despite being the bandwidth that determines the QoS distribution, the application model demands for an explicit timing specication, beyond the bandwidth, that includes a maximum per job utilization transmission time, Ci that is repeated periodically with period Ti. Additionally, evolving to-

ward dynamic adaptability demands for a model extension to comprise the requirements variability, thus includes ranges or sets of discrete points for both period and transmission time.

Section 5.2.2 introduced a simplied model addressing the requirements variability and the QoS distribution. For each service, Umini denotes the minimum bandwidth required and Umini+Ulaxi denotes the maximum band- width. Upon distribution, each service receives a bandwidth Uvi (Equation

5.3 ) within the specied operating range. Then, it is necessary to map that given bandwidth in terms of the service operational parameters, C and T , knowing that C/T denotes the bandwidth being used. For a service Sti,

let Uvi denote that given utilization bandwidth and let Cvi and T vi be the

materialization of such bandwidth in operational parameters. Let f be the function that does such mapping.

f : (U vi) 7→ (Cvi, T vi) : ∀i,

Cvi

T vi

≤ U vi

However, f is not bi-univocal since for a given Uvi there is a virtually

However, this mapping function may be subject to additional constraints derived from the application operational limitations. The application may constrain the function co-domain to specic value sets. An example is a video camera streaming that denes specic discrete values for the frame size (Cv) as well as for the frame-rate (T v). It is thus necessary for each service Sti,

not only, to include such limitations within the application model, specifying a space region of allowed (Cvi, T vi) pairs that correspond to a bandwidth

space BWi, but also, to enforce those limitations within the f function.

When the allowed operational space is discrete, further constraints are imposed as the bandwidth distribution scheme that decrease the eciency in assigning bandwidth, typically leading to waste. This situation is addressed next.

5.4.1 Complete application model

Section 5.2 presented a QoS-oriented service model Sti(Umini, Ulaxi, qosi), according to which each service gets a bandwidth Uvi within the range

Umini ≤ U vi ≤ Umini+ Ulaxi

Let us now focus on the case in which the service operational space is restricted to a set of discrete points.

Let Ci denote a discrete list of Cs available for Sti and Ti denote a

discrete list of T s. Zi denotes the list of pairs available for Sti, such that:

Zi≡ {(Cj, Tm), ∀Cj ∈ Ci, ∀Tm ∈ Ti}

The service model can thus be written as: Sti(Zi, qosi)

For each service, it is specied a list of admissible pairs and the QoS importance parameter, qosi.

Opposed to the linear bandwidth range referred in the simplied model, in this model, the available bandwidth is denoted with a discrete domain as the basis for the bandwidth distribution. For this reason, the bandwidth distribution urges for a ne-grained procedure that assigns the bandwidth based on such domain.

In order to use the QoS distribution models described in Section 5.3, which are based on a continuous bandwidth adaptation range, we propose dening a continuous range that contains all the discrete points.

Thus, considering the set BW0

iwith all discrete bandwidth points allowed

for Sti, such that:

bw : zik∈ Zi7→ BW0i≡ bw(zki) =

Ck

Figure 5.3: Discrete bandwidth to linear range mapping. we dene the bandwidth range BWi= [Umini, Umaxi], where:

Umini = min zk i∈Zi bw(zki) Umaxi = max zk i∈Zi bw(zik) Figure 5.3 illustrates the BW0

i space and the corresponding continuous

range BWi for a service Sti.

After applying the bandwidth distribution to BWi we obtain, for each

service Sti, the bandwidth Uvi, which then needs to be mapped onto a point

U v0i< U vi. This condition is necessary to maintain the schedulability of the

bandwidth distribution.

This procedure is non-optimal in terms of bandwidth distribution and resource usage because the dierence between the granted bandwidth and the one actually used, Uvi− U vi0, is wasted.

For systems where wasting bandwidth means a signicant degradation penalty on the resource management, it is possible to reclaim that bandwidth and reassign it in one or more iterations. This topic is further addressed in Section 5.4.2.

However, we still need to address the assignment of a concrete (C, T ) pair whenever there are several possible pairs for the same given Uv0

i bandwidth

value. In this case, given a bandwidth Uv0

i, there must be a policy that

chooses the pair that best meets the application goals.

The option for any mapping rule is independent from the bandwidth distribution scheme in place. In fact, it is even possible to allow that dierent services be managed by dierent rules. For this purpose and since the choice for these rules is mainly application oriented, an additional parameter is attached to the service description model, Pi, to denote this policy. The

nal service model used for the bandwidth distribution is thus: Sti{Zi, qosi, Pi}, ∀k : Zik∈ Zi

5.4.2 Bandwidth reclaiming

At this point we address the reclaiming of bandwidth left free because of using discrete operational points as refered in the previous section.

For a service Sti, with granted bandwidth Uvi and allowed discrete band-

width Uv0

i, we dene the wasted bandwidth Wi as follows:

Wi = U vi− U v0i

The basis of the bandwidth reclamation is to group all the individual wastes of all services and redistribute it again.

Wsum=

X

i=1..n

Wi

As mentioned in Section 5.3, there are two possible distribution schemes, the greedy scheme and the weighted one. For the greedy scheme, the spare bandwidth is allocated to each service in sequence, staring from the highest priority to the lowest priority one. Each service either gets all the bandwidth it can use or the remainder. Going through all services the wasted bandwidth Wsum will eventually be completely allocated to the services or a certain

amount will remain that cannot be used by any service.

However, the situation is dierent with the weighted scheme. I this case, repeating the bandwidth distribution over Wsum with the same dierentia-

tion weights (wi), will result in a distribution for each service equal to Wi,

thus unusable. Therefore, a distortion to the weights must be done for the sake of eciency. We proposed two methods. One is to distribute Wsum to

the services sequentially based on their weight (wi), from the largest to the

smallest one, and grant them the bandwidth that they can , until all Wsum

is assigned. This procedure is identical to the greedy bandwidth distribu- tion scheme in which the weights (wi) are used as priorities. Therefore, the

procedure is performed in a single pass with reduced complexity (O(n)). Despite simple, the above procedure violates the weighted bandwidth distribution principal. The other method tries to improve the approximation of the reclaimed bandwidth distribution to the initial weights by sequentially removing some services from the process and distribute the bandwidth by the remaining ones. Each time a service j is removed from the process, its bandwidth share (Wj) is made available to others that might be promoted

to the discretized output bandwidth, Uv0

i, reducing Wi.

When iterating this process, in order to improve the chances of assigning more bandwidth to the services with larger weight, in each iteration we re- move from the service set the one with the lowest weight. Therefore, after the main bandwidth distribution and the related discretization mapping, where all services are included, the distribution is re-issued with one less service, the one with lower weight coecient. The process is repeated iteratively, removing the services one by one, starting from the lower weighted service, until all the wasted bandwidth is fully distributed or all services have been removed. For each new iteration the remaining services adjust the distri- bution parameters in order to account with the already assigned bandwidth

and so the next distribution focus on the wasted bandwidth. Algorithm 5.4.1 depicts this procedure.

Algorithm 5.4.1: (Weighted redistribution) comment: Γ ≡ {Sti(Zi, qosi, Pi) , i = 1..n}

comment: UR - the resource capacity.

Γ0 ← Γ : Γ0 =        St0i     Umini = minj  bw(Zij)  Ulaxi = maxj  bw(Zij) qosi = qosi     , i = 1..n        UR0 ← UR repeat {U v1...U vn} = BW_distribution( UR0 , Γ0) {U v0

1...U v0n} = Discretization( {U v1...U vn}, Γ)

 UR0 ← UR0 − U v0k Γ0 ← Γ0\ {St k} , k : wk= min St0j∈Γ0(wj) until Γ0 = {}or (∀i = 1..n, Uv0 i = U vi)

This iterative procedure to re-assign the wasted bandwidth increases the overall complexity of the QoS management. Despite the fact that it reduces the services cardinality on each step, this procedure still increases the com- putational complexity of the inner distribution algorithm by a power of 2, thus O(n2).

This bandwidth redistribution problem is in fact a bin-packing problem, where the bandwidth to be distributed (Wsum) is the bin and the discretized

bandwidth levels of each service the packages. The problem is known to be NP-hard.

Given the limitations to bound the time complexity of this procedure, it is not possible to get an optimal solution regarding the resource distribution. The purpose of the proposed redistribution methods is thus to, improve the distribution eciency in a best-eort fashion, while following a logical distribution policy. The penalty incurred by the second method may not be worth since the redistribution may refer to a small share of the overall bandwidth distribution.