• Keine Ergebnisse gefunden

Response Time Decomposition of a Multi-Tier System

4.2 Response Time of Multi-Tier Internet Systems

4.2.2 Response Time Decomposition of a Multi-Tier System

When there is only a single request processed in the multi-tier system withmtiers{T1,· · ·,Tm}, the response time can be written as the sum of the service timesSiof all involved tiersTi:

R1T =

m i=1

Si. (4.2.1)

Such a situation is very common for testing systems, which are used by developers to test mod-ifications in their systems. However, this situation does usually not cover the workload of the productive system, which is often subjected to multiple requests originating from multiple differ-ent requesting applications.

With an increasing concurrent request count, the individual service times get usually superposed with queuing times. To model the response time of a multi-tier Internet system, there are various different approaches. The state-of-the-art approach is to model the entire multi-tier system as a (complex) queuing network composed of multiple simple queuing systems and to apply the MVA algorithm to calculate the mean response time for a particular request population.

The basic approach behind the MVA algorithm is to consider the individual queues of the queuing network independently from each other. The overall network solution then results in the product of the individual solutions obtained from the individual queues. Such queuing networks are therefore also calledproduct-form queuing networks(cf. Section 2.7.1).

The determination of the number of queues per tierTi is one of the important aspects in the of modeling multi-tier systems. This, however, is beyond the scope of this thesis. Instead, the goal in this chapter is to provide insight into the effect of an improvement in an individual tier onto the overall system. This is important to understand how a planned or already implemented opti-mization will affect the overall systems’ behavior. This is also important to determine whether a costly improvement effort is worthy to be tackled. Otherwise, this can often lead to a waste of valuable time and money. Therefore, to simplify the discussion onto the most relevant aspect, in this chapter we focus on multi-tier systems, which comply with the (Ti≡Qi) property, such as depicted in Figure 4.3.

Our approach is fundamentally based on the load distribution analysis of the established MVA algorithm. Therefore, in the following, we provide insight into several aspects of its asymptotic behavior.

4.2.2.1 The Basic MVA Algorithm

Algorithm 1 represents a basic form of the MVA algorithm, which was also used by Urgaonkar et al. [79]. Note that its background was already explained in Section 2.7.1. In this section, the given algorithm serves the purpose of clarity.

If we model each tier as a single queue, this algorithm can be used to predict a multi-tier system’s response time for an increasing concurrency leveln.

Algorithm 1Basic MVA

Since the MVA algorithm is a recursion, to determine the response timeRnT for a concurrency level n, the algorithm always starts with the calculation ofR1T and terminates at the response timeRnT for the concurrency level in question.

The lines 8, 10 and 12 of Algorithm 1 constitute the fundamental recurrence relation of the MVA algorithm, which can also be written as:

Rni =Si(1+τn−1Rn−1i ), (4.2.2) whereRni denotes the processing time as defined above. The variable

τn−1= (n−1)

mi=1Rn−1i (4.2.3)

denotes the throughput of the multi-tier system for concurrency leveln. The overall response time RnT is then the sum of the per tier processing timesRni.

The recurrence relation (4.2.2) only shows how the processing time at concurrency level n is composed from the processing time forn−1. To reveal all the terms incorporated from previ-ous concurrency levels, the following theorem provides a compact representation ofRnT. It also provides insight into the development of the response timeRnT calculated by means of the MVA algorithm.

Theorem 1. For the response time RnT, calculated by means of the MVA algorithm for a queuing network composed of m iterative queues, such as illustrated in Figure 4.3, it holds:

R1T=

Proof. Since the overall response time is a sum of the processing times, it holds RnT =

m i=1

Rni.

Hereby, the relation (4.2.4) is trivially proven. The proof for (4.2.5) in turn, is then accomplished by deducing a compact representation for exactly these processing times:

Rni = 1+Lin−1

By continuing with the successive substitution of the emerging terms, for the processing times Rn−3i ,Rn−4i ,· · ·R1i we finally get:

Theorem 1 reveals that the response timeRnT calculated by means of the MVA, is basically com-posed of power series of the services timesSiwith complex coefficients depending on the response times from previous steps, which therefore again results in a recursion.

However, this theorem is not appropriate for practical situations. First of all, it is numerically highly unstable due to floating point errors. More importantly, it is not suitable to reveal specific asymptotic behaviors of the response time. Yet, to understand the overall system behavior for increasing concurrency this asymptotic behavior is essential.

Therefore, we proceed with a reformulation of the recurrence relation in equation (4.2.2):

Rni =Si(1+τn−1Rn−1i ) =Si 1+(n−1)Rn−1i

with

ωin−1:= Rn−1i

mj=1Rn−1j , 0<ωin−1<1 (4.2.9)

and m

i=1

ωin−1=1. (4.2.10)

The termωin, also called weighting factor, is a relative measure of how many of then requests in the entire system are processed at tier Ti. The relation (4.2.9) is true, because an individual weighting factor is a ratio between the corresponding processing time and the overall response time (composed of all processing times).

Note thatLni ≤n−1, sinceLni denotes the queue length ofTi at the moment when another request is going to populate the system while there are already(n−1) requests in processing. With the recurrence relation (4.2.8), the term for the queue lengthLn−1i is expressed as a per tier weighting factor, distributing the overall load among the individual tiers.

The advantage with these weighting factors is that they enable to analyze the asymptotic behavior of the response time calculated with the MVA algorithm. The analysis is based on the characteristic of the weighting factors that they are always bounded by 0<ωi<1. Our analysis of the MVA algorithm behavior is essentially based on the development of these weighting factors. This is dedicatedly examined in the following section.