Lecture Notes in Computer Science Commenced Publication in 1973 Founding and Former Series Editors: Gerhard Goos, Juris Hartmanis, and Jan van Leeuwen
Editorial Board David Hutchison Lancaster University, UK Takeo Kanade Carnegie Mellon University, Pittsburgh, PA, USA Josef Kittler University of Surrey, Guildford, UK Jon M. Kleinberg Cornell University, Ithaca, NY, USA Alfred Kobsa University of California, Irvine, CA, USA Friedemann Mattern ETH Zurich, Switzerland John C. Mitchell Stanford University, CA, USA Moni Naor Weizmann Institute of Science, Rehovot, Israel Oscar Nierstrasz University of Bern, Switzerland C. Pandu Rangan Indian Institute of Technology, Madras, India Bernhard Steffen TU Dortmund University, Germany Madhu Sudan Microsoft Research, Cambridge, MA, USA Demetri Terzopoulos University of California, Los Angeles, CA, USA Doug Tygar University of California, Berkeley, CA, USA Gerhard Weikum Max Planck Institute for Informatics, Saarbruecken, Germany
6751
Khalid Al-Begain Simonetta Balsamo Dieter Fiems Andrea Marin (Eds.)
Analytical and Stochastic Modeling Techniques and Applications 18th International Conference, ASMTA 2011 Venice, Italy, June 20-22, 2011 Proceedings
13
Volume Editors Khalid Al-Begain University of Glamorgan, Faculty of Advanced Technology Pontypridd, CF37 1DL, UK E-mail:
[email protected] Simonetta Balsamo Andrea Marin Università Ca’ Foscari di Venezia Dipartimento di Scienze Ambientali, Informatica e Statistica Via Torino 155, 30172 Mestre - Venezia, Italy E-mail:{balsamo, marin}@dsi.unive.it Dieter Fiems Ghent University, Department TELIN Sint-Pietersnieuwstraat 41, 9000, Gent, Belgium E-mail: dieter.fi
[email protected]
ISSN 0302-9743 e-ISSN 1611-3349 ISBN 978-3-642-21712-8 e-ISBN 978-3-642-21713-5 DOI 10.1007/978-3-642-21713-5 Springer Heidelberg Dordrecht London New York Library of Congress Control Number: 2011929030 CR Subject Classification (1998): D.2.4, D.2, D.2.8, D.4, C.2, C.4, H.3, F.1, G.3 LNCS Sublibrary: SL 2 – Programming and Software Engineering
© Springer-Verlag Berlin Heidelberg 2011 This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, re-use of illustrations, recitation, broadcasting, reproduction on microfilms or in any other way, and storage in data banks. Duplication of this publication or parts thereof is permitted only under the provisions of the German Copyright Law of September 9, 1965, in its current version, and permission for use must always be obtained from Springer. Violations are liable to prosecution under the German Copyright Law. The use of general descriptive names, registered names, trademarks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. Typesetting: Camera-ready by author, data conversion by Scientific Publishing Services, Chennai, India Printed on acid-free paper Springer is part of Springer Science+Business Media (www.springer.com)
Preface
It is our pleasure to present the proceedings of the 18th International Conference on Analytical and Stochastic Modelling and Applications (ASMTA 2011). The conference was held in the beautiful and historic city of Venice. This on its own is a great attraction but combined with the high-quality program, we hope it has been a memorable conference. ASMTA conferences have become established quality events in the calendar of analytical, numerical and even simulation experts in Europe and well beyond. In addition to regular participants from the main centers of expertise from the UK, Belgium, Germany, Russia, France, Italy, Latvia, Spain, Hungary and many other countries, we receive newcomers with interesting contributions from other countries such as Iran and the USA. The quality of this year’s program was exceptionally high. The conference committee was extremely selective, this year accepting only 24 papers. As ever, the International Program Committee reviewed the submissions critically and in detail, thereby helping in making the final decision as well as in providing the authors with useful comments to improve their papers. We would therefore like to thank every member of the International Program Committee for their time and efforts. We are very grateful for the generous support and sponsorship of the Universit´ a Ca’ Foscari Venezia for providing the magnificent venue and the administrative support. June 2011
Khalid Al-Begain Simonetta Balsamo Dieter Fiems Andrea Marin
Organization
Workshop Chairs Khalid Al-Begain Simonetta Balsamo
University of Glamorgan, UK Universit`a Ca’ Foscari Venezia, Italy
Program Chairs Dieter Fiems Andrea Marin
Ghent University, Belgium Universit` a Ca’ Foscari Venezia, Italy
Program Committee Ahmed Al-Dubai Imad Antonios Richard Boucherie Jeremy Bradley Giuliano Casale Sara Casolari Hind Castel Alexander Dudin Antonis Economou Jean-Michel Fourneau Rossano Gaeta Marco Gribaudo Andras Horvath Carlos Juiz Helen Karatza William Knottenbelt Remco Litjens Don McNickle Madjid Merabti Jos´e Ni˜ no-Mora Antonio Pacheco Balakrishna Prabhu Anne Remke Matteo Sereno Bruno Sericola Maria-Estrella Sousa-Vieira Janos Sztrik
Edinburgh Napier University, UK Southern Connecticut State University, USA University of Twente, The Netherlands Imperial College London, UK Imperial College London, UK University of Modena and Reggio Emilia, Italy Institut Telecom-Telecom SudParis, France Belarusian State University, Belarus University of Athens, Greece University of Versailles St-Quentin, France University of Turin, Italy Politecnico of Milano, Italy University of Turin, Italy Universitat de les Illes Balears, Spain Aristotle University of Thessaloniki, Greece Imperial College London, UK TNO Information and Communication Technology, The Netherlands University of Canterbury, New Zealand Liverpool John Moores University, UK Carlos III University of Madrid, Spain Instituto Superior Tecnico, Portugal Laas-CNRS, France University of Twente, The Netherlands University of Turin, Italy INRIA and University of Rennes, France University of Vigo, Spain University of Debrecen, Hungary
VIII
Organization
Mikl´ os Telek Nigel Thomas Petr Tuma Dietmar Tutsch Kurt Tutschku Benny Van Houdt Johan van Leeuwaarden Aad Van Moorsel Jean-Marc Vincent Sabine Wittevrongel Katinka Wolter Michele Zorzi
Technical University of Budapest, Hungary University of Newcastle, UK Charles University of Prague, Czech Republic University of Wuppertal, Germany University of Vienna, Germany University of Antwerp, Belgium Eindhoven University of Technology, The Netherlands Newcastle University, UK University of Grenoble, France Ghent University, Belgium Free University of Berlin, Germany University of Padova, Italy
External Referees Vlastimil Babka Leonardo Badia Nicola Bui Davide Cerotti Eline De Cuypere Thomas Demoor Michele Rossi Harald St¨ orrle Andrea Zanella
Charles University of Prague, Czech Republic University of Padova, Italy University of Padova, Italy University of Turin, Italy Ghent University, Belgium Ghent University, Belgium University of Padova, Italy Ludwig-Maximilians-Universit¨ at M¨ unchen, Germany University of Padova, Italy
Table of Contents
Queueing Theory I Departure Process in Finite-Buffer Queue with Batch Arrivals . . . . . . . . . Wojciech M. Kempa A Two-Class Continuous-Time Queueing Model with Dedicated Servers and Global FCFS Service Discipline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Willem M´elange, Herwig Bruneel, Bart Steyaert, and Joris Walraevens M/G/1 Queue with Exponential Working Vacation and Gated Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Zsolt Saffer and Mikl´ os Telek
1
14
28
Software and Computer Systems The Application of FSP Models in Automatic Optimization of Software Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Omid Bushehrian
43
Model-Based Decision Framework for Autonomous Application Migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Anders Nickelsen, Rasmus L. Olsen, and Hans-Peter Schwefel
55
Optimisation of Virtual Machine Garbage Collection Policies . . . . . . . . . . Simonetta Balsamo, Gian-Luca Dei Rossi, and Andrea Marin
70
Queueing Theory II Performance Evaluation of a Single Node with General Arrivals and Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Alexandre Brandwajn and Thomas Begin Tandem Queueing System with Different Types of Customers . . . . . . . . . . Valentina Klimenok, Che Soong Kim, and Alexander Dudin Fast Evaluation of Appointment Schedules for Outpatients in Health Care . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S. De Vuyst, H. Bruneel, and D. Fiems
85 99
113
X
Table of Contents
Statistics and Inference Technique of Statistical Validation of Rival Models for Fatigue Crack Growth Process and Its Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Nicholas Nechval, Maris Purgailis, Uldis Rozevskis, Juris Krasts, and Konstantin Nechval
132
Suitability of the M/G/∞ Process for Modeling Scalable H.264 Video Traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Maria-Estrella Sousa-Vieira
149
Reconstructing Model Parameters in Partially-Observable Discrete Stochastic Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Robert Buchholz, Claudia Krull, and Graham Horton
159
Queueing Theory III Performance Evaluation of a Kitting Process . . . . . . . . . . . . . . . . . . . . . . . . Eline De Cuypere and Dieter Fiems
175
Perfect Sampling of Phase-Type Servers Using Bounding Envelopes . . . . Bruno Gaujal, Ga¨el Gorgo, and Jean-Marc Vincent
189
Monotone Queuing Networks and Time Parallel Simulation . . . . . . . . . . . . Jean-Michel Fourneau and Franck Quessette
204
Telecommunication Networks I Traffic-Centric Modelling by IEEE 802.11 DCF Example . . . . . . . . . . . . . . Paolo Pileggi and Pieter Kritzinger Flexible Traffic Engineering in Full Mesh Networks: Analysis of the Gain in Throughput and Cost Savings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Gerhard Hasslinger Investigation of the Reliability of Multiserver Computer Networks . . . . . . Saulius Minkeviˇcius and Genadijus Kulvietis
219
234
249
Performance and Performability Performability Modeling of Exceptions-Aware Systems in Multiformalism Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Enrico Barbierato, Marco Gribaudo, Mauro Iacono, and Stefano Marrone
257
Table of Contents
The Impact of Input Error on the Scheduling of Task Graphs with Imprecise Computations in Heterogeneous Distributed Real-Time Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Georgios L. Stavrinides and Helen D. Karatza Simple Correlated Flow and Its Application . . . . . . . . . . . . . . . . . . . . . . . . . Alexander Andronov and Jelena Revzina
XI
273 288
Telecommunication Networks II A Practical Tree Algorithm with Successive Interference Cancellation for Delay Reduction in IEEE 802.16 Networks . . . . . . . . . . . . . . . . . . . . . . . Sergey Andreev, Eugeny Pustovalov, and Andrey Turlikov
301
A Probabilistic Energy-Aware Model for Mobile Ad-Hoc Networks . . . . . Lucia Gallina, Sardaouna Hamadou, Andrea Marin, and Sabina Rossi
316
Size-Based Flow-Scheduling Using Spike-Detection . . . . . . . . . . . . . . . . . . . Dinil Mon Divakaran, Eitan Altman, and Pascale Vicat-Blanc Primet
331
Author Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
347
Departure Process in Finite-Buffer Queue with Batch Arrivals Wojciech M. Kempa Silesian University of Technology, Institute of Mathematics, ul. Kaszubska 23, 44-100 Gliwice, Poland, Phone/Fax: + 48 32 237 28 64
[email protected]
Abstract. A finite-buffer queueing system with batch Poisson arrivals is considered. A system of integral equations for the distribution function of the number of customers h(t) served before t, conditioned by the initial state of the system, is built. A compact formula for probability generating function of the Laplace transform of distribution of h(t) is found using the potential technique. From this representation the mean of h(t) can be effectively calculated numerically using one of the inverse Laplace transform approximation algorithms. Moreover a limit behavior of departure process as the buffer size tends to infinity is investigated. Numerical examples are attached as well. Keywords: Departure process; Finite-buffer queue; Numerical inverse Laplace transform; Poisson arrivals; Potential method.
1
Introduction
Finite-buffer queueing systems are intensively investigated nowadays due to their applications in modelling of Internet routers. Of special significance is the analysis of systems in transient state i.e. at fixed moment t. We are often interested in the investigation of key system characteristics during a short period of time only since, because of permanent changing of Internet traffic, the notion of ”stationary state” in reality does not occur. Besides, especially the analysis of systems with batch arrivals is desired and expected from the practical point of view. In real Internet traffic the incoming packets have different sizes measured in bytes, thus treating a byte as a unit we can consider a stream of different-sized packets as a stream of single one-byte packets arriving in groups of random sizes. One of the essential characteristics determining the efficiency (the ”function”) of the service process with respect to the intensity of the arrival stream is departure process h(t), that at any fixed moment t takes on a random value equal to the number of packets completely served before t. In the paper we investigate this characteristic in the M X /G/1/N system with Poisson batch arrivals. The main goal of the analysis is to find an explicit, compact representation for probability generating function of the Laplace transform of the distribution of the departure counting process, conditioned on the number of packets present K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 1–13, 2011. c Springer-Verlag Berlin Heidelberg 2011
2
W.M. Kempa
in the system at t = 0. According to the best knowledge of the author such a result is new in finite-buffer systems analysis. In any case the bibliography on transient departure processes is rather modest. In [6] a steady-state joint density function of k successive departure intervals is derived for the M/G/1/N system. Besides the problem of correlation of such intervals is discussed. Some problems connected with the service process in M X /G/1/N are solved in [2]. In particular, a joint distribution function of the length of the first lost series of batches and the time of the first loss is found. An interesting technique of investigation of finite-buffer systems is developed in [7]. The approach is based on resolvent sequences of the process being the difference of a compound Poisson process and a compound general-type renewal process. An overview of results related to finite-buffer systems with Markovian input streams can be found in [13] and [3]. Transient results for the departure process in the case of the system with batch arrivals and infinite queue can be found in [8] and [9], [10], where additionally multiple and single vacation policies are analyzed. In the article we use the technique of potential introduced in [11] and developed in [12]. Some details connected with this approach are stated in the next Section 2 where a precise system description is given as well. In Section 3 we obtain the main result i.e. the explicit representation for the expression ∞ ∞ zm e−st P{h(t) = m | ξ(0) = n}dt, (1) m=0
0
where 0 ≤ n ≤ N, t > 0, |z| ≤ 1, Re(s) > 0, and ξ(0) denotes the number of packets present in the system at the opening. In Section 4 we derive a limit representation for 2-fold transform of departure process as the buffer size tends to infinity. The last Section 5 contains sample numerical results for the mean of departure process obtained using one of the algorithms for numerical Laplace transform inversion.
2
System Description and Potential Approach
In this article we consider the M X /G/1/N queueing system in that the incoming batches of packets arrive according to a Poisson process with intensity λ and the size of the arriving batch is k with probability pk , ∞ k=1 pk = 1. Packets are served individually with a distribution function F (·). The system capacity is assumed to be N i.e. we have N − 1 places in the buffer queue and one place for service. To complete necessary notation let us put ∞ ∞ e−st dF (t), Re(s) > 0, p(θ) = θk pk , |θ| ≤ 1. (2) f (s) = 0
k=1
By pi∗ j we denote the jth term of the i-fold convolution of the sequence (pk ) with itself. Besides, let δi,j denotes the Kronecker delta function. The notion of potential of a random walk continuous from below was introduced in [11] (see also [12]). Here we state only selected elements of potential
Departure Process in Finite-Buffer Queue with Batch Arrivals
3
theory, which will be used later. Originally (see [11]) the potential is defined as follows. Introduce a discrete-time random walk Yn in the following way: Y0 = 0,
n
Yn =
Xk ,
n = 1, 2, ...,
(3)
k=1
where Xn are independent and identically distributed random variables with a discrete distribution rk = P{Xn = k}, k = −1, 0, 1, ..., where r−1 > 0. A sequence (Rk )∞ k=0 satisfying condition ∞
θ k Rk =
k=0
1 , P (θ) − 1
|θ| < 1,
(4)
k where P (θ) = ∞ k=−1 θ rk is called a potential of random walk Yn or, simply, a potential of the sequence (rk ). Thus, the potential (Rk ) of the sequence (rk ) is such a sequence the generating function of which can be written down using the generating function of the sequence (rk ) as in (4). In the analysis of finite-buffer queue characteristics the following property of sequence (Rk )∞ k=0 can be applied ([11]): ∞ Theorem 1. Introduce two number sequences (αn )∞ n=0 and (ψn )n=1 with the assumption α0 = 0. The general solution of the following boundary problem: n
αk+1 un−k − un = ψn ,
n≥0
(5)
n ≥ 0,
(6)
k=−1
can be written in the form un = CRn+1 +
n
Rn−k ψk ,
k=0
where C is a constant independent on n and Rk is the potential connected with sequence (αn ) i.e. ∞ k=0
θk Rk =
1 , Pα (θ) − 1
Pα (θ) =
∞
θ k αk+1 , |θ| < 1
(7)
k=−1
and, besides, Rk can be found in the following recurrent way: R0 = 0,
R1 = α−1 0 ,
Rk+1 = α−1 0 (Rk −
k
αi+1 Rk−i ),
k ≥ 1.
(8)
i=0
Theorem 1 is essential for the analysis. Its importance lies in the fact that it allows to write down in a compact form the general solution of a specific-type system of equations, which appears in the transient investigation of finite-buffer queues with Poisson arrivals. A detailed proof of this theorem can be found in [11]. Theorem 1, perhaps in a slightly different form, was applied e.g. in [2], [3] and [4].
4
3
W.M. Kempa
System of Integral Equations for Departure Process
In this section we will write the system of integral equations for conditional distributions of departure process h(t) and obtain the explicit formula for probability generating function of Laplace transform of probabilities P{h(t) = m | ξ(0) = n}. Introduce the following notation: Hn (t, m) = P{h(t) = m | ξ(0) = n},
0 ≤ n ≤ N, m ≥ 0, t > 0.
(9)
Note that the following equation is true: H0 (t, m) = λ
t N−1 0
+
∞
pk Hk (t − y, m)
k=1
pk HN (t − y, m) e−λy dy + δm,0 e−λt .
(10)
k=N
Indeed, if the system is initially empty the first summand in (10) relates to the situation in that the first group of packets enters before t. The number of packets in the system after the first arrival differs in dependence on the first group size, and for groups of size k ≥ N reaches the maximum level N. In the second summand the first arrival epoch is after t, so h(t) = m if and only if m = 0. As it is well known (see e.g. [5]) departure epochs are Markov moments in the queueing system with Poisson arrivals. Hence the formula of total probability used with respect to the first (after t = 0) departure epoch x > 0 leads to the following system of integral equations: Hn (t, m) =
t N−n−1 0
+
ak (x)Hn+k−1 (t − x, m − 1)
k=0
ak (x)HN −1 (t − x, m − 1) dF (x) + 1 − F (t) δm,0 ,
∞
(11)
k=N −n
where 1 ≤ n ≤ N, and ak (x) =
k i=0
pi∗ k
(λx)i −λx e , i!
k ≥ 0, p0∗ 0 =1
(12)
denotes the probability that exactly k customers enters to the system before time x. The interpretation of both sides of (11) is similar to that in the case of (10). The first summand in the integral on the right in (11) denotes the situation in that the first departure epoch occurs at time x < t. If exactly k packets have entered until x then, since x is a Markov moment, we can consider x as the initial moment of the system starting with n + k − 1 packets (k arrivals till x and one
Departure Process in Finite-Buffer Queue with Batch Arrivals
5
departure), and the event {h(t) = m} will become {h(t − x) = m − 1}. In the second summand in the integral on the right in (11) the number of packets which arrive before the first departure epoch x equals at least N − n, so N − n packets are enqueued only (to saturate the buffer), the remaining ones are lost. Thus, after the first departure epoch the number of packets in the system is N − 1. The last summand on the right side in (11) describes the situation in that the first departure occurs after t. Introduce the Laplace transform of Hn (t, m) with respect to argument t as follows: ∞ n (s, m) = H e−st Hn (t, m)dt, Re(s) > 0. (13) 0
Now (10)–(11) lead to 0 (s, m) = H
N −1 ∞ λ δm,0 k (s, m) + H N (s, m) pk H pk + , λ+s λ+s k=1
n (s, m) = H
N −n−1
∞
n+k−1 (s, m − 1) + H N −1 (s, m − 1) ak (s)H
k=0
+
(14)
k=N
ak (s)
k=N−n
1 − f (s) δm,0 , s
1 ≤ n ≤ N,
where
(15)
ak (s) =
∞
e−sx ak (x)dF (x).
(16)
0
To eliminate dependence on m let us now introduce a generating function of n (s, m) of the form H ∞
n (s, z) = H
n (s, m), z mH
|z| ≤ 1.
(17)
m=0
Equations (14)–(15) will take now the form
0 (s, z) = H
N −1 ∞ λ 1
k (s, z) + H
N (s, z) pk H pk + , λ+s λ+s k=1
n (s, z) = H
N −n−1
n+k−1 (s, z) + H
N −1 (s, z) αk (s, z)H
k=0
+
1 − f (s) , s
(18)
k=N
∞
αk (s, z)
k=N −n
1 ≤ n ≤ N,
(19)
where αk (s, z) = z ak (s). Now let us make the following substitution:
N −n (s, z), Dn (s, z) = H
0 ≤ n ≤ N.
(20)
6
W.M. Kempa
Introducing (20) into (18)–(19) gives DN (s, z) = n
N −1 ∞ λ 1 pk DN −k (s, z) + D0 (s, z) pk + , λ+s λ+s k=1
(21)
k=N
αk+1 (s, z)Dn−k (s, z) − Dn (s, z) = ψn (s, z),
0 ≤ n ≤ N − 1,
(22)
1 − f (s) . s
(23)
k=−1
where ∞
ψn (s, z) = αn+1 (s, z)D0 (s, z) − D1 (s, z)
αk (s, z) −
k=n+1
Note that the system (22) has the form stated in (5). The only difference is in that functions depend on arguments s and z. The general solution of (22) can be written in the form (compare (6)) Dn (s, z) = C(s, z)Rn+1 (s, z) +
n
n ≥ 0,
Rn−k (s, z)ψk (s, z),
(24)
k=0
where (see (8)) R0 (s, z) = 0,
R1 (s, z) = α0 (s, z)−1 ,
Rk+1 (s, z) = α0 (s, z)−1 (Rk (s, z) −
k
αi+1 (s, z)Rk−i (s, z)),
k ≥ 1.
(25)
i=0
Of course, taking into consideration that ∞ ∞ ∞ θk αk+1 (s, z) = z θk e−sx ak+1 (x)dF (x) k=−1
0
k=−1
=z
∞
θk
0
k=−1
=
= =
z θ z θ z θ
∞
k+1
pi∗ k+1
i=0
∞
(λx)i −λx e dF (x) i!
∞ ∞ (λx)i i=0
∞
0
e−sx
e−(λ+s)x dF (x)
0
∞
i!
k+1 pi∗ k+1 θ
k=i−1
i ∞ λxp(θ) −(λ+s)x e dF (x) i! i=0 e−(λ+s)x eλxp(θ) dF (x) =
0
z f λ 1 − p(θ) + s , θ
we get from (7) R(θ, s, z) =
∞ k=0
θ k Rk (s, z) =
θ , zf λ 1 − p(θ) + s − θ
|θ| < 1.
(26)
Departure Process in Finite-Buffer Queue with Batch Arrivals
7
Now we must find the representation for C(s, z). Substituting n = 0 to (24) leads to ⇐⇒
D0 (s, z) = C(s, z)R1 (s, z)
C(s, z) = D0 (s, z)α0 (s, z).
(27)
Taking n = 0 in (22) we obtain α0 (s, z)D1 (s, z) + α1 (s, z)D0 (s, z) − D0 (s, z) = ψ0 (s, z), that, since ∞ k=0 αk (s, z) = zf (s), gives D1 (s, z) =
1 1 − f (s) D0 (s, z) − . zf (s) s
(28)
Introduce the following functionals: bn (s, z) =
n k 1 Rn−k (s, z) αi (s, z) zf (s) i=0
(29)
k=0
and χn (s, z) =
n
Rn−k (s, z)αk+1 (s, z) −
k=−1
n
Rn−k (s, z) + bn (s, z).
(30)
k=0
Now, substituting n = N to (24) and using (23), (27) and (28) we get N N
DN (s, z) = D0 (s, z) RN−k (s, z)αk+1 (s, z) − RN −k (s, z) + bN (s, z) k=−1
−
k=0
1 − f (s) 1 − f (s) bN (s, z) = D0 (s, z)χN (s, z) − bN (s, z). s s
(31)
Similarly, introducing (23), (24), (27) and (28) into (21), after a little laborious calculations we obtain DN (s, z) =
−1 ∞ N λ D0 (s, z) pN−k χk (s, z) + pk + GN −1 (s, z), λ+s k=1
(32)
k=N
where N −1 k i λ 1 − f (s) 1 GN−1 (s, z) = − pN −k Rk−i (s, z) αj (s, z). (33) λ + s (λ + s)szf (s) i=0 j=0 k=1
Comparing the right sides of (31) and (32) we eliminate D0 (s, z) as follows:
N (s, z) D0 (s, z) = H
GN −1 (s, z) + 1 − f (s) s−1 bN (s, z) = N −1 . ∞ χN (s, z) − λ(λ + s)−1 k=1 pN −k χk (s, z) + k=N pk
(34)
8
W.M. Kempa
Now from (24) (applying (29) and (30)) we get for 1 ≤ n ≤ N
N −n (s, z) = D0 (s, z)χn (s, z) − 1 − f (s) bn (s, z) Dn (s, z) = H s
(35)
and hence, after operation on indexes, we obtain
n (s, z) = H
N (s, z)χN−n (s, z) − 1 − f (s) bN −n (s, z), H s
0 ≤ n ≤ N − 1. (36)
Collecting formulae (34) and (36) we can state the following main theorem: Theorem 2. For any |z| ≤ 1 and Re(s) > 0 the following representations hold true: χN−n (s, z) GN −1 (s, z) + 1 − f (s) s−1 bN (s, z)
n (s, z) = H N −1 ∞ χN (s, z) − λ(λ + s)−1 k=1 pN −k χk (s, z) + k=N pk −
1 − f (s) bN −n (s, z), s
0 ≤ n ≤ N − 1,
(37)
−1 G (s, z) + 1 − f (s) s bN (s, z) N −1
N (s, z) = H N −1 . ∞ χN (s, z) − λ(λ + s)−1 k=1 pN−k χk (s, z) + k=N pk
4
(38)
Limit Theorem
This section is devoted to the limit behavior of 2-fold transform of departure process in the case of infinitely increasing buffer size i.e. as N → ∞. We start with the formula (24). Taking into consideration (27) we have Dn (s, z) = D0 (s, z)α0 (s, z)Rn+1 (s, z) +
n
Rn−k (s, z)ψk (s, z),
n ≥ 0. (39)
k=0
Multiplying (39) by θn and, under the assumption N → ∞, taking a sum over n from 0 to ∞ we obtain, along the way applying identity (26) ∞
θn Dn (s, z) = D0 (s, z)α0 (s, z)θ−1
n=0 ∞
+
k=0
θ k ψk (s, z)
∞
θ n+1 Rn+1 (s, z)
n=0
θn−k Rn−k (s, z)
n=k
= D0 (s, z)α0 (s, z)θ
∞
−1
∞ R(θ, s, z) − R0 (s, z) + R(θ, s, z) θk ψk (s, z), k=0
where |θ| < 1. Using in (40) representations (23) and (28) we derive
(40)
Departure Process in Finite-Buffer Queue with Batch Arrivals ∞
9
θ n Dn (s, z)
n=0 ∞
= R(θ, s, z) D0 (s, z) θk αk+1 (s, z) − k=−1
−
1 − f (s) szf (s)
∞ k=0
θk
k
∞ k 1 1 k + θ αi (s, z) 1 − θ zf (s) i=0 k=0
αi (s, z) − D0 (s, z)θ−1 ,
|θ| < 1.
(41)
i=0
Taking into consideration the formula (26) we get from (41) for |θ| < 1 ∞
θn Dn (s, z)
n=0
=
D0 (s, z)
U (λ,s,z) z(1−θ)f (s)+θ −θf (s) θ(1−θ)f (s)
−
U(λ,s,z)θ 1−f (s) sf (s)(1−θ)
zU (λ, s, z) − θ where we denote U (λ, s, z) = f λ 1 − p(θ) + s . Let us take into consideration the following equation: zf λ 1 − p(θ) + s − θ = 0.
− D0 (s, z)θ−1 , (42)
(43)
Treat the left side as a function Q of variable θ, for fixed 0 < z < 1 and s such that Im(s) = 0, Re(s) > 0. Substituting θ = 0 we have Q(0) = zf (λ + s) > 0, and similarly taking θ = 1 we get Q(1) = zf (s) − 1 < z − 1 < 0. Since Q (θ) = −zλp (θ)f λ 1 − p(θ) + s < 0, thus there exists a unique root θ0 = θ0 (λ, z, s) of (43) between 0 and 1. The series on the left side of (42) is convergent in particular for 0 < θ < 1, hence the numerator of the expression on the right side of (42) should be 0 at θ0 . Substituting θ0 to the numerator of the expression on the right side of (42) we eliminate D0 (s, z) as follows: θ0 1 − f (s) . D0 (s, z) = (44) s zf (s)(1 − θ0 ) + θ0 − f (s)
N (s, z) we can now formulate Since for N → ∞ we have D0 (s, z) = limN →∞ H the following limit theorem: Theorem 3. For conditional 2-fold transform of departure process as the initial number of packets tends to infinity the following limit representation holds: ∞ ∞
N (s, z) = lim H zm e−st P{h(t) = m | ξ(0) = ∞}dt N →∞
m=0
0
θ0 1 − f (s) , = s zf (s)(1 − θ0 ) + θ0 − f (s)
(45)
10
W.M. Kempa
where 0 < z < 1, s ∈ R+ and θ0 = θ0 (λ, s, z) is a unique root of equation zf λ 1 − p(θ) + s − θ = 0 in (0, 1).
5
Numerical Results
In this section we present sample numerical results for conditional mean of departures before fixed t i.e. for the expression En h(t), where the symbol En stands for the mean on condition ξ(0) = n. In computations we use firstly the following obvious identity: ∞
n (s, z) e−st En h(t)dt = H (46) z=1
0
and next the algorithm of approximate numerical Laplace transform inversion introduced in [1]. The base of the algorithm is the Bromwich inversion integral that finds value of the function g at fixed t > 0 from its transform g as δ+i∞ 1 g(t) = est g(s)ds, (47) 2πi δ−i∞ where δ ∈ R is located on the right to all singularities of g . Using trapezoidal method with step h to estimate the integral in (47) we obtain the approximation gh (t) of g(t) in the form gh (t) =
∞ heδt heδt ikht g g(δ) + Re e g (δ + ikht) . 2π π
(48)
k=1
π Setting h = Lt and δ = series representation:
A , 2Lt
after algebraic calculations, we reach the following
gh (t) = gA,L (t) =
∞
(−1)k qk (t),
(49)
k=0
where qk (t) =
eA/2L ωk (t), 2Lt
k ≥ 0,
(50)
L
A A ijπ ijπ/L ω0 (t) = g +2 Re g + e 2Lt 2Lt Lt
(51)
j=1
and ωk (t) = 2
A ijπ ikπ ijπ/L Re g + + e , 2Lt Lt t j=1
L
k ≥ 1.
(52)
Departure Process in Finite-Buffer Queue with Batch Arrivals
11
Let us take into consideration the following Euler formula for approximate summation of alternating series: ∞ m n+k m 1 k (−1) ck ≈ (−1)j cj , (53) k 2m j=0 k=0
k=0
where parameter m is usually of order of dozen and parameter n - of order of several dozen ([3]). Applying (53) in (48) we finally obtain g(t) ≈
m n+k m 1 (−1)j qj (t), k 2m j=0
(54)
k=0
where typical values of parameters are following (see [1]): m = 38, n = 11, A = 19, L = 1. A precise evaluation of the estimation error in (54) is not possible, first of all, due to the lack of such an estimation for the Euler summation formula (53). The practice has shown that a good evaluation of the error one can get by executing the calculation twice, and changing by 1 one of the parameters. Then the difference between the results, e.g. for A = 19 and A = 20 provides a good evaluation of the error estimation. More details can be found in [1] and [3]. Let us consider the system of size N = 4 in that individual service times have Erlang distributions with parameters n = 2 (shape) and μ = 1 (rate) i.e. F (t) = 1 − e−t (t + 1),
t > 0,
thus the mean service time is 2. Let us take into consideration two different simple batch size distributions: p2 = 1 (each arriving batch consists of 2 packets) and p1 = p2 = 12 . The system with the second possibility we denote by M 1,2 /G/1/N. Below we present a numerical comparison of values E0 h(t) and EN h(t), computed for t = 20, 50, 100, 200, 500 and 1000 for these two systems. Possibilities of underloaded (ρ < 1) and overloaded system (ρ ≥ 1) are presented separately. Each time values of the arrival rate parameter λ are selected in such a way to fix the same value of ρ for both systems. In the table below (Table 1) we present results obtained for λ1 = 0.15 (for M 2 /G/1/N queue) and λ1,2 = 0.20 (for M 1,2 /G/1/N queue) that gives = 0.6 < 1 in both systems. Table 1. Conditional means of departures before t for ρ = 0.6 (underloaded systems) t 20 50 100 200 500 1000
M 2 /G/1/N E0 {h(t)} EN {h(t)} 4.299 7.133 12.204 15.059 25.384 28.240 51.745 54.600 130.827 133.682 262.630 265.486
M 1,2 /G/1/N E0 {h(t)} EN {h(t)} 4.479 7.334 12.632 15.523 26.231 29.121 53.427 56.318 135.016 137.907 270.998 273.889
12
W.M. Kempa
Table 2. Conditional means of departures before t for ρ = 2.4 (overloaded systems) t 20 50 100 200 500 1000
M 2 /G/1/N E0 {h(t)} EN {h(t)} 8.559 9.495 22.997 23.933 47.061 47.996 95.187 96.123 239.568 240.503 480.202 481.138
M 1,2 /G/1/N E0 {h(t)} EN {h(t)} 8.798 9.601 23.470 24.273 47.922 48.726 96.828 97.631 243.545 244.348 488.073 488.876
The next table present similar results for λ1 = 0.6 and λ1,2 = 0.8 (so for ρ = 2.4 > 1 in both systems). Considering the above results one can observe that the average number of departures is greater for the M 1,2 /G/1/N system (for the same ρ). But the difference is the smaller, the greater is traffic load ρ. Similarly, of course, the mean of h(t) is greater in the case of the opening with maximum number of customers present than in the case of the system empty at t = 0. The difference decreases as t increases.
References 1. Abate, J., Choudhury, G.L., Whitt, W.: An introduction to numerical transform inversion and its application to probability models. In: Grassmann, W. (ed.) Computational Probability, pp. 257–323. Kluwer, Boston (2000) 2. Bratiichuk, M.S., Chydzinski, A.: On the loss process in a batch arrival queue. App. Math. Model. 33(9), 3565–3577 (2009) 3. Chydzinski, A.: Queueing characteristics for Markovian traffic models in packetoriented networks. Silesian University of Technology Press, Gliwice (2007) 4. Chydzinski, A.: On the distribution of consecutive losses in a finite capacity queue. WSEAS Transactions on Circuits and Systems 4(3), 117–124 (2005) 5. Cohen, J.W.: The single server queue. North-Holand Publishing Company, Amsterdam (1982) 6. Ishikawa, A.: On the joint distribution of the departure intervals in an ”M/G/1/N” queue. J. Oper. Res. Soc. Jpn. 34(4), 422–435 (1991) 7. Kadankov, V., Kadankova, T.: Busy period, virtual waiting time and number of the customers in Gδ |M κ |1|B system. Queueing Syst 65(2), 175–209 (2010) 8. Kempa, W.M., et al.: The departure process for queueing systems with batch arrival of customers. Stoch. Models 24(2), 246–263 (2008) 9. Kempa, W.M.: On one approach to study of departure process in batch arrival queues with multiple vacations. In: Applied stochastic models and data analysis. ASMDA-2009. The XIIIth International Conference pp. 203–207. Vilnius Gediminas Technical University, Vilnius (2009)
Departure Process in Finite-Buffer Queue with Batch Arrivals
13
10. Kempa, W.M.: Some new results for departure process in the M X /G/1 queueing system with a single vacation and exhaustive service. Stoch. Anal. Appl. 28(1), 26–43 (2010) 11. Korolyuk, V.S.: Boundary-value problems for complicated Poisson processes. Naukova Dumka, Kiev (1975) (in Russian) 12. Korolyuk, V.S., Bratiichuk, M.S., Pirdzhanov, B.: Boundary-value problems for random walks. Ylym, Ashkhabad, (1987) (in Russian) 13. Takagi, H.: Queueing Analysis, vol. 2. North-Holland, Amsterdam (1993)
A Two-Class Continuous-Time Queueing Model with Dedicated Servers and Global FCFS Service Discipline Willem M´elange, Herwig Bruneel, Bart Steyaert, and Joris Walraevens Department of Telecommunications and Information Processing, Ghent University - UGent {wmelange,hb,bs,jw}@telin.Ugent.be http://telin.ugent.be/
Abstract. This paper considers a continuous-time queueing model with two types (classes) of customers each having their own dedicated server. The system adopts a “global FCFS” service discipline, i.e., all arriving customers are accommodated in one single FCFS queue, regardless of their types. As a consequence of the “global FCFS” rule, customers of one type may be blocked by customers of the other type, in that they may be unable to reach their dedicated server even at times when this server is idle, i.e., the system is basically non-workconserving. One major aim of the paper is to estimate the negative impact of this phenomenon on the (mean) system occupancy and mean system delay. For this reason, the systems with and without “global FCFS” are studied and compared. The motivation of our work are systems where this kind of blocking is encountered, such as input-queueing network switches or road splits. Keywords: queueing; blocking; global FCFS; Markov; non-workconserving.
1
Introduction
In general, queueing phenomena occur when some kind of customers, desiring to receive some kind of service, compete for the use of a service facility (containing one or multiple servers) able to deliver the required service. Most queueing models assume that a service facility delivers exactly one type of service and that all customers requiring this type of service are accommodated in one common queue. If more than one service is needed, multiple different service facilities can be provided, i.e., one service facility for each type of service, and individual separate queues are formed in front of these service facilities. In all such models, customers are only hindered by customers that require exactly the same kind of service, i.e., that compete for the same resources. In some applications, it may not be physically feasible or desirable to provide separate queues for each type of service that customers may require, and it may be necessary or desirable to accommodate different types of customers (i.e., customers requiring different types of service) in the same queue. In such K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 14–27, 2011. c Springer-Verlag Berlin Heidelberg 2011
A Two-Class Continuous-Time Queueing Model
15
cases, customers of one type (i.e., requiring a given type of service) may also be hindered by customers of other types. For instance, if a road or a highway is split in two or more subroads leading to different destinations, cars on that road heading for destination A may be hindered or even blocked by cars heading for destination B, even when the subroad leading to destination A is free, simply because cars that go to B are in front of them. In other words, there is a first-come-first-served (FCFS) order on the main road. This blocking also takes place in weaving sections on highways albeit to a lesser extent [1,2]. We refer to [3,4] for a general overview and validation of the modelling of traffic flows with queueing models. Similarly, in switching nodes of telecommunication networks, information packets with a given destination of node A may have to wait for the transmission of packets destined to node B that arrived earlier, even when the link to node A is free, if the arriving packets are accommodated in so-called input queues according to the source from which they originate (the well-known HOL-blocking effect, see [5,6,7,8,9]). In order to gain insight in the impact of this kind of phenomenon on the performance of the involved systems, we analyse and compare in this paper two systems. The first system is a system where different types of customers are accommodated in the same queue and global FCFS is assumed. The second system is a system where different types of customers are still accommodated in the same queue, but without global FCFS.
2
Mathematical Model
We consider a continuous-time queueing model with infinite waiting room. There are two servers which both have exponential service times with mean service rate μ. Each of the two servers is dedicated to a given class of customers. In this case, server A always serves customers of one type (say type 1) and server B always serves customers of a second type (type 2). The customers enter the system according to a Poisson arrival process with mean arrival rate λ. The types of consecutive customers are independent, i.e., every time a customer arrives, the customer is of type 1 with probability σ and of type 2 with probability (1 − σ). In the first (and most important) model, we assume that customers all queue together and are served in the order of arrival, regardless of the class they belong to. In our paper, we will call this service discipline “global FCFS”. It can be seen that the two-server system described above is non-workconserving, for two different (orthogonal) reasons. First, the fact that the two servers A and B are dedicated to only one type of customers each, may result in situations where only one of the servers is active even though the system contains more than one customer (of the same type, in such a case). This implies that we cannot expect the system to perform as well as a regular two-server queue with two equivalent servers, i.e., servers able to serve all customers. In this paper, we consider this form of inefficiency as an intrinsic feature of our system, simply caused by the fact that the customers as well as the servers are non-identical.
16
W. M´elange et al.
The second reason why the system is non-workconserving lies in the use of the global FCFS service discipline. This rule may result in situations where only one server is active although the system contains customers of both classes. Such situations occur whenever the two customers at the front of the queue are of the same type: only one of them can then be served (by its own dedicated server) and the other “blocks” the access to the second server for customers of the opposite type further in the queue. This second form of inefficiency is not an intrinsic feature of two-class systems with dedicated servers, but rather it is due to the accidental order in which customers of both types happen to arrive (and receive service) in the system. It is this second mechanism that we want to emphasize in the paper. Therefore, we also study a system without this second mechanism in order to quantify the impact of the global FCFS rule. The rest of this paper can be split up into three parts. In section 3, we will first discuss the system with global FCFS with a focus on the number of customers in the system and the stability of the system. This system is modelled by a continuous-time Markov chain and is solved using generating functions. Next in section 4, the system without the restriction of global FCFS will be discussed, again with a focus on the number of customers and stability of the system. Section 5 is devoted to the comparison between both systems. Some conclusions and directions for future work are given in section 6.
3 3.1
System with a Global FCFS Service Discipline System State Diagram and Balance Equations
The system can be described by a continuous-time Markov chain (see Fig. 1). The states of the Markov chain contain the number of customers in the system and the types of the two customers at the front of the system. For example, the state AB(k), means that one of the customers is of type 1 (is a customer for server A) and the other customer is of type 2 (is a customer for server B), and there are a total of k customers in the system. Because, at each time, only the first two customers can be served (if they are of different types) we are only interested in the type of the customer when the customer becomes the second customer at the front of the system. This type is independent of the type of previous customers, by assumption, so the customer is of type 1 with probability σ and of type 2 with probability (1 − σ). The balance equations of the state diagram of the system in Fig. 1, are γ · p(0) = pA (1) + pB (1)
(1)
(γ + 1) · pA (1) = pAA (2) + pAB (2) + γ · σ · p(0) (γ + 1) · pB (1) = pAB (2) + pBB (2) + γ · (1 − σ) · p(0)
(2) (3)
(γ + 1) · pAA (2) = σ · (pAA (3) + pAB (3)) + γ · σ · pA (1)
(4)
(γ + 2) · pAB (2) = (1 − σ) · pAA (3) + pAB (3) + σ · pBB (3) + γ · ((1 − σ) · pA (1) + σ · pB (1))
(5)
(γ + 1) · pBB (2) = (1 − σ) · (pAB (3) + pBB (3)) + γ · (1 − σ) · pB (1)
(6)
A Two-Class Continuous-Time Queueing Model (1)
λ(1-σ)
0
λσ μ
μ (3)
B 1
A 1 λσ
λ(1-σ)
μ
μ
AB 2
μ
λ μσ
AA 2
(5)
μσ
λ μσ
μ(1-σ)
μ(1-σ)
AB 3
AA 3
BB k-1
AB k-1
AA k-1
μσ
μσ
μ(1-σ) AB k
BB k
μ
λ
μ(1-σ)
μσ BB k+1
μσ
λ
μ
λ
μ(1-σ)
AA k
μσ μσ
AB k+1
λ
μ(1-σ)
(8)
λ
(4)
λ
BB 3
μ(1-σ)
(9)
λ(1-σ)
BB 2
μ(1-σ)
λσ
μ μ
(6)
(2)
(7)
λ
μ(1-σ) AA k+1
Fig. 1. State Diagram of the system with global FCFS
17
18
W. M´elange et al.
(γ + 1) · pAA (k) = σ · (pAA (k + 1) + pAB (k + 1)) + γ · pAA (k − 1)
(7) k3
(γ + 2) · pAB (k) = (1 − σ) · pAA (k + 1) + pAB (k + 1) + σ · pBB (k + 1) (8) + γ · pAB (k − 1) k3 (γ + 1) · pBB (k) = (1 − σ) · (pAB (k + 1) + pBB (k + 1)) + γ · pBB (k − 1) where γ 3.2
(9) k3
λ . μ
Analysis of the System
Stability Condition. Intuitively, stability means that the expected direction (drift) of the process for states in the repeating portion of the chain is towards lower valued states (lower number of customers in the system). If the chain tends to move towards higher valued states (higher number of customers in the system), then the chain is unstable. To calculate the average drift the probabilities are needed that the process is in an interlevel state j (here AA, AB or BB) of the repeating portion of the process for a level k far from the boundary, i.e., for k >> 0 (here called qj ). Intuitively speaking since these levels are far from the boundary, the values qj are independent of the level k. To determine these values a derived Markov chain is considered which identifies transitions only in terms of their interlevels. Specifically, if the original process has a transition from state (k, j) tot state (k − i, l) (in this case i = −1 or 1), then in the derived process it is only considered that a transition occurs from interlevel state j to interlevel state l. [10,11] Translated to the system in this paper, it is easily seen in Fig. 1 that the drift towards higher values and the drift towards lower values are respectively drif thigher = λ · (qAA + qAB + qBB ) , drif tlower = μ · (qAA + 2 · qAB + qBB ).
(10) (11)
The following equations are found by making equations (7) to (9) independent of the level k by substituting pAA (k) by qAA , pAB (k) by qAB and so forth, ⎧ ⎪ ⎨(γ + 1) · qAA = σ · (qAA + qAB ) + γ · qAA (12) (γ + 2) · qAB = (1 − σ) · qAA + qAB + σ · qBB + γ · qAB ⎪ ⎩ (γ + 1) · qBB = (1 − σ) · (qAB + qBB ) + γ · qBB This equation system lets us calculate all the probabilities (qj ) to be in an interlevel state j of the repeating portion of the chain. Inserting these qj in (10) and (11) give us the stability condition,
⇔
drif thigher < drif tlower 1 γ< . 1 − σ · (1 − σ)
(13)
A Two-Class Continuous-Time Queueing Model
19
Distribution and Moments of System Occupancy. To tackle this problem, generating functions are used. We first introduce the three following partial probability generating functions (pgf’s) PAA (z) PAB (z) PBB (z)
∞ k=2 ∞ k=2 ∞
pAA (k) · z k ,
(14)
pAB (k) · z k ,
(15)
pBB (k) · z k .
(16)
k=2
Equations (7) to (9) are multiplied by z k and summed over all k 3. We find (γ + 1) · (PAA (z) − z 2 · pAA (2)) =
σ · [(PAA (z) − z 3 · pAA (3) − z 2 · pAA (2)) z + (PAB (z) − z 3 · pAB (3) − z 2 · pAB (2))]
+ γ · z · PAA (z), (17) 1 (γ + 2) · (PAB (z) − z 2 · pAB (2)) = · [(1 − σ) · (PAA (z) − z 3 · pAA (3) z − z 2 · pAA (2)) + (PAB (z) − z 3 · pAB (3) − z 2 · pAB (2)) + σ · (PBB (z) − z 3 · pBB (3) − z 2 · pBB (2))] + γ · z · PAB (z) , (18) 1 − σ (γ + 1) · (PBB (z) − z 2 · pBB (2)) = · [(PAB (z) − z 3 · pAB (3) z − z 2 · pAB (2)) + (PBB (z) − z 3 · pBB (3) − z 2 · pBB (2))] + γ · z · PBB (z).
(19)
The common probability generating function of the (total) number of customers in the system is given by P (z) = p(0) + z · (pA (1) + pB (1)) + PAA (z) + PAB (z) + PBB (z).
(20)
If we solve equations (1) to (6) and (17) to (19) and insert the solutions in (20) this equation translates into a linear equation that only contains known quantities, except for two unknown probabilities in the numerator. These can be determined, in general, by invoking the well-known property that pgf’s such as P (z) are bounded inside the closed unit disk {z : |z| ≤ 1} of the complex z-plane, at least when the stability condition (13) of the queueing system is met (only in such a case our analysis was justified and P (z) can be viewed as a legitimate pgf). In our case, the denominator of P (z) is of degree 5. The Abel-Ruffini theorem tells us that for a function of degree 5 or higher, it is not possible to find the
20
W. M´elange et al.
zeroes explicitly (see page 586 of [14]). But in this case, we already know one of the five zeroes (z = 1) of the denominator so we only have to find the zeroes of a function of fourth degree which is possible by means of the method of Ferrari [15]. The denominator of P (z) is given by D(z) = (z − 1) · (γ · (1 − σ · (1 − σ)) + 1) · (γ 3 · z 4 −2 · γ 2 · (γ + 2) · z 3 + γ · (γ + 5) · (γ + 1) · z 2 −(2 · γ + 1) · (γ + 2) · z + γ · (1 − σ · (1 − σ)) + 1) and has four zeroes (besides z = 1) of the form 2 + γ ±s 2 + γ 2 ±t 2 · 1 + 4 · γ 2 · σ · (1 − σ) z= 2·γ
(21)
where the signs ±s or ±t can be plus or minus (so four options for four zeroes). We can prove that the only zero of these four zeroes, named z0 in the rest of the paper, that is inside the closed unit disk when the stability condition is met, is the zero where ±s = − and ±t = +. It is clear that this first zero (z0 ) should also be a zero of the numerator of (20), as P (z) must remain bounded in this point (inside the closed unit disk). The requirement that the numerator should vanish yields a linear equation for the two unknowns. For the zero z = 1, this condition is fulfilled regardless of the values of the unknowns, since the numerator of (20) contains a factor z − 1. A second linear equation can however be obtained by invoking the normalizing condition of the pgf P (z), i.e., the condition P (1) = 1. In general, the two unknown probabilities can be found as the solutions of the two established linear equations. Substitution of the obtained values in (20) then leads to a fully determined and explicit expression for the steady-state pgf P (z) of the system occupancy. From this result, various performance measures of practical importance can then be derived. For instance, the mean system occupancy can be found as N = P (1). The mean system delay can then be calculated using Little’s Law [16].
4 4.1
System without Global FCFS Network Model
When the global FCFS restriction is dropped and replaced by the service discipline FCFS for each of the types separately (i.e., a customer can be served if no customers of his own type are in front of him), our system is equivalent to a network of two parallel, separate queues (see Fig. 2) where each customer upon arrival goes immediately to the queue (waiting room) for its own server. The analysis of this model turns out to be much easier. 4.2
Analysis of the System
The random split property of the Poisson process (stating that if a Poisson process with intensity λ is randomly split into two subprocesses with probabilities
A Two-Class Continuous-Time Queueing Model
λ
σ
21
serverA μ
1−σ
μ serverB
Fig. 2. Network model of the system without global FCFS
σ and (1 − σ), then the resulting processes are independent Poisson processes with intensities σ · λ and (1 − σ) · λ) makes the network meet the requirements of a Jackson network [17]. The fact that the system is a Jackson network, greatly simplifies the analysis of this network. The following traffic equations of the system in this paper are very simple λ1 = σ · λ,
(22)
λ2 = (1 − σ) · λ
(23)
and the mean service rates of the servers are given by μi = μ (i = 1, 2)
(24)
The Jackson’s theorem states (for our case) that if (and only if) the unique solution of the traffic equations (λi ) satisfies λi < μi , 1 i 2,
(25)
then the network possesses stochastic equilibrium and a steady-state distribution of the state of the Jackson network is given by a product form p(k1 , k2 ) = p1 (k1 ) · p2 (k2 ),
(26)
where the left side of the equation is the joint distribution to have k1 customers in node (queue) 1 and k2 in node (queue) 2. The right side of the equation is the product of the marginal distributions to have ki customers in node (queue) i of the network of queues. So the network can be split in two simple M/M/1-queues and the marginal distributions of those queues can be multiplied to get the joint distribution. The solution of a simple M/M/1-queue is well-known from many books about queueing theory e.g. [18]. The solutions of the two queues (one for server A and one for server B) are given in (27) and (28). The notation γ is again introduced and is defined as in section 3.
22
W. M´elange et al.
pA (k1 ) = (1 − γ · σ) · (γ · σ)k1
(27) k2
pB (k2 ) = (1 − γ · (1 − σ)) · (γ · (1 − σ)) p(k1 , k2 ) = pA (k1 ) · pB (k2 )
(28) (29)
The stability condition for the system exists out of merging the stability conditions of the two queues separately ((30) and (31)). Those stability conditions are also the conditions that must be met to be able to use Jackson’s Theorem. σ · λ < μ ⇐⇒ γ < (1 − σ) · λ < μ ⇐⇒ γ <
1 σ
(30)
1 1−σ
(31)
After merging, this gives the stability condition for the system 1 1 γ < min( , ). σ 1−σ
(32)
The mean system occupancy N and, with use of Little’s Law, the mean delay T of a customer are respectively given by
N=
∞ ∞ k1 =0 k2 =0
T =
5
(k1 + k2 ) · p(k1 , k2 ) =
γ · (1 − 2 · γ · σ · (1 − σ)) , (1 − γ · σ) · (1 − γ · (1 − σ))
N (1 − 2 · γ · σ · (1 − σ)) = . λ μ · (1 − γ · σ) · (1 − γ · (1 − σ))
(33) (34)
Comparison of Models and Numerical Examples
In this section, we discuss the results obtained in the previous sections, both from a qualitative perspective and by means of some numerical examples. In Figures 3 - 6, we compare both systems studied in section 3 and 4 (i.e., the systems with and without global FCFS) through some performance measures. We have also included the performance measures of two extra queueing systems, which can be considered as worst and best cases respectively (or lower and upper bounds). A lower (worst) limit is the well-known M/M/1-system, one type of customers and one server with a mean service rate of μ. It is clear that this is indeed a lower performance boundary for our systems. In our systems, always at least one server is working when there are customers in the system. So, they behave at least as good as an M/M/1. A higher performance limit is another well-known queueing system (M/M/2), again one type of customers but two servers with a mean service rate of μ. This is an upper performance boundary for our systems, since in our systems at most two servers are working. So it behaves not better than M/M/2. The solutions of both these queueing systems are standard [18].
A Two-Class Continuous-Time Queueing Model
23
worst σ = 0.1 (gFCFS)
20
σ = 0.1 σ = 0.5 (gFCFS) σ = 0.5 best
N 10
0
0
1 γ
2
Fig. 3. Mean system occupancy versus parameter γ
γ=1
20
with gFCFS without gFCFS
N 10
0
0
0.1
0.2
0.3
0.4
0.5 σ
0.6
0.7
0.8
Fig. 4. Mean system occupancy versus parameter σ for γ = 1
0.9
1
24
W. M´elange et al.
2 1.9
with gFCFS without gFCFS
1.8 1.7 γmax
1.6 1.5 1.4 1.3 1.2 1.1 1
0
0.1
0.2
0.3
0.4
0.5 σ
0.6
0.7
0.8
0.9
1
Fig. 5. γmax , the maximum γ that still fulfils the stability condition, versus parameter σ
μ=1 worst σ = 0.1 (gFCFS)
20
σ = 0.1 σ = 0.5 (gFCFS) σ = 0.5
T
best 10
0
0
1 λ Fig. 6. Mean system delay versus the mean arrival rate and μ = 1
2
A Two-Class Continuous-Time Queueing Model
25
Fig. 3 shows the mean system occupancy versus parameter γ, for various values of σ. For each value of σ the mean system occupancy is shown with global FCFS as service discipline (gFCFS) and without global FCFS. It is clear that our system with global FCFS always performs “worse” than the system without this restriction. In the case where the customers are arriving equiprobably (σ = 0.5), the impact of global FCFS on the mean system occupancy is not negligible. While the system without global FCFS almost coincides with the upper boundary, the system with global FCFS leans more toward the lower boundary. Intuitively, we might expect at first glance that our system with global FCFS would lie exactly in the middle between the two boundaries, because the probability of a blocking effect is when the next customer is of the same type as the remaining customer in the server which is here always with probability 12 (= σ · σ + (1 − σ) · (1 − σ)). However, a simple reasoning provides the stability limit 43 (instead of 32 ). If many customers are present and two servers are working, this lasts until one of the 1 services is finished (on average 2·µ time units). From this instant, one server 1 works with probability 2 and two servers work with probability 12 (σ = 0.5). In the first case, this lasts on average µ1 time units. So, the output rate is on 1 average 1 customer per 12 · ( 2·µ + µ1 ), i.e. 43 · μ. Fig. 3 also shows that the difference between the mean system occupancy with and without global FCFS is smaller when there are many customers of the same type (σ = 0.1). This can be rather surprising because the probability to have two customers of the same type arriving one after another is much greater in this case and we would expect more blocking compared to the case when our customers are arriving equiprobably. However, the reason why this is not the case, is that the majority of customers are blocked almost all the time by customers of the same type which is in both systems the same. The minority (which is assumed to be much smaller than the majority of customers) who are almost always blocked by customers of a different type, have much less influence on the mean occupancy of the system. So the impact of global FCFS is less pronounced in the mean system occupancy because the impact is mainly on the minority of customers. In Fig. 4, we have plotted the mean system occupancy versus the parameter σ for γ = 1 (with global FCFS as service discipline and without global FCFS). This figure confirms the observations we made in Fig. 3. We observe again that the difference between the mean system occupancy with and without global FCFS is smaller when there are many customers of the same type. This figure also shows the symmetry of our system (point of symmetry in σ = 0.5). The reason for this symmetry, is due to the fact that the mean service rates of the servers are equal. So making server A dedicated to customers of type 2 and server B to customers of type 1 does not have any impact compared to our system. In Fig. 4, we can also see that when customers arrive equiprobably (σ = 0.5), an optimum (here minimum) is reached for the mean system occupancy. This is intuitively clear, because in that case the workload of the system is evenly divided between the two servers who have, by assumption, an equal mean service rate μ and giving one of the two servers more load has no benefit.
26
W. M´elange et al.
In Fig. 5, γmax , the maximum γ that still fulfils the stability condition, is plotted versus σ for both studied systems. It is clear that γmax is always bigger for the system without global FCFS, and this γmax is determined by the most loaded class. The system with global FCFS also has a largest γmax for σ = 0.5, but the difference with the system without global FCFS is also greatest for this σ. Again we can see the symmetry of our system (point of symmetry σ = 0.5). Fig. 6 shows the mean system delay versus the mean arrival rate for a mean service rate μ of 1 for both studied systems (σ = 0.1 and 0.5) and for the two “extrema” systems. Similar conclusions are drawn as for the mean system occupancy.
6
Conclusions and Future Work
In this paper, we have studied two-class, two-server queues with class-dedicated servers in continuous time assuming a Poisson arrival process where the types of customers are independent. In the first model, we assume a global FCFS service discipline, while in a second model we study the more simple model without a global FCFS service discipline. We have succeeded in deriving an explicit closedform formula for the pgf of the system occupancy for the system with global FCFS and the pmf (probability mass function) for the system without global FCFS. Comparing these systems has allowed us to uncover the (negative) impact of global FCFS. The model examined in this paper can be generalized in various directions. First of all, we can study the impact of “class clustering”, i.e., customers of any given type may (or may not) have a tendency to “arrive back-to-back”. We can intuitively see that this tendency will have a big impact on the blocking effect when operating under a global FCFS service discipline. When they arrive always alternating there will be less blocking than when they alternate only occasionally. This complication will however make the analysis more difficult. A second direction to follow is to let the service times be different for both servers. Finally, we can relax the global FCFS restriction by letting the servers be able to serve one of the m first customers at the front of the queue. We plan to tackle several of these generalizations in future work.
References 1. Ngoduy, D.: Derivation of continuum traffic model for weaving sections on freeways. Transportmetrica 2, 199–222 (2006) 2. Nishi, R., Miki, H., Tomoeda, A., Nishinari, K.: Achievement of alternative configurations of vehicles on multiple lanes. Physical Review E 79, 066119 (2009) 3. Van Woensel, T., Vandaele, N.: Empirical validation of a queueing approach to uninterrupted traffic flows. 4OR. A Quarterly Journal of Operations Research 4, 59–72 (2006) 4. Van Woensel, T., Vandaele, N.: Modeling traffic flows with queueing models: A review. Asia-Pacific Journal of Operational Research 24, 435–461 (2007)
A Two-Class Continuous-Time Queueing Model
27
5. Karol, M., Hluchyj, M., Morgan, S.: Input versus output queueing on a spacedivision packet switch. IEEE Transactions on Communications 35, 1347–1356 (1987) 6. Liew, S.: Performance of various input-buffered and output-buffered ATM switch design principles under bursty traffic: simulation study. IEEE Transactions on Communications 42, 1371–1379 (1994) 7. Laevens, K.: A processor-sharing model for input-buffered ATM-switches in a correlated traffic environment. Microprocessors and Microsystems 22, 589–596 (1999) 8. Stolyar, A.: MaxWeight scheduling in a generalized switch: state space collapse and workload minimization in heavy traffic. Annals of Applied Probability 14, 1–53 (2004) 9. Beekhuizen, P., Resing, J.: Performance analysis of small non-uniform packet switches. Performance Evaluation 66, 640–659 (2009) 10. Nelson, R.: Matrix geometric solutions in Markov models: a mathematical tutorial. Technical Report RC 16777, IBM T.J. Watson Research Center, Yorktown Heights, NY (1991) 11. Neuts, M.F.: Matrix-Geometric Solutions in Stochastic Models: An Algorithmic Approach. The John Hopkins University Press, Baltimore (1981) 12. Gonz´ ales, M.: Classical complex analysis. Marcel. Marcel Dekker, New York (1992) 13. Bruneel, H., Kim, B.: Discrete-time models for communication systems including ATM. Kluwer Academic Publishers, Dordrecht (1993) 14. Katz, V.J.: A History of Mathematics: An Introduction, 2nd edn. Addison-Wesley, Reading (1998) 15. Cardano, G.: Ars Magna (1545) 16. Kleinrock, L.: Theory, Queueing Systems, vol. 1. Wiley Interscience, Hoboken (1975) 17. Jackson, J.: Networks of waiting lines. Operations Research 5(4), 518–521 (1957) 18. Bocharov, P.P., D’Apice, C.: Queueing Theory. Walter de Gruyter, Berlin (2004)
M/G/1 Queue with Exponential Working Vacation and Gated Service Zsolt Saffer and Mikl´ os Telek Budapest University of Technology and Economics (BUTE), Hungary {safferzs,telek}@hit.bme.hu
Abstract. In this paper we consider the analysis of an M/G/1 queue with working vacation. In contrast to the previous literature where the working vacation starts when all customers are served (exhaustive discipline) we consider the case where the vacation period starts when the customers present at the system at beginning of the service period are served (gated discipline). The analysis of the model with gated discipline requires a different approach than the one with exhaustive discipline. We present the probability-generating function of the number of customers in the system and the Laplace-Stieljes transform of the stationary waiting time. Keywords: queueing theory, vacation model, working vacation.
1
Introduction
Working vacation (WV) is an extension to the regular vacation model, where the server is switched off during the vacation. In WV systems, instead of completely stopping the service at the beginning of the vacation period, the server continues serving the customers with a different service rate. In practice the service rate during WV is lower than the one during service period, but it is not a modeling restriction. WV models are suitable to describe practical system features like the effect of a lower intensity administrative task of the server, e.g. a safeguard service, following an active period. In the multiple working vacation (MWV) model a vacation period is followed by another vacation period if the server finds the system empty upon returning from vacation. The regular vacation model is a special case of the working vacation model with zero service rate during vacation. Thus the working vacation model is a generalization of the regular vacation model and hence, as expected, its analytical complexity is somewhat higher than the one of the regular vacation model. Vacation models with Poisson arrivals have been intensively studied in the last decades. For such models and for their solution we refer to the survey of Doshi [4] and to the fundamental book of Takagi [16]. The WV policy has been introduced by Servi and Finn [13] in 2002. They applied the M/M/1 queue with multiple working vacations to model a Wavelength-Division Multiplexing (WDM) optical access network. They derived the probability-generating function (PGF) of the number of customers in the K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 28–42, 2011. c Springer-Verlag Berlin Heidelberg 2011
M/G/1 Working Vacation Model
29
system. Baba [1] generalized this model to a renewal input GI/M/1 queue with working vacations and derived the number of customers at customer arrival epochs and at arbitrary time. Wu and Takagi [18] generalized the model of Servi and Finn to the M/G/1 queue with working vacations. They provided a numerical solution for computing the distribution of the number of customers in the system. Liu, Xu and Tian [10] proved that the well-known stochastic decomposition property of the vacation queues [5] holds also for an M/M/1 queue with working vacations. Recently Li and Tian with co-authors in [9] and [8] applied the matrix analytic approach subsequently to an M/G/1 queue with exponential working vacations and to its extension to batch arrivals, respectively. In all the above-mentioned working vacation queueing models the exhaustive discipline has been applied, i.e. the vacation starts, when the queue becomes empty. In this paper we analyze the M/G/1 queue with exponential working vacations, but in contrast to the above references we consider the gated discipline. According to this discipline only those customers are served during the actual service period, which are already present at the beginning of the service period. Thus the customers arriving during a service period are present at the beginning of the next vacation period. A potential application of this model is the analysis of an Internet Protocol (IP) over WDM optical access network (see in [11]). The contribution of this paper is the queueing theoretic analysis and the results for the M/G/1 working vacation queueing model with gated discipline. In the first part of the analysis we establish a functional equation for the PGF of the stationary number of customers at the end of vacation period, for which we utilize known results for the transient behavior of the M/G/1 queue. We solve this equation by using a convergence property of sequence of scalar probability functions (see [7] or [6]), which results in the expression of the PGF of the stationary number of customers at the end of vacation period. In the second part of the analysis we establish a relation for the PGF of the stationary number of customers at an arbitrary epoch. For the analysis we apply several elements of the methodology of [18]. The main results are the expressions of the PGF of the stationary number of customers at an arbitrary epoch and of the Laplace-Stieljes transform (LST) of the stationary waiting time. The change of service rate is an important feature of the WV models. In the the WV model the service period ends in a service completion epoch. It means that the last customer served during the service period is served with the regular service time and the first one in the vacation period is served with the service time of the vacation period. In contrast to this the end of the vacation period is not synchronized with service completion. If a vacation period expires during the service of a customer the service period starts with repeating the complete service of the same customer but with the service time of the service period. The rest of this paper is organized as follows. In section 2 we introduce the model and the notation. The stationary number of customers at the end of vacation are derived in section 3. The PGF of the stationary number of customers is given in section 4. The LST of the stationary waiting time is provided in section 5.
30
Z. Saffer and M. Telek
2
Model Description
We consider a queue with multiple working vacations and gated service. The customer arrival process is Poisson with rate λ. Due to the gated service only those customers are served, which are present at the start of service period. The customer service times are independent and identically distributed. B, B(t), B(s), b, b(2) denote the service time r.v., its cumulative distribution function, its LST and its first two moments, respectively. The service during the service period is work conserving and non-preemptive. After finishing the service in the service period the server goes to vacation. The vacation period, V , is an exponentially distributed r.v. with parameter μ. Note that the customers arriving during the service period are present at the start of vacation. According to the multiple working vacation policy the server serves the customers with a different service time distribution during the vacation period instead of completely stopping the service. The customer service times in the vacation period are independent and identically distributed. H, H(s), h denote the service time r.v. in the vacation period, its LST and its mean, respectively. If there is a customer under service at the end of vacation period, the server changes to another service rate, i.e. it interrupts the service and starts a new service on that customer with the customer service time B. If there are no customers in the system at the end of the vacation period, the server immediately takes another vacation period. We define the cycle time as a service period and a vacation period together. On this vacation model we impose the following assumptions: A.1 The arrival rate, the mean customer service time, the mean vacation time and the mean customer service time in the vacation period are positive and finite, i.e. 0 < λ < ∞, 0 < b < ∞, 0 < 1/μ < ∞ and 0 < h < ∞. A.2 The arrival process, the customer service times, the sequence of vacation periods and the customer service times in the vacation periods are mutually independent. A.3 The customers are served in First-In-First-Out (FIFO) order. We assume that the model is stable. Both the mean vacation time and the arrival rate are finite, thus only finite number of customers can be accumulated during the vacation period. Hence from the point of view of the stability only the service period has to be considered. According to this the model is stable if the arrival rate does not exceed the mean service rate ( 1b ). Consequently the condition of the stability is ρ < 1, where we introduced the notation ρ = λb. The Markov Regenerative Process (MRP) framework (introduced in [12], Theorem 1) holds also for this model, since all the necessary assumptions are fulfilled. Thus the limiting distributions of the number of customers at different epochs and in different intervals are stationary distributions. Hence through this paper we use the term ”stationary” instead of ”limiting”. When y(z) is a PGF, y (k) denotes its k-th derivative at z = 1 for k ≥ 1, i.e., dk (k) y = dz k y(z)|z=1 .
M/G/1 Working Vacation Model
3
31
The Stationary Number of Customers at the End of Vacation Period
In this section we derive the PGF of the stationary number of customers at the end of vacation period. We describe the evolution of the system over the vacation period in terms of PGFs of the stationary number of customers. For doing this we take the idea of utilizing the transient behavior of the M/G/1 queue from [18], which we recall first. The descriptions of the evolutions of the system over the vacation period and over the service period lead to a functional equation for the PGF of the stationary number of customers at the end of vacation, which we call the governing equation of the system. Afterwards we solve this functional equation by applying a convergence property of sequence of scalar functions. 3.1
Transient Behavior of the M/G/1 Queue
Let Γ (t) be the number of customers in the M/G/1 queue at time t for t ≥ 0. Suppose that the queue starts to work at t = 0 and Γ (0) = i for i ≥ 0. The transition probability describing the changes of the number of customers up to t is defined as pi,j (t) = P {Γ (t) = j|Γ (0) = i} ,
t ≥ 0,
i, j ≥ 0.
The corresponding Laplace transform (LT) and PGF are given as ∞ Ti,j (s) = e−st pi,j (t)dt, Re(s) ≥ 0. t=0
Ti (z, t) =
∞
pi,j (t)z j ,
|z| ≤ 1.
j=0
The LT of Ti (z, t) Ti (z, s) =
∞
t=0
e−st Ti (z, t)dt,
i ≥ 0.
(1)
can be explicitly expressed as ([14], p. 74, eq. (77)) + λ − λz) + (z − 1)(s + λ − λz)H(s + λ − λz)Ti,0 (s) z i+1 1 − H(s T i (z, s) = . (2) + λ − λz) (s + λ − λz) z − H(s
Here Ti,0 (s) can be explicitly given as Ti,0 (s) =
θ(s)i , s + λ − λθ(s)
(3)
32
Z. Saffer and M. Telek
where θ(s) can be determined from the equation + λ − λθ(s)), θ(s) = H(s
(4)
as its root with the smallest absolute value ([14]). 3.2
Evolution of the System over the Vacation Period
Let N (t) the number of customers in the system at time t for t ≥ 0. Furthermore let tfk and tm k denote the end and the start of vacation in the k-th cycle for k ≥ 1, respectively. The stationary PGF of the number of customers at the end of vacation, f(z), and at the beginning of vacation, m(z), are defined as ∞
f(z) = lim
k→∞
m(z) = lim
n=0
k→∞
P N (tfk ) = n z n ,
|z| ≤ 1,
n P {N (tm k ) = n} z ,
|z| ≤ 1.
∞ n=0
Let f = f (1) denote the mean of the stationary number of customers at the end of vacation. Similarly let m = m(1) denote the mean of the stationary number of customers at the start of vacation. Theorem 1. In the stable M/G/1 multiple working vacation model with gated discipline satisfying assumptions A.1 - A.3 the m → f transition can be described as + λ − λz) μz m(z) 1 − H(μ = f(z) + λ − λz) (μ + λ − λz) z − H(μ +
+ λ − λz) μ(z − 1)H(μ m(θ(μ)) . μ + λ − λθ(μ) z − H(μ + λ − λz)
(5)
Proof. The evolution of the number of customers in the working vacation can be described by the transient behavior of the M/G/1 queue starting with the number of customers present at the start of vacation. Assuming that the number of customers present at the start of vacation in the k-th cycle is i ≥ 0, the PGF of the number of customers present at the end of that vacation can be expressed as
∞
t=0
Ti (z, t)μe−μt dt.
M/G/1 Working Vacation Model
33
Unconditioning on the number of customers at the start of vacation and letting k tend to ∞ gives the PGF of the number of customers at the end of vacation as ∞ ∞ = lim f(z) P {N (tm ) = i} Ti (z, t)μe−μt dt. (6) k k→∞
i=0
t=0
Applying the definition of Ti (z, s) and (2) in (6) results in f(z) = μ lim
k→∞
= μ lim
k→∞
z
i+1
∞ i=0 ∞
P {N (tm k ) = i} T i (z, μ)
(7)
P {N (tm k ) = i}
i=0
+ λ − λz) + (z − 1)(μ + λ − λz)H(μ + λ − λz)Ti,0 (μ) 1 − H(μ . + λ − λz) (μ + λ − λz) z − H(μ
Applying (3) and the definition of m(z) in (7) gives the statement of the theorem. 3.3
Computation of f(z)
Theorem 2. The governing equation of the stable M/G/1 multiple working vacation model with gated discipline satisfying assumptions A.1 - A.3 is given in term of f(z) as − λz))μz 1 − H(μ + λ − λz) f(B(λ f(z) = + λ − λz) (μ + λ − λz) z − H(μ +
+ λ − λz) f(B(λ − λθ(μ))) μ(z − 1)H(μ . + λ − λz) μ + λ − λθ(μ) z − H(μ
(8)
Proof. Under the gated discipline the number of customers at the end of the service period (= at the start of vacation) equals to the number of customers arriving during the service period. The PGF of the number of arriving customers − λz). Hence the PGF of the number of during a customer service time is B(λ customers at the start of vacation is given by (see e.g. [15]) − λz)) m(z) = f(B(λ
(9)
This relation describes the f → m transition under the gated discipline. Substituting (9) into (5) results in the governing equation of the system.
34
Z. Saffer and M. Telek
The derivative of (9) at z = 1 gives m = ρf.
(10)
We define a sequence of functions recursively as β0 (z) = z, |z| ≤ 1, − λβk (z)), βk+1 (z) = B(λ
k ≥ 0.
(11)
Theorem 3. In the stable M/G/1 multiple working vacation model with gated discipline satisfying assumptions A.1 - A.3 the stationary PGF of the number of customers at the end of a vacation is given as f(z) = φ(z) +
− λθ(μ))) φ(B(λ ψ(z). − λθ(μ))) μ + λ − λθ(μ) − ψ(B(λ
(12)
where φ(z) and ψ(z) are given as ∞
φ(z) =
ηk (z),
(13)
k=0
ψ(z) =
∞ k=0
ωk (z)
k−1
ηr (z) ,
(14)
r=0
with + λ − λβk (z)) μβk (z) 1 − H(μ , ηk (z) = + λ − λβk (z)) (μ + λ − λβk (z)) βk (z) − H(μ + λ − λβk (z)) μ(βk (z) − 1)H(μ ωk (z) = + λ − λβk (z)) βk (z) − H(μ
(15)
(16)
and an empty product is 1. Proof. Replacing z by βk (z) in (8) for k ≥ 0 leads to + λ − λβk (z)) μβk (z) 1 − H(μ f(βk (z)) = f(βk+1 (z)) + λ − λβk (z)) (μ + λ − λβk (z)) βk (z) − H(μ + λ − λβk (z)) f(B(λ − λθ(μ))) μ(βk (z) − 1)H(μ + . (μ + λ − λθ(μ)) + λ − λβk (z)) βk (z) − H(μ
(17)
M/G/1 Working Vacation Model
35
Solving (17) by recursive substitution for k ≥ 0 yields + λ − λβk (z)) ∞ μβk (z) 1 − H(μ
f(z) = f( lim βk (z)) k→∞ k=0 (μ + λ − λβk (z)) βk (z) − H(μ + λ − λβk (z)) ∞ − λθ(μ))) + λ − λβk (z)) f(B(λ μ(βk (z) − 1)H(μ + μ + λ − λθ(μ) + λ − λβk (z)) βk (z) − H(μ k=0 + λ − λβr (z)) k−1 μβr (z) 1 − H(μ
. (18) (μ + λ − λβ (z)) β (z) − H(μ + λ − λβ (z)) r=0 r r r It can be shown that for ρ < 1, which is the condition of stability (see in section 2), limk→∞ βk (z) = 1 for any |z| ≤ 1 [6]. Using this in (18) yields + λ − λβk (z)) ∞ μβk (z) 1 − H(μ
= f(z) k=0 (μ + λ − λβk (z)) βk (z) − H(μ + λ − λβk (z)) ∞ − λθ(μ))) + λ − λβk (z)) f(B(λ μ(βk (z) − 1)H(μ + μ + λ − λθ(μ) + λ − λβk (z)) βk (z) − H(μ k=0 + λ − λβr (z)) k−1 μβr (z) 1 − H(μ
. (19) r=0 (μ + λ − λβr (z)) βr (z) − H(μ + λ − λβr (z)) By the notations introduced in (13) and (14), (19) can be rewritten as − λθ(μ))) f(B(λ f(z) = φ(z) + ψ(z). μ + λ − λθ(μ)
(20)
− λθ(μ))) is obtained by setting z = B(λ − λθ(μ)) in The unknown term f(B(λ (20), therefore − λθ(μ))) = f(B(λ
− λθ(μ))) φ(B(λ . − λθ(μ))) ψ(B(λ 1− μ + λ − λθ(μ)
(21)
Substituting (21) into (20) gives the theorem.
Remark 1. m(z) can be also determined by applying (12) in the gated discipline specific f → m transition (9). (1)
From the definition of βk (z), ηk (z) and ωk (z) we have βk (1) = 1, βk (1)
ηk (1) = 1, ηk
=
λ−(λ+μ)H(μ) ρk , μ(1−H(μ))
(1)
ωk (1) = 0, ωk
=
μH(μ) ρk , 1−H(μ)
= ρk ,
for k ≥ 0.
36
Z. Saffer and M. Telek
Using these properties we obtain φ(1) =
∞ k=0
ψ (1) =
(1)
ηk =
∞ k=0
(λ + μ)H(μ) −λ 1 , 1−ρ μ(H(μ) − 1)
(22)
μH(μ) 1 , 1 − ρ 1 + H(μ)
(23)
(1)
ωk =
and from (12) we have f (k) = φ(k) +
− λθ(μ))) φ(B(λ ψ (k) . μ + λ − λθ(μ) − ψ(B(λ − λθ(μ)))
(24)
The computation of the second moments is more involved. (2)
β0
2k−2
(2)
βk = λ2 b(2)
= 0,
ρi k ≥ 1,
(25)
i=k−1
2k (1 − H(μ))(λ − (λ + μ)H(μ))(μβ k + 2λρ ) 2 μ2 (1 − H(μ)) (2)
(2)
ηk = +
(26)
(μ))ρ2k 2μ2 (H(μ) + λH , 2 μ2 (1 − H(μ))
2k μH(μ)(1 − H(μ))β k − 2μ(H(μ) + λH (μ))ρ , 2 (1 − H(μ)) (2)
(2)
ωk =
(27)
and φ(2) =
∞ k=0
ψ (2) =
∞ k=0
4
(2)
ηk + 2
(2)
∞ k=0
ωk + 2
∞ k=0
∞
(1)
ηk
(1)
ηi ,
(28)
(1)
(29)
i=k+1
(1)
ωk
k−1 i=0
ηi .
The Stationary Number of Customers at an Arbitrary Epoch
In this section we determine the PGF of the stationary number of customers at an arbitrary epoch from the PGFs of the stationary number of customers in the service period and in the vacation period. These PGFs are determined in
M/G/1 Working Vacation Model
37
terms of f(z) and m(z). Putting all these together and applying the formulas for f(z) and m(z) derived in the previous section gives the PGF of the stationary number of customers at an arbitrary epoch. We define q(z) as the PGF of the stationary number of customers in an arbitrary epoch as q(z) = lim
t→∞
4.1
∞
P {N (t) = n} z n ,
|z| ≤ 1.
n=0
The Stationary Number of Customers in the Service Period
We define qb (z) as the PGF of the stationary number of customers in the service period as qb (z) = lim
t→∞
∞
P {N (t) = n | t ∈ service period} z n ,
|z| ≤ 1.
n=0
Let G(k) be the number of customers served in the service period in the k-th cycle for k ≥ 1. Let tsk, and tdk, denotes the epoch at the start and just after the end of the -th customer service in the service period in the k-th cycle for = 1, ...G(k) and k ≥ 1, respectively. Furthermore we define qs (z) as the PGF of the stationary number of customers at the customer service start epochs in the service period as
m G(k) s ∞ P N (t ) = n k, k=1 =1
m qs (z) = lim z n , |z| ≤ 1. m→∞ E ( G(k)) k=1 n=0 Similarly we define qd (z) as the PGF of the stationary number of customers left in the system at the customer departure epochs in the service period as
m G(k) ∞ P N (tdk, ) = n k=1 =1
m qd (z) = lim z n, |z| ≤ 1. m→∞ E ( G(k)) k=1 n=0 Proposition 1. In the stable M/G/1 multiple working vacation model with gated discipline satisfying assumptions A.1 - A.3 the stationary PGF of the number of customers in the service period is given as
qb (z) =
− λz)) m(z) (1 − ρ)z(1 − B(λ − f(z) . − λz) − z) f −m ρ(1 − z)(B(λ
(30)
Proof. Given the number of customers at the end of the vacation period the service process is independent of the fact whether the model has working or regular vacation. Therefore the expression of qd (z) in terms of f(z) and m(z) in [3], which holds for the regular vacation model, is valid also in our working
38
Z. Saffer and M. Telek
vacation model. In fact in [3] this expression has been derived for q(z), but a standard up-and down-crossing argument combined with PASTA [17] shows that the stationary number of customers at customer departure, at customer arrival and at arbitrary epochs are all the same. According to this qd (z) can be expressed as qd (z) =
− λz) m(z) (1 − ρ)B(λ − f(z) . − λz) − z f −m B(λ
(31)
Furthermore the number of customers just before the customer departure epoch is one more than the number of customers just after that customer departure epoch. On the other hand it is the sum of the number of customers at the start of the previous customer service and the number of customers arriving during that customer service, which are independent. It leads to − λz). qd (z)z = qs (z)B(λ
(32)
Applying (31) in (32), qs (z) can be expressed as qs (z) =
m(z) − f(z) . − λz) − z f −m B(λ (1 − ρ)z
(33)
The interval between the starting time of a customer service in the service period and an arbitrary epoch in that service time is the backward recurrence customer service time, whose probability density function (pdf) is given by b∗ (t) =
1 − B(t) . b
(34)
The number of customers at an arbitrary epoch in any customer service time is the number of customers at the start of that customer service and the number of customers arriving in between. The later can be obtained by integrating the customer arrivals with the backward recurrence customer service time. Thus for qb (z) we obtain ∞
m G(k) j s (λt)j−i −λt ∗ =1 k=1 i=1 P N (tk, ) = i m q (z) = lim z e b (t)dt. (35) m→∞ E t=0 (j − i)! k=1 G(k) j=1 ∞
b
j
Rearrangement of (35) and using the definition of qs (z) leads to qb (z) = lim
m→∞ s
= q (z)
∞ i=1 ∞
m G(k) ∞ ∞ s (λtz)j−i −λt ∗ =1 P N (tk, ) = i k=1 m zi e b (t)dt (j − i)! E k=1 G(k) j−i=0 t=0
t=0
e−λt(1−z) b∗ (t)dt.
Applying (34) and the integral property of LT, that is in (36) yields
(36)
∞
t=0
e−st B(t)dt =
B(s) , s
M/G/1 Working Vacation Model
qb (z) =
qs (z) b
∞ t=0
e−λt(1−z) dt −
− λz) 1 − B(λ = qs (z) . ρ(1 − z)
∞
e−λt(1−z) B(t)dt
39
t=0
(37)
Applying (33) in (37) results in the statement of the proposition. 4.2
The Stationary Number of Customers in the Vacation Period
We define qv (z) as the PGF of the stationary number of customers in the vacation period as v
q (z) = lim
t→∞
∞
P {N (t) = n | t ∈ vacation period} z n ,
|z| ≤ 1.
n=0
Proposition 2. In the stable M/G/1 multiple working vacation model with gated discipline satisfying assumptions A.1 - A.3 the stationary PGF of the number of customers in the vacation period is given as qv (z) = f(z).
(38)
Proof. The interval between the starting time of a vacation and an arbitrary epoch in that vacation is the backward recurrence vacation time. Let v ∗ (t) denote the probability density function (pdf) of the backward recurrence vacation time. Following the same line of argument as in theorem 1 the PGF of the number of customers present at an arbitrary epoch in the vacation can be expressed as ∞ ∞ v m q (z) = lim P {N (tk ) = i} Ti (z, t)v ∗ (t)dt. (39) k→∞
i=0
t=0
Due to the exponential distribution of the vacation time the backward recurrence vacation time is also exponentially distributed. Thus the right side of (39) is the same as the right side of (6), from which the statement of the proposition follows. 4.3
Computation of q(z)
Theorem 4. In the stable M/G/1 multiple working vacation model with gated discipline satisfying assumptions A.1 - A.3 the stationary PGF of the number of customers at an arbitrary epoch is given as ⎛ ⎞ μz(1 − B(λ−λz)) f(B(λ−λz)) − f(z) 1 ⎝ q(z) = + f(z)⎠ (40) 1 + μbf λ(1−z)(B(λ−λz) − z) where f(z) and f are given by (12) and (24), respectively.
40
Z. Saffer and M. Telek
Proof. Let σ be the mean stationary length of the service period. Under gated discipline each customer present at the start of service period generates a service with mean length b. Applying Wald’s lemma leads to σ = f b.
(41)
The state of the working vacation model alternates between service periods and vacation periods. According to the renewal theory the probabilities that the random epoch τ finds the model in service period or in vacation are given as σ pb = P {τ ∈ service period} = , σ + 1/μ 1/μ pv = P {τ ∈ vacation period} = . (42) σ + 1/μ It follows from the theorem of total probability that q(z) = pb qb (z) + pv qv (z).
(43)
Applying (41), (42), and propositions 2 and 1 in (43) leads to q(z) =
− λz)) m(z) μbf (1 − ρ)z(1 − B(λ − f(z) 1 + f(z). (44) − λz) − z) 1 + μbf ρ(1 − z)(B(λ f −m 1 + μbf
Applying (9) and (10) results in the statement of the theorem.
Corollary 1. Based on (40) the mean number of customers is
q
5
(1)
2(1 + μb) + μλb(2) f + μb(1 + ρ)f (2) = . 2(1 + μbf )
(45)
The Stationary Waiting Time
Let Wτ be the waiting time in the system at time τ . We define the distribution function of the stationary waiting time, W (t), as W (t) = lim P {Wτ ≤ t} . τ →∞
The LST of the stationary waiting time is defined as ∞ w (s) = e−st dW (t), Re(s) ≥ 0. t=0
Theorem 5. In the stable M/G/1 multiple working vacation model with gated discipline satisfying assumptions A.1 - A.3 the LST of the stationary waiting time is given as ⎛ ⎞ s s 1 1 ⎝ μ(1− λ )(1− B(s)) f (B(s)) − f (1− λ ) w (s) = + f 1− λs ⎠ (46) (s) 1+μbf B s(B(s) − (1− λs ))
where f(z) and f are given by (12) and (24), respectively.
M/G/1 Working Vacation Model
41
Proof. The model assumptions imply that a new arriving customer do not affect the time in the system of any previously arrived customers. This ensures the applicability of the distributional Little’s law [2]. Furthermore the time in the system of an arbitrary customer is the sum of its waiting time and its service time, which are independent due to the model assumptions. Taking it also into account the distributional Little’s law can be given to our model as (λ − λz) . q(z) = w (λ − λz) B Substituting z = 1 −
s λ
(47)
into (47) and rearranging yields w (s) =
q(1 − λs ) . (s) B
The statement comes from (48) and (40).
(48)
d From (48) the mean waiting time, E(W ) = − ds w (s) |s=0 , is
E(W ) =
q (1) − b, λ
(49)
which is the regular Little law obtained from the distributional Little law.
References 1. Baba, Y.: Analysis of a GI/M/1 queue with multiple working vacations. Operation Research Letters 33, 201–209 (2005) 2. Bertsimas, D., Nakazato, D.: The distributional Little’s law and its application. Operations Research 43, 298–310 (1995) 3. Borst, S.C., Boxma, O.J.: Polling models with and without switchover times. Operations Research 45, 536–543 (1997) 4. Doshi, B.T.: Queueing systems with vacations - a survey. Queueing Systems 1, 29–66 (1986) 5. Fuhrmann, S.W., Cooper, R.B.: Stochastic Decompositions in the M/G/1 Queue with Generalized Vacations. Operations Research 33, 1117–1129 (1985) 6. Kim, T.S., Chang, S.H., Chae, K.C.: Performance Analysis of a Discrete-Time Two-Phase Queueing System. ETRI Journal 25, 238–246 (2003) 7. Kuczma, M.: Functional equations in a single variable. PWN-Polish Scientific Publishers, Warsaw (1968) 8. Li, J., Jia, D., Tian, N.: A batch arrival queue with exponential working vacations. In: 5th International Conference on Queueing Theory and Network Applications (QTNA 2010), pp. 169–173 (July 2010) 9. Li, J., Tian, N., Zhang, Z.G., Luh, H.P.: Analysis of the M/G/1 queue with exponential working vacations - a matrix analytic approach. Queueing Systems 61, 139–166 (2009) 10. Liu, W., Xu, X., Tian, N.: Stochastic decompositions in the M/M/1 queue with working vacations. Operation Research Letters 35, 595–600 (2007) 11. Narula-Tam, A., Finn, S.G., Medard, M.: Analysis of reconfiguration in IP over WDM access networks. In: Proceedings of the Optical Fiber Communication Conference, (OFC) p. MN4.1-MN4.3 (2001)
42
Z. Saffer and M. Telek
12. Saffer, Z.: An introduction to classical cyclic polling model. In: Proc. of the 14th Int. Conf. on Analytical and Stochastic Modelling Techniques and Applications (ASMTA 2007), pp. 59–64 (2007) 13. Servi, L.D., Finn, S.G.: M / M /1 queue with working vacations(M/M/1/WV). Performance Evaluation 50, 41–52 (2002) 14. Tak´ acs, L.: Introduction to the Theory of Queues. Oxford University Press, New York (1962) 15. Takagi, H.: Analysis of Polling Systems. MIT Press, Cambridge (1986) 16. Takagi, H.: Queueing Analysis - A Foundation of Performance Evaluation, Vacation and Prority Systems, vol. 1. North-Holland, Amsterdam (1991) 17. Wolff, R.W.: Poisson Arrivals See Times Averages. Operations Research 30, 223–231 (1982) 18. Wu, D., Takagi, H.: M/G/1 queue with multiple working vacations. Performance Evaluation 63, 654–681 (2006)
The Application of FSP Models in Automatic Optimization of Software Deployment Omid Bushehrian IT and Computer Department, Shiraz University of Technology Shiraz, Iran
[email protected]
Abstract. The correct deployment of software objects over the computational resources has a significant impact on the software performance. Achieving the optimal deployment manually is a tedious work as there are many different alternative solutions. In this paper a heuristic algorithm for optimizing the deployment of software objects is proposed which evaluates each deployment in the search space, considering its communicational and computational delays. In order to estimate these delays for an object deployment, our algorithm takes into account both the resource capacities and the execution load of the software for a given input-workload. The execution load of the software is measured by simulating the software use-case scenarios using the Finite State Process (FSP) models. From the simulation, the values of some metrics such as utilization, population and mean response times corresponding to the objects and threads participating in software use-case scenarios are recorded as the execution load indicators. These recorded simulation results are subsequently applied to estimate the goodness of a deployment in the search space. Keywords: Software Performance Engineering; Object Deployment; Load balancing algorithm; Simulation.
1 Introduction The performance of a distributed software system has always been of critical importance to the designers of such systems. Software Performance Engineering (SPE) aims at detecting and predicting performance problems at the early stages of development process by evaluating the software design or deployment using simulation, modeling or measurement [1]. There has been many works in automatic generation of performance models from software architectural models and then analyzing these generated performance models to locate the performance problems [2][3]. In order to solve these performance problems at design level, one approach is to manually optimize design decisions represented in performance models [4]. However automated techniques for optimizing the distributed software design or deployment with respect to performance have not been researched much so far [1]. One of the important factors affecting the performance of a distributed software is the way that software objects or components are assigned to the computing resources. For instance, deploying certain objects on the same computing node eliminates the K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 43–54, 2011. © Springer-Verlag Berlin Heidelberg 2011
44
O. Bushehrian
network delay caused by message passing. Co-locating objects and resources they may need such as files, devices or special network links can also reduce the network delay. Furthermore, careful assignment of object replicas can lower the overall network delay caused by remote access to those replicas from other objects. The evaluation of each object deployment within the search space requires estimating the “communicational delays”, as a result of remote communication among objects, and the “computational delays”, as a result of sharing the same resources by deployed objects(i.e. resource contentions), corresponding to that deployment. In the field of deployment optimization, estimating these delays using only resource capacities ( e.g. CPU Ins/sec or link bandwidth) has been research in many previous works. The main contribution of this paper is to incorporate the software execution load statistics in evaluating the communicational and computational delays of a given deployment during the optimization process. To achieve this, the value of some metrics such as object utilization, number of object or thread instances and mean response times of object invocations are required and obtained by simulating the intended use-case scenarios before applying the deployment algorithm. The simulation is performed by transforming each use-case sequence diagram, annotated with performance information according to the UML Profile for Schedulability, Performance and Time (SPT profile) [5], into a set of Finite State Processes (FSP) [4] and then executing them by means of a discrete event simulator tool. The proposed optimization algorithm is a hill-climbing algorithm that not only considers the processing and bandwidth capacities of network resources when evaluating an object deployment, but also takes into account other aspects affecting the performance such as the possibility of concurrent execution of objects and threads.
2 Related Works Most SPE researches are focused on analysis of an existing performance model and there are few works that fall in the category of performance optimization of software. In [6] a Response Surface Method (RSM) for optimizing software performance indicators in presence of simulation results is proposed and its usefulness for minimizing total cost in a capacity planning problem is evaluated. However the usefulness of this method for complex optimization methods such as deployment problem has not been researched. In the field of deployment optimization, which is the main focus of this paper, there are some previous works: [7] is one of the earliest works in the field of deployment optimization in which a static task allocation method is proposed. However, they have not studied the effect of incorporating the software execution load statistics in the allocation procedure. In [8] a comparison between two deployment optimization methods: Binary Integer Programming and Genetic algorithm is presented. While reaching an optimal deployment, in this approach only the number of messages between components is minimized. In [9] a Linear Integer Programming-based method is used to find the optimal deployment of a set of components over computing resources. In this approach the main objective is to minimizing the computing and network delays. In [10] a deployment strategy for software objects based on placing the most communicating objects in the same machine is presented. To achieve this, an object graph construction algorithm and a partitioning policy for this graph are presented. In [11] the optimization of
The Application of FSP Models in Automatic Optimization of Software Deployment
45
architectural models for multiple quality criteria using evolutionary methods is presented. Here, data transmission reliability and communication overhead are the only quality criteria considered. However, our work considers the “computational delays” in addition to the communicational overheads to achieve the best performance. In [12] a multi-criteria genetic algorithm for optimizing the software architecture for performance, cost and reliability is presented. In this work, the search for the optimal architecture is performed considering a number of degrees of freedom. It means that the architecture can change only along directions that preserve the functionality (e.g. changing the deployment or choosing among a set of alternative components with the same interface). In this work for evaluating the performance of each solution (architecture) within the population, the genetic algorithm generates an LQN instance from the architecture model and analyzes it using a solver. This is very time consuming method and cannot be applied to a large software with many components. However in our work the evaluation of each deployment is performed using a fast performance function (see section 4) based on previous simulation statistics. In overall, previous works in the field of automatic deployment is dedicated to the placement of software components over a set of computing nodes without considering the effect of execution load statistics when computing the communicational and computational delays for a deployment. In contrast, in this paper a methodology for deployment optimization of a set of objects, collaborating to realize some performance-constrained use-cases, using previous simulation records is presented. Minimizing the network delay between components, which is the focus of many previous works, is crucial however is not sufficient. Imagine that you put two components c1 and c2 on the same node N to reduce the network delay in between, however by doing this you might have increased the overall response time due to limited capacity of node N.
3 Deployment Methodology The main objective of many existing deployment optimization algorithms is to distribute the “execution load” of the software over available resources such that better performance is achieved. However in these algorithms the “execution load” of a software is estimated poorly (for example in [9] the number of instructions in each component or task is assumed as its load). We believe that the “execution load” for a software should be estimated by runtime indicators rather than static ones. Since we are solving the deployment problem at the early stages of software development and the only thing we have at this stage is the software models (not code), a simulation method has been chosen to predict the “execution load” of software. We have estimated this load for a use-case scenario based on these runtime indicators: (1) The population of objects or threads, (2) The mean response time of active objects and (3) the average utilization of objects. These three indicators are measured by simulating use-case scenarios for different input rates. Since the three indicators mentioned above may have different values for different input workloads to the software, it is concluded that the “execution load” of a software changes for different input workloads. Therefore it is reasonable to find an optimal deployment for each input workload separately (see the experimental results). Figure 1 gives an overview of the deployment methodology presented in this paper.
46
O. Bushehrian
& , *) +
=
/' () J
!"
/':
/:*'+
)
Fig. 1. The deployment methodology
At the first step, corresponding to each object within the use-case sequence diagrams a Finite State Process (FSP) is created. Creating FSP’s is a mechanical task and can be performed by means of automated tools such as LTSA [13]. The resulted FSP’s are then composed together and used to perform the simulation (based on the discrete-event simulation model). The simulation results include measured values for metrics such as object utilization, mean response time and object population. These values are good indicators for the software execution load. The next step is to build an xml document called Software Execution Model (or SEM for brevity) for the use-case scenarios. Specifically, the following information is included in SEM: (1) Scenario Call Flow Graph: The flow of method calls among objects within a scenario. For each invocation Ii in the scenario, the set of all blocking and non-blocking calls within Ii, the synchronization point of Ii and the set of all concurrent invocations with Ii are also kept. (2) Scenario execution Loads: which are the measured values for metrics as object utilization, mean response time and object population. (3) Resource Capacities: including processing capacities and link bandwidths. SEM can be generated automatically from the use-case sequence diagrams. In the last step, a hillclimbing algorithm seeks the optimal deployment of software objects regarding the information contained in SEM. The objective function of this algorithm is explained in the next section. The simulation is performed by creating a set of Finite State Processes each corresponding to an object in the use-case sequence diagram. For instance the sequence diagram shown in Figure 2 is modeled by the following three communicating processes: USER=(request->next->USER). CLIENT=(request->delegate->reply->prepareResults->CLIENT). SERVER=(delegate->do->reply->SERVER).
The actions in the above processes, e.g. request, delegate, reply, prepareResults and do are encoding the messages specified in the sequence diagram. In addition, the time delays specified in the sequence diagram using SPT annotations, are translated into time delays in the corresponding FSP processes using shorthand by which an anonymous clock is set to run down for an exponentially-distributed time with mean x mili-seconds. The resulting FSP,s then were simulated by means of LTSA.
The Application of FSP Models in Automatic Optimization of Software Deployment
47
% & ! " ! '$!
! ! " !#$!
! ! " !#$!
Fig. 2. Sample sequence diagram annotated with performance information
4 Performance Function In order to find the optimal object deployment from the performance view point, the heuristic search algorithm (mentioned above) evaluates each possible deployment d within the search space using a Performance Function ,named Θ. Assuming that Θi(d) be the estimated execution time of invocation Ii (an arbitrary invocation within the scenario of use-case u), Θs(d) will be the estimated execution time of use-case u for which Is is the starting invocation. The optimal object deployment corresponding to a software with n use-cases u1,u2…un is the one for which the weighted average f1×Θs1(d)+f2×Θs2(d)… + fn×Θsn(d) is minimal where ∑fi=1 and Is1 , Is2 ,..,Isn are the starting invocations of use-cases u1,u2,…,un respectively. The coefficients f1,f2,…,fn indicate the relative significance of use-cases u1,u2,..,un from the performance view point(defined by the software architect). The performance function Θi(d) is a recursive function that estimates the response time of invocation Ii when the object deployment is d. Assume an invocation Ii which is called within the body of invocation Is. The estimated execution time of Is for a given deployment d is calculated as: Θs(d)= Ts + Θi(d) where Ts is the estimated execution time of all statements within Is except method calls. Depending on deployment d, the caller and callee objects of Ii may reside on the same or different nodes. In the latter case, Invocation Ii is a remote invocation and some communicational delay should be added to the sum: Θs(d)= Ts + Θi(d) + αi where αi is the communicational delay corresponding to the remote invocation Ii. In the former case the communicational delay is zero. The two cases can be combined in one relation: Θs(d)= Ts + Θi(d) + µ i,d ×αi .
(1)
48
O. Bushehrian
Where µ i,d is a binary decision variable which is set by the deployment algorithm regarding deployment d. If the caller and callee of Ii in d are located on the same node µ i,d is set to 0, otherwise it is set 1. Generally, the method calls inside invocation Is are categorized into blocking and non-blocking. For each blocking invocation Ii within Is, the value of Θi(d) is added to the total execution time of Is. For each non-blocking invocation Ij within Is, there is a synchronization point within Is at which the results of Ij are received by Is(see Figure 3). The amount of time that Is should wait at the synchronization point of Ij to receive the invocation results, is added to the total execution time of Is. This wait-for-result delay corresponding to the non-blocking invocation Ij is denoted by Sj . As shown in Figure 3, in a non-blocking invocation, the caller continues executing until reaching the synchronization point. Assuming that Lj(d) be the estimated execution time of those statements within Is located between the initiation point and the synchronization point of Ij regarding deployment d (as shown in Figure 3), the wait-for-result delay Sj is simply calculated by subtracting Lj(d) from the total turnaround time of Ij: Sj(d)=max(Θj(d)+ µ j,d×αj - Lj(d) ,0) .
(2)
Where αj is the communicational delay of Ij when it is a remote invocation (i.e. µ j,d=1). Note that computing the value of Lj(d) may require that the estimated execution time of other invocations (or synchronization points) located between the initiation point(Point A in Figure 3) and the synchronization point of Ij(Point B in Figure 3), be computed recursively.
1"*+
"*+
Fig. 3. A non-blocking invocation and its synchronization point
In addition to the communicational delay corresponding to a remote invocation (blocking or non-blocking), another delay, called computational delay, is also important when evaluating a given deployment d. The Computational delay of an invocation Ii is defined as the delay in execution of Ii due to sharing the machine on which Ii is executing with other concurrent invocations. Assume that Ti be the estimated execution time of statements within Ii when the whole processor is dedicated to it, the computational delay compi,d of Ii regarding the deployment d is defined as follows: #
(3)
The Application of FSP Models in Automatic Optimization of Software Deployment
49
In the above relation, the value of Ti is multiplied by factor Hi,d to magnify the estimated execution time of invocation Ii according to the utilization of the machine on which Ii executes regarding deployment d. If the total utilizations of the objects located on this machine exceeds the machine capacity (denominator of the fraction in relation 4) the value of Hi,d become greater than one, otherwise it equals 1: , 1, ∞ : (4) ∑ ,
,
,
Ω
,
,
.
The description of symbols used in this relation and the subsequent relations are summarized in Table 1. Suppose Is be the starting invocation of use-case u and the set of all invocations within Is is partitioned in two blocking and non-blocking sets. Relation (1) for computing Θs(d) is generalized as follows: Θs(d)=Ts+ comps,d+ ∑
Θ d
μ,
α
∑
(5) μ,
α
S d
.
Table 1. Descriptions corresponding to symbols and parameters used in equations E ) =
E ! E!3CC !"# ! ! * + !" # ! # !
!" * +!"
M
$! !#M, C , ! % *3 + !"* + !" : ' #
6% %! ! : E*-9 +
: : 6% :E
In relation (5), Ts is the estimated execution time of all statements within Is except method calls. When there is no method call within Is, the value of Ts is equal to RTs which is obtained from the simulation results( see Table 1). In relation (5), αi denotes the communicational delay for invocation Ii and is included in the total execution time
50
O. Bushehrian
when the value of µ i,d is 1, which means the invocation Ii is a remote invocation according to deployment d. This communicational delay is defined as the amount of time required for transmitting parameter values and receiving the return values of Ii over the network link which connects the sender and the receiver node of Ii ( denotes the sender and denotes the receiver node of Ii). To calculate this delay, and first consider that the amount of bandwidth between machines (denoted by ) is shared among all invocations that may use this , bandwidth concurrent with Ii. Therefore, the available bandwidth for Ii is
,
on condition that the object is the divided by the number of objects located on sender of an invocation concurrent with Ii. Hence, value of αi is calculated as follows: * >
? @ A<=! A
BC "<=! DEF 6 GHIJHIF
GHIKLF " M#
(6)
5 Implementation We have implemented the deployment algorithm discussed in the previous section using a multi-point hill climbing algorithm. In a multi-point hill-climbing algorithm, a set of arbitrary solutions in the search space are selected as the starting points of the hill-climbing search. By starting from each solution, the algorithm attempts to find a better solution by incrementally changing a single element of the solution. If the change produces a better solution it is accepted as the new solution. For each solution si, all the solutions like sk which can be produced by changing a single element of si, are called neighbors of si within the search space. This procedure is repeated until no further improvements can be found. Assuming that by starting from an initial solution si a (near)optimal solution pi is achieved, the best solution among p1..,pn is picked as the optimal solution. In this approach since more than one path is tried, the larger portion of the search space will be examined. The objective of the hill-climbing algorithm is to find a deployment d (which is a solution in the search space) for which the lowest response time is resulted. The response time corresponding to each deployment d is computed according to relation (5). Within the search space, each object deployment d is represented by a solution string. The ith place in string p holds the machine number on which the ith object is deployed. Assume that we want to find the optimal deployment of six objects: o1…o6 , belonging to use-case u, over four machines m1..m4. Each possible deployment of these objects is represented by a string of six numbers each in the range of 1 to 4. A sample deployment and its corresponding string are presented in Figure 4. The hill Climbing algorithm starts with a population of randomly generated strings D={d1,d2,d3…,dk}. For each string di in the population, the algorithm repeatedly finds a neighbor solution dk, such that Θs(dk) is less than Θs(di). Each neighbor of solution di is produced by replacing one of the machine identifiers in di string with another machine identifier. In Figure 4 an object deployment corresponding to solution string 1,1,1,2,3,4 and three neighbors of this solution are shown. As explained earlier, the input to our deployment algorithm is an XML file containing: (1) Scenario Call Flow Graph: The flow of method calls among objects within a scenario. For each invocation Ii in the scenario, the set of all
The Application of FSP Models in Automatic Optimization of Software Deployment
51
blocking and non-blocking calls within Ii, the synchronization point of Ii and the set of all concurrent invocations with Ii are also kept. (2) Scenario execution Loads and (3) Resource Capacities.
6 Case Study: An Accounting Web Application This is a real world web application used in ISP companies by which a customer can purchase an account for accessing Internet. The main success scenario of the Purchase-Account use-case is as follows: : 5 : 3
7
5
3
: 6 ;
6
.333567 ! .353567 ! .335567 ! .733567
< : 7
Fig. 4. A deployment of six objects over four machines
(1) The customer navigates to the purchase page. (2) The system shows available Internet packages. (3) The customer selects a package and confirms. (4) The system navigates to the bank payment page. (5) The customer pays the package price. (6) The system verifies the payment and creates an account in AAA software and submits the created account to the customer. In this case study, not only the purchase-account requests to the web application is often high, but also the AAA software is very busy due to processing of many authentication requests from different Access Points inside the company network. Our observation showed that without correct deployment of this software over the available resources, many purchase requests to the application fails at step (6) (of the above scenario) due to the overloaded web application. Therefore it is essential to find the optimal deployment for this software over the available computing resources of the company in order to achieve the best performance. In Table 2, the characteristics of computing nodes and their associated resources are presented. The communication diagrams corresponding to the purchase-account and Authenticate use-cases are shown in Figure 5. Note that objects with <
> stereo-type represent system resources and have fixed location as listed in Table 2. We simulated both scenarios as a single concurrent system using LTSA to measure the required metrics(Uo, Po, RTi). The Purchase-Account scenario was simulated with an exponentially distributed input workload with four mean values: 500ms, 1000ms, 1500ms and 2000ms (which are the interval between requests). The input workload for the simulation of Authenticate scenario was also chosen exponentially with mean values: 200ms. Our deployment algorithm found the following deployments corresponding to each input workload(see Figure 6).
52
O. Bushehrian Table 2. The computing nodes and their associated resources Properties C1=200 C2=200 C3=200 C4=200 Bm,n=1000
Node1 Node2 Node3 Node4 Network Links
Associated Resources High speed link to Internet
Sale and Accounting DB
Note that the objective function of the deployment algorithm was to find deployment d for which the value [Θs(d)+ Θs’(d)]/2 is minimal where s and s’ are the scenarios corresponding to the Purchase-Account and Authenticate use-cases. - 2 .1! * ' # 1! *
11 ( ) .) % * 5 1! * /*. ! * 4 * .) 3 12 * .) 6 7" ,* +,
- .)
#
/
( ) % *
'0
+,
Fig. 5. Purchase-Account scenario (left), Authenticate scenario (right)
= E3 $ $ E6 5CCC
E5
E7
=
E3 $ $ E6
3;CC
E5
E7
=
E3
$
E6
$
3CCC
E5
E7
=
E3
E5
$
E6
$
;CC
E7
Fig. 6. The near-optimal deployments corresponding to workloads 2000,1500,1000 and 500 (R denotes Router)
7 Discussion As explained before, for each input workload x to the system a set of simulation data were obtained and subsequently fed into our hill-climbing algorithm to find the nearoptimal deployment dx corresponding to workload x for the intended case-study. It is observed that changes to the input workload resulted in changes to the optimal deployment. For example consider two deployments d2000,d1500 in Figure 6. Recall that both iis and Accounting objects need the high-speed-link R associated with N1. For input workload 2000(low load) iis and Accounting objects are assigned to N1 to access
The Application of FSP Models in Automatic Optimization of Software Deployment
53
R locally (to eliminate any communicational delay to access this resource). However, as the input workload to scenario Purchase-Account increases from 2000 to 1500(the input workload for the Authenticate scenario is assumed to be fixed), the computational delay resulted from assignment of three busy objects to N1 outweighs the communicational delay resulted from accessing R remotely by iis (Hence moving iis to N2 in deployment d1500). Subsequently, by increasing the input workload, the algorithm makes trade-offs between communicational and computational delays to find the best deployment. To show that dx is the near-optimal deployment corresponding to workload value x a simulation approach was chosen. An FSP model for deployment dx was generated. This model then was simulated using the LTSA tool and the resulting response times of this model were recorded for different input workloads. The simulation results for the case-study are presented in Figure 7. It is observed that when the input workload to the system is x, the deployment dx, found by our algorithm using the simulation results corresponding to x, outperforms (i.e. results in lower system response time) any other deployment dy found for input workload y (x≠y). '!!!
&!!! %!!! , )#!!!
$!!!
, )"&!! #!!!
, )"!!! , )&!!
"!!! ! )*&!!+
)*"!!!+
)*"&!!+
)*#!!!+
)* )"+
)* )#+
Fig. 7. The system response times corresponding to each deployment for different input workloads
8 Conclusion The main objective of a deployment optimization algorithm is to distribute the “execution load” of the software over available resources such that better performance is achieved. We believe that the “execution load” for a software should be estimated by runtime indicators rather than static ones. Moreover, the “execution load” is often changed by variations of input workload to the system. Therefore, the search for different deployments related to different input-workloads is reasonable. According to the results presented in Figure 7, it is concluded that better deployments (from the performance viewpoint) can be achieved by incorporating previous simulation statistics into the deployment algorithm. As the future work, we are enhancing our deployment algorithm to find the best deployment in presence of multiple replicas of objects.
54
O. Bushehrian
References 1. Woodside, M., Franks, G., Petriu, D.: The Future of Software Performance Engineering. In: Future of Software Engineering (FOSE 2007), pp. 171–187. IEEE Press, Minneapolis (2007) 2. Balsamo, S., Dimarco, A., Inverardi, P., Simeoni, A.: Model-Based Performance Prediction in Software Development. J. IEEE Trans. on Soft. Eng. 30(1), 295–310 (2004) 3. Balsamo, S., Marzolla, M.: Performance Evaluation of UML Software Architectures with Multi-Class Queuing Network Models. In: 5th Int. workshop on Software and Performance, pp. 37–42. ACM, Palma (2005) 4. Bennett, A.J., Field, A.J.: Performance Engineering with the UML Profile for Schedulability, Performance and Time: a Case-Study. In: 12th Annual Int. Symposium on Modeling, Analysis and Simulation of Computer and Telecommunication Systems, pp. 67–75. IEEE Press, Los Alamitos (2004) 5. Object Management Group, 6. http://www.omg.org/technology/documents/profile_catalog.htm 7. Chih-Chieh, H., Devetsikiotis, M.: An Automatic Framework for Efficient Software Performance Evaluation and Optimization. In: 40th Annual Simulation Symposium, pp. 99–105. IEEE Press, Norfolk (2007) 8. Woodside, M., Monforton, G.: Fast Allocation of Processes in Distributed and Parallel Systems. J. IEEE Trans. on Parallel and Distributed Sys. 4(2), 164–174 (1993) 9. Bastarrica, M., Caballero, R., Demurjian, A., Shvartsman, A.: Two Optimization Techniques for Component-Based Systems Deployment. In: 13th Int. Conference on Software Eng. and Knowledge Eng. p. 153–162. Buenos Aires, Argentina (2001) 10. Boone, B., Truck, F., Dhoedt, B.: Automated Deployment of Distributed Software Components with Fault Tolerance Guarantees. In: 6th Int. Conference on Software Engineering Research, Management and Applications, pp. 21–27. IEEE Press, Parague (2008) 11. Deb, D., Fuad, M., Oudshoom, M.J.: Towards Autonomic Distribution of Existing ObjectOriented Programs. In: Conference on Autonomic and Autonomous Systems, pp. 17–23. IEEE Press, Silicon (2006) 12. Aleti, A., Bjornander, S., Grunske, L., Meedeniya, I.: Archeopterix: An Extendable Tool for Architecture Optimization of AADL Models. In: International Workshop on Modelbased Methodologies for Pervasive and Embeded Software, pp. 61–71. IEEE Press, Vancouver (2009) 13. Martens, A., Koziolek, H., Becker, S., Reussner, R.: Automatically Improve Software Architecture Models for Performance, Reliability and Cost Using Evolutionary Algorithms. In: The First Joint WOSP/SIPEW International Conference on Performance engineering, San Jose, CA (2010) 14. Ayles, T., Field, A.J., Magee, J.N.: Adding Performance Evaluation to the LTSA Tool. In: Kemper, P., Sanders, W.H. (eds.) TOOLS 2003. LNCS, vol. 2794, pp. 291–307. Springer, Heidelberg (2003)
Model-Based Decision Framework for Autonomous Application Migration Anders Nickelsen1 , Rasmus L. Olsen1 , and Hans-Peter Schwefel1,2 1
Dept. of Electronic Systems, Aalborg University, Denmark {an,rlo,hps}@es.aau.dk 2 FTW, Vienna, Austria [email protected]
Abstract. A dynamically changing state of the run-time environment impacts the performance of networked applications and furthermore influences the user-perceived quality of the applications. By migrating the application between the user’s devices that give different user experiences, a good overall user experience can be maintained, without loosing the application session. It is non-trivial for a system to automatically choose the best device for migration. The choice must maximize the user experience quality and take into account that a migration delays the user’s work-flow and even may fail. Moreover, the environment state is not directly observable, and needs to be estimated which leads to inaccuracy. We model the automatic migration trigger as a stochastic optimization problem and we propose to use a hidden Markov model combined with a Markov Decision Process (MDP) to solve the problem. The solution generates policies to choose target device for migration that gives the optimal user experience. We analyse these policies in simulation experiments and derive conclusions on which scenarios the model-based approach performs better than a greedy approach, also when considering inaccurate state estimation. Keywords: migratory applications; configuration choice; Markov decision processes; quality-of-experience.
1
Introduction
A dynamically changing state of the run-time environment impacts the performance of networked applications and furthermore influences the user-perceived quality of the applications. For example, if excessive packet loss on a wireless connection or in a network router reduces the end-to-end throughput, a video streaming application may experience glitches or outage periods. In addition, users have access to many different types of devices with network access that can run the same applications. Therefore, we investigate methods to move active application instances between devices to maintain a good user experience in scenarios with dynamic networks. The process of moving the application is called migration [1]. We consider migratory applications that can be moved between the user’s devices. We define a configuration as the combination of an application K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 55–69, 2011. c Springer-Verlag Berlin Heidelberg 2011
56
A. Nickelsen, R.L. Olsen, and H.-P. Schwefel
running on a device and the settings of the device (CPU, network interface, display resolution, etc.). A configuration gives the user a certain experience quality, influenced by the state of the environment. A migratory application has several available configurations and the objective of the migration is to change the active configuration. Migration is performed without restart of the application session, allowing the user to continue the work-flow after migration. Migratory applications run on top of a migration middleware (such as described in [2]). The purpose of the middleware is to trigger migration automatically and orchestrate the migration procedure. The orchestration procedure takes time which interrupts the user’s work-flow and degrades the experience quality. The duration of the migration procedure depends on the migration type, which can be strong or weak. In a strong migration both application code and state is transferred, where in a weak migration only parts of the application stack are transferred [1]. We consider the migration procedure as atomic and our models are independent of migration type. Different types only produce different model parameters values in terms of migration delay distribution and failure probability. An automatic migration trigger must balance the trade-off between configurations with high experience quality and the reduced experience quality caused by the orchestration procedure. The triggers are based on the environment state. However, the true state is not always observable and must be estimated from observable parameters. If state estimation is inaccurate, wrong migrations are triggered, which interrupt the user and may end up in worse configurations. To balance the trade-off, we treat the automatic trigger as a stochastic optimization problem. We model the environment behavior, the state estimation, the application experience behavior and the migration procedure as stochastic processes. The stochastic models are used to generate policies that specify in which state to trigger migration and which configuration to migrate to. We evaluate two different policy generation approaches: 1) a greedy approach that optimizes the user experience in the next evaluation step and 2) a Markov Decision Process (MDP) approach which can account for the effect of future decisions and optimizes for the long-term user experience. We design an enforcement framework around the policies with functions to observe the environment, estimate the environment state and trigger and perform migration. Based on a simulated full migration scenario, we evaluate the effect on the experience quality of: 1) the estimation approach, 2) the policy generation approach and 3) the environment behavior. Through result analysis we illustrate the usefulness of including future decisions and the impact of inaccurate environment state estimation. The concept of migration upon environment state changes is increasingly important. With the rise of dynamic adaptive systems (component-based systems which are able to change their composition, [3,4,5,6,7]), applications may be deployed in environments for which they were not originally designed. The application domain can be expanded if they have underlying support to choose the optimal configuration for such unknown environments. The optimal configuration is also relevant in dynamic applications that interact with users [8] since the success of these applications depends on the user’s experience. Previous
Model-Based Decision Framework for Autonomous Application Migration
57
research has shown that model-based policy generation approaches allow for robust decisions; video stream application stream decoding [9], placement policy of processing tasks in virtual environments [10] and QoS management policies [11]. The quality of the user’s experience is modeled by reward functions that map physical properties into experience quality. Methods to derive reward functions are covered in detail in existing literature. For instance mapping network properties into quality of multi-media applications can be studied in [12,13,14] and is not treated further here. The rest of the paper is structured as follows. In section 2, we present background details of the migration process. In section 3, we describe a model of the migratory system to base the decision framework design on, which is presented in section 4. Then, in section 5, we describe the analysis of the dependencies between the framework parameters and the performance of the policy generation approaches. The paper is concluded in section 6.
2
Background on the Migration Process
The events of a migration process between two devices are illustrated in Figure 1. The migration framework is realized as a middleware that contains a decision framework that monitors the state of the environment and automatically determines the best configuration to use (see [2] for more details). If the chosen configuration is not equal to the one currently applied, a migration is triggered. The application instance on the source device is paused and a state object, with sufficient information to resume the application elsewhere, is extracted and downloaded onto a central migration server. As the download may be performed over any available network connection, the performance of the network connection affects the duration of the download, and hence, the duration of the migration. Also, any faults that can occur on the network connection may cause the download or migration signaling to fail. After the state is downloaded, a new application instance is initialized on the target device. The state object is then uploaded to the target device and inserted into the new application instance. To complete migration, the new instance is resumed in the original state.
3
Model of the Migratory Framework
A model of the migratory framework is illustrated in Figure 2. We specify the environment as a set of N states, S = {s1 , ..., sN }. The states are abstractions of the environment parameters, which are considered relevant if they impact the performance of the application or the migration process. We model the behavior of the environment as a Markov model. P (si , sj ) denotes the probability of a transition from state si at time t to state sj at time t + 1. The next configuration of the application is decided periodically by the migration middleware. A set of M configurations, C = {c1 , ..., cM }, constitutes the set of possible next configurations. The middleware has to decide which configuration c to change to from the current
58
A. Nickelsen, R.L. Olsen, and H.-P. Schwefel
Migration trigger
Migration success
Migration delay (D)
Configuration
Application Device 1 start app use app
use app
Application Device 2
c’
service interrupted during migration
Migration framework
Failed migration delay (Dfail)
c Migration failure (probability pf)
register application monitor environment
trigger migration to Device 2 pause application download state initialise application upload state resume application
Fig. 1. Migration process events
estimated state
Migration
Interruption
User
c
st-i
Environment state
t-i
st+D
^st0
st+i
st0
true state
t0
t+i ...
t+D
random migration delay
Fig. 2. Time-line migration process
configuration c. If c = c , a migration c → c , is attempted. The migration duration in time-units, D, is random and characterized by a distribution fD,c→c (τ ) that depends on the size of the state object that needs to be transferred and the environment state. If the migration is successful, the application is in configuration c after time D. If the migration fails, with probability pf , the duration until the system returns to configuration c may be characterized by a different distribution ff ail,c→c (τ ). For simplicity, we assume fD,c→c (τ ) = ff ail,c→c (τ ) in this paper. Furthermore, the delay may be dependent on the environment state, however we consider them independent in this work.
4
Design of the Decision Framework
The decision framework consists of several components required to generate and enforce decisions. Figure 3 shows the components of the framework. The components are active at different times in the migration process. Decision policies are generated offline in the policy generation component. A decision policy, π(c, s), specifies which configuration to choose when in configuration c and in state s. Two approaches for policy generation are evaluated in this work. The first approach is greedy and generates policies that optimize for the best immediate experience. We call this approach instantaneous. The second approach is based on a Markov Decision process which generated policies that optimize for the best long-term average experience. Both approaches assume that the state of the environment is known when the decision is made. However, this is not always possible since states that are not directly observable may affect application performance. In such cases the true environment state is hidden to the enforcement component, and in order to enforce decisions from a policy, the true state must be estimated based on parameters that can be observed. When the system is online, the environment state, sˆ(t), is estimated in the state estimation component based on observations made by the observation component. The estimated state is used to enforce decisions from policies in the policy enforcement component.
Model-Based Decision Framework for Autonomous Application Migration
59
Reward model
Environment model
Prediction
Policy generation INS
MDP
offline online State estimation Observations
Threshold
Policy enforcement
HMM
Fig. 3. Overview of the decision framework in the migration middleware
4.1
State Estimation and Prediction
To enforce a policy online, the current application configuration c and the estimated environment state sˆ(t) must be known. The observable parameters are sampled at periodic intervals during run-time and the most likely environment state is estimated. We investigate how two different estimation methods perform in the decision framework, namely a threshold approach (TH) and a hidden Markov Model (HMM) approach [15]. The two methods estimate the most likely environment state sˆ based on observable parameters. The TH method assumes a direct mapping between observations and environment state. The HMM method models the environment as a Markov model and assumes a stochastic relation between the true state and the observed parameters. During run-time, the Forward-Backward algorithm is used to calculate the probability distribution over the set of states given the sequence of previous and current observations. By using a Marginal Posterior Mode (MPM) estimate [16], the most likely state of the environment can be calculated. Transition probabilities of the HMM are the same as the environment model P . Observation probability distributions, P (obs|S), depend on how the environment affects the observable parameters. Concrete values for both matrices are specified in the simulation model. To predict the most likely estimated state at time t + D (after migration), the behavior of the Markov model is used, such that the predicted state sˆ(t + D) is set equal to the most likely state D steps in the future. This is calculated from argmax ei · P D , where ei is an 1xN vector, where element i is equal to one if si is the most likely system state and the other elements equal zero. 4.2
Reward Model
Reward is defined as a combination of the satisfaction of experiencing a certain application quality and the dissatisfaction of the interruption from migration. Reward of an application configuration in a certain system state is characterized by R(c, s). The dissatisfaction is characterized by two parameters of the migration process; the probability of migration failure, pf and the migration delay, D. These two parameters influence the user experience negatively and can therefore be used to characterize how performing a migration should be penalized. We
60
A. Nickelsen, R.L. Olsen, and H.-P. Schwefel
represent the penalty of waiting during migration, η, as a function of the waiting time η(D). The penalty function can have different shapes (linear, logarithmic, quadratic, exponential) representing different user dissatisfaction patterns. In our work, we define the function linearly as η(D) = −α · D, where α is a constant and represents the reduction in reward per time-step experienced by the user while waiting on the migration to finish. The linear function is chosen for simplicity, and may be changed to other shapes. 4.3
Instantaneous Policy Generation
The instantaneous (INS) approach chooses the configuration c that generates the highest expected reward for the predicted state estimate after the migration c → c , such that πIN S (c, sˆ(t + D)) = argmax E[r(c, c , sˆ(t + D))]. c ∈C
(1)
The reward expression r(·) represents the reward of migrating from c to c when the predicted state after migration is sˆ(t + D). The expression includes the failure probability and random migration duration as follows. E [r(c, c , sˆ(t + D))] = ∞ [R(c , sˆ(t + τ )) − η(τ )] fD,c→c (τ ) + (1 − pf ) pf
∞
τ =0
[R(c, sˆ(t + τ )) − η(τ )] ff ail,c→c (τ )
τ =0
The INS approach is greedy. It is also conservative, in the sense that it maximizes the reward for the immediate state after migration (positive), but accounts for all migration penalty during migration (negative). 4.4
Markov Decision Process Policy Generation
The Markov Decision Process (MDP) approach can consider the effect of future decisions on the long-term average reward and generate a policy with the decisions that optimize that. An optimal policy, πMDP (c, s), can be calculated offline using the MDP before running the application. We use value iteration with a finite window of 1000 future decisions to find the optimal policy by use of the Bellman equation for dynamic programming. The finite window is applied to enable comparison to the INS approach. The values of the window size was found through experiments and is large enough for the policies to converge, meaning that a larger window will only affect computation time, but not change the policy. See [17] for more details on the MDP framework, dynamic programming and value iteration. The general form of the Markov model used in our decision framework is depicted in Figure 4.a. For each available configuration we assign a reward function
Model-Based Decision Framework for Autonomous Application Migration
61
R(c, s) that maps a reward value to each environment state for a given configuration. There exist different reward functions for the different configurations. In Figure 4.b the scenario of migrating between configurations c → c is depicted. The actions of the MDP map directly to the available configurations, which can be chosen at each time-step. To model the migration process, an intermediate delay state is introduced between the configurations. When the migration is triggered, the system enters the delay state with probability 1. The reward model of the delay state is defined according to η(D), which means that in the linear case of this framework, the reward of the delay state is simply α. In the delay state the migration may be further delayed with probability pd , fail back to c with probability pf · (1 − pd ) or succeed to c with probability (1 − pf ) · (1 − pd ). The definition of pd is based on the migration delay D. When D is geometrically 1 ¯ is the mean migration delay. distributed then pd = 1 − D+1 , where D ¯
s sj-1
sj
sj+1
ci-1
R(ci-1, s)
ci
R(ci, s) R(ci+1, s)
ci+1
c fail success
delay
c’
(a)
(b)
Fig. 4. Model of the migratory system. (a) is the general evolution where the reward (R) only depends on the environment if the configuration is fixed. (b) shows how a migration c → c may change the active configuration and thereby the reward function if successful.
5
Case Study and Numerical Results
We evaluate and compare the performance of the different estimation methods and generation approaches by simulating the migration framework. The MDP is solved using dynamic programming and the scenario is simulated (instaed of solved analytically) to capture the behavior of the entire migration platform and application quality. First, we systematically analyse the differences between two policy generation methods to learn where they are different, and how the difference impacts the application quality. Next, we evaluate the accuracy of the two state estimations methods, including the ideal estimator as reference. Finally, we analyse two example scenarios of the entire framework to learn how the different parameters of the full framework impact the application quality. We evaluate three state estimation methods combined with the two policy generation methods in two different scenarios, which reflect two different network conditions.
62
A. Nickelsen, R.L. Olsen, and H.-P. Schwefel
5.1
Simulation Model
The environment is modeled as a network with two states, representing a normal and a congested network, S = {N, C}. P, the transition behavior within S, is specified by p, the probability of a transition from N to N, and q, the probability of the transition from C to C, as specified in Table 1. The application is a video streaming application with two available configurations on two difference devices; D1) high definition on large display device, and D2) standard definition on mobile device with smaller screen), C = {D1, D2}. The reward values of the two configurations, R, are listed in Table 1. These values express that the user gets a higher perceived quality with increasing resolution on the large display device (i.e. R=4 for (c,s)=(1,1) compared to R=3 for (c,s)=(2,1)). Moreover, the impact of packet loss is larger when c = D1 than c = D2 because the higher resolution requires more available bandwidth on the large display. As migration penalty values, we use pf = 0.1 and use a geometrically distributed delay D with parameter pd = 0.95. This characterizes a mean migration de¯ = 20). lay of 2 seconds, when time-unit per time-step is 100ms (equal to D The failure probability and delay mean are sampled from experimental work on migration prototypes, described in detail in [18]. For the dissatisfaction function η(D) = −α · D, we use α = 0.01, which has been determined a reasonable value through experiments, as it depends on a combination of the scale of the rewards and the mean delay. The parameter values are summarized in Table 1. For network observations we use packet loss ratio in both scenarios with two possible states (low, high), representing measurable packet loss in a congestionprone network, obs = {L, H}. The probability distributions of the observations in each network states, b, are listed in Table 1. The distributions reflect the situation where high packet loss is primarily observed when the network is congested. This would be the case when buffers in a bottleneck router overload and packets are dropped consequently, but the network otherwise is stable. We simulated 30 runs of the network model in 10000 steps and obtained sequences of true network states s(t), observations from the threshold estimator and estimated network states sˆ(t) from the HMM estimator.
Table 1. Model parameters of the different components used in the evaluation block environment
description name value transition probabilities p,q {0.01, ..., 0.99} 0.9 0.1 estimation observation matrix b 0.3 0.7 41 reward R(c,s) 32 migration model waiting penalty α 0.01 ¯ mean delay D 20 failure probability pf 0.1 MDP window size w 1000
Model-Based Decision Framework for Autonomous Application Migration
5.2
63
Generation Approach Impact on Generated Policies
To understand the differences between the INS and the MDP generation approaches, we analyse which policies they generate under equal conditions. We use the full parameter spectrum of the environment states, defined by p and q in P (cf. Table 1), since it represents the scope of environment parameters of the example that characterize external, uncontrollable network state behavior. These properties are relevant to investigate as they cannot be tuned for better performance. We use a forward prediction step in the INS approach for the comparison, to be able to use p and q in both approaches. Figure 5 shows the generated policies (z-values) over the full spectrum of p and q for both approaches ¯ = 0, pf = 0). There exist many regions in the in the case of ideal migration (D parameter space where the policies are not equal. For the INS (Figure 5, top), the regions are divided into four quadrants at p = 0.5 and q = 0.5. At the upper left (z=16) and lower right (z=1) quadrants, the policies specify to go and stay in D2 or D1 configurations, respectively, indifferent of the system state. To the lower left (z=11), the policy specifies to choose D1 configuration when in congested network state and D2 when in normal network state. The upper right region (z=6) chooses opposite to the lower left. For the MDP (Figure 5, lower), the regions are separated by the line p = q. Below this line (p > q), the policy specifies to either to change to D1 always (z=1) or in some cases (z=2) to stay in D2 when in congested network state. Above the line (p < q), several different policies are used that will eventually all change to D2 always (z=8,12,16). In the small region (p > 0.9 and q > 0.9) the MDP behaves similar to the INS by choosing D1 in normal network state and D2 in congested network state (z=6). The differences in the overall policy distributions are due to the way the two policy generation methods optimize their policies. Even though they both optimize for utility, the INS method only regards 1 future decision, whereas the MDP regards 1000. The different distributions show that it has an impact on the policy whether the future decisions are considered. Figure 6 shows the policies over the full spectrum of p and q for both ap¯ = 20, pf = 0.1). The INS policy proaches in the case of non-ideal migration (D distribution clearly changes compared to ideal migration. Instead of 4 regions, 9 regions exist, with the original 4 regions still existing though smaller. In a squareformed region in the center, a new policy is seen (z=4), which is the policy that chooses to stay in the current/initial configuration at all times. The additional 4 new policies between each pair of former quadrants are combinations of the original policy pairs. For example, this means that the policy in the middle lowest square (z=3) combines choosing D1 always (the policy to the right, z=1) and choosing D2 in normal network state (the policy to the left, z=11) in the way that it chooses D1 always except if in D2 and normal network state. The MDP policy distribution is very similar to the non-ideal case, except that the small region upper right is gone and there is a new region around p = q, that contains the same policy as the center square (z=4) in the INS figure, namely not to change configuration when network state changes. The no-change policy (z=6)
64
A. Nickelsen, R.L. Olsen, and H.-P. Schwefel INS (with prediction), a=0, μ
=0, pf=0
INS (with prediction), a=0.01, μdelay=20, pf=0.1
delay
1
16
0.9
0.9
12
0.8
0.8 X: 0.21 Y: 0.77 Z: 16
0.7 0.6
X: 0.73 Y: 0.77 Z: 6
8
X: 0.69 Y: 0.29 Z: 1
6
q
0.3 0.2
X: 0.47 Y: 0.89 Z: 8
X: 0.13 Y: 0.45 Z: 12
X: 0.47 Y: 0.45 Z: 4
X: 0.87 Y: 0.45 Z: 2
X: 0.13 Y: 0.11 Z: 11
X: 0.47 Y: 0.11 Z: 3
X: 0.87 Y: 0.11 Z: 1
14 12
0.5
10 8
0.4 6
0.3
4
0.2
0.1 0 0
X: 0.13 Y: 0.89 Z: 16
0.7
q
X: 0.21 Y: 0.31 Z: 11
0.4
X: 0.87 Y: 0.75 Z: 6
10 0.6
0.5
16
1
14
2
4
0.1
0.2
0.4
0.6
0.8
2
1
p
0 0
0.2
0.4
0.6
0.8
1
p
MDP, a=0, μ
MDP, a=0.01, μdelay=20, pf=0.1
=0, pf=0
delay
1 0.9 0.8 0.7
X: 0.19 Y: 0.87 Z: 16
X: 0.57 Y: 0.85 Z: 8
0.2
0.4
0.6
0.8
q
10 8
X: 0.09 Y: 0.49 Z: 12
0.3
0.1
4
0.2
2
0.1
1
p
Fig. 5. Policies generated by INS (top) and MDP (bottom) approaches for different parameter settings, ideal migration
12
0.5
6
0.2
0 0
0.6
0.4
X: 0.71 Y: 0.41 Z: 1
X: 0.23 Y: 0.77 Z: 16
0.7
q
8 X: 0.39 Y: 0.19 Z: 2
X: 0.59 Y: 0.87 Z: 8
0.8
12 10
X: 0.13 Y: 0.45 Z: 12
14
14
0.5
0.3
16
0.9
X: 0.93 Y: 0.93 Z: 6
0.6
0.4
1
16
0 0
X: 0.23 Y: 0.23 Z: 4 0.2
X: 0.71 Y: 0.39 Z: 1
X: 0.41 Y: 0.15 Z: 2
6 4 2
0.4
0.6
0.8
1
p
Fig. 6. Policies generated by INS (top) and MDP (bottom) approaches for different parameter settings, non-ideal migration
is found in both INS and MDP distributions when the migration is non-ideal which can be explained by the added probability of failure and long migration delay, which decreases the expected average utility that both methods optimize for. In the border-line regions of both approaches, a higher penalty means a higher probability of decreased utility when migrating, and as a consequence, migration is not chosen in the specific cases. 5.3
Generation Approach Impact on Application Quality
To understand the impact on the quality of the different policies, we simulated runs of the decision framework using all policies from both approaches in the entire parameter space, for ideal and non-ideal migration respectively. For each approach we calculated the average utility in each simulation with a specific policy, and calculated means over the repetitions. We repeated simulations to obtain significant differences within 95% confidence intervals. In these simulations we used an ideal state estimator. The differences in mean average quality between the approaches at each point (p, q) are shown in Figure 7 for ideal migration and in Figure 8 for non-ideal migration. Black means no difference (because INS and MDP policies are the same) and the brighter the tone, the larger the difference.
Model-Based Decision Framework for Autonomous Application Migration
u
mean,MDP
−u
mean,INS
, α=0, D
mean
=0, p =0
u
f
3
1
1
0.9
mean,MDP
−u
mean,INS
, α=0.01, D
mean
=20, p =0.1 f
3
0.9 2.5
2.5
0.8
0.8
0.7
0.7
2
2 0.6
1.5
0.5 0.4
q
q
0.6
0.5
1.5
0.4 1
1
0.3
0.3
0.2
0.2 0.5
0.1 0 0
65
0.5 0.1
0.2
0.4
0.6
0.8
1
0
p
0 0
0.2
0.4
0.6
0.8
1
0
p
Fig. 7. Average utility difference between Fig. 8. Average utility difference between INS and MDP approaches for different set- INS and MDP approaches for different settings of p and q, with ideal migration tings of p and q, with non-ideal migration
The range of average utility varies between 1.6 and 4 for the different points (p, q), so a difference of 3 is relatively large. In the ideal migration case of Figure 7, we see that in two regions (p < 0.5 and q < 0.5) and (p > 0.5 and q > 0.5) the policies of the MDP approach generate higher average utility values than the policies of the INS approach. In the nonideal migration case, as shown in Figure 8, differences are detected in the lower left and upper right regions. The corner regions are similar to those in ideal migration, but smaller in area and with larger average utility differences. The evaluation results from the example show that in some cases the use of the MDP gives an advantage. The advantage depends on the penalty of the migration, which is a key property of the MDP approach. 5.4
State Estimation Accuracy
The above performance evaluation is performed with ideal state estimation. In the following we describe properties of a non-ideal state estimator and the impact on the performance of the generation approach. Instead of using the entire (p,q)spectrum, we limit the analysis to two scenarios. In scenario 1, we simulate a network that has a low rate of state changes. In scenario 2, we simulate a fast-changing network with a high rate of changes. The differences between the two networks are expressed in the state transition probabilities. In scenario 1, the probability of changing state is very low (0.1-0.5 changes per second on average), which is seen in Table 2. In scenario 2, it is opposite, such that the probability of changing state is very high (9.5-10 changes per second on average), as seen in Table 3. Since the instantaneous approach assumes a slowly changing environment, it is expected to perform well with in the first scenario and poorly in the second. As the MDP generates the optimal policies, it should perform best in both scenarios. We measured the estimator accuracy as the ratio between the number of correctly estimated states and the number of true states. The results
66
A. Nickelsen, R.L. Olsen, and H.-P. Schwefel Table 2. Transition probabilities P1 (si , sj )) (scenario 1)
Table 3. Transition probabilities P2 (si , sj ) (scenario 2)
si → sj N C N p=0.99 0.01 C 0.05 q=0.95
si → sj N C N p=0.01 0.99 C 0.95 q=0.05
100
Accuracy
80 60
Scenario 1 Scenario 2
40 20 0
TH
HMM Estimator
Ideal
Fig. 9. Accuracy of the estimators, including the theoretical ideal estimator
are shown in Figure 9. From the figure we see that overall the HMM has a better accuracy, and that the increased state change rate in scenario 2 impacts the estimation accuracy of both approaches. The ideal state estimator is shown for reference. 5.5
Inaccurate State Estimation Impact on Performance
We evaluate the performance of the combined state estimation methods and generation approaches by calculating the average quality achieved during a simulation run.We use both scenarios for evaluation to illustrate the robustness of the MDP approach. To get a clear understanding of the impact of state estimation inaccuracy, we used the INS approach without state prediction, INS’, in this evaluation. The policy of the INS’ approach is the same in both scenarios as it only depends on the reward distribution and not the transition probabilities. The policy is defined as 12 πIN S (c, s) = . 12 The interpretation of the policy is that if normal network state is observed (column 1) then c = D1 is decided. If high packet loss is observed (column 2) then c = D2 is decided. The optimal policy generated by the MDP in scenario 1 is equal to the INS’-policy. For scenario 2, the MDP generates a policy opposite to the previously used 21 πMDP,s2 (c, s) = . 21 Based on the sequences of chosen configurations and true states, we calculated the average utility achieved during the simulation runs. The mean average
Model-Based Decision Framework for Autonomous Application Migration
67
Fig. 10. Average utility comparison between the three estimation methods and the two policy generation methods in both network scenarios
utilities in both scenarios are shown in Figure 10, where also results from using the theoretical ideal estimator are shown. The differences are significant in all cases within a 95% confidence interval. In scenario 1, only the state estimation method makes a difference since the policies are equal. In scenario 2, the policies are opposite. Since the MDP policy is optimal, the average quality increases with increasing estimation accuracy. However, the instantaneous policy is opposite the optimal and always makes the worst decision. This explains the decrease in average quality with the increasing estimator accuracy. The fact, that the INS’ approach produces the lowest average utility with the ideal estimator in scenario 2 is due to the behavior of the INS policy. Since they are opposite of the optimal policy, INS’ performance benefits from any inaccuracy in the state estimation.
6
Conclusion and Future Work
We have proposed a decision framework for service migration which uses a model-based policy generation approach based on a Markov Decision Process (MDP). The MDP approach generates an optimal decision policy and considers the penalty of performing the migration (failure probability and delay) when implemented in the migratory system. One key property of the MDP approach is the ability to consider the effect of future decisions into the current choice. With the MDP approach, policies are enforced based on the state of the environment. As the state is not always observable, we introduce a hidden Markov model (HMM) for estimating the environment state based on observable parameters. An example system was simulated to evaluate the MDP approach by comparing to a simpler instantaneous approach. The average user experience quality of the
68
A. Nickelsen, R.L. Olsen, and H.-P. Schwefel
generation approach was compared to a simple instantaneous approach that does not consider future decisions. The comparison used a model of a slowly changing network and showed that the introduction of the HMM alone gives benefits, as the achieved average quality was slightly higher for the MDP approach than the instantaneous approach. When the network model was changed to include more rapid changes, the MDP approach produced the highest quality and followed the dynamics of the environment more precisely. With our results we are able to quantify the gain in performance of considering future decisions. Future work should extend the capabilities of the framework to enable online generation of policies to support changing environment models, and ultimately learn environment parameters online to change policies during run-time.
Acknowledgments This work was partially supported by the EU ICT FP7 project ’Open Pervasive Environments for iNteractive migratory services – OPEN’, see www.ict-open.eu. The Telecommunications Research Center Vienna (FTW) is supported by the Austrian Government and by the City of Vienna within the competence center program COMET.
References 1. Illmann, T., Kargl, F., Weber, M., Kruger, T.: Migration of mobile agents in java: Problems, classification and solutions. In: Proc. of the Int. ICSC Symposium on Multi-Agents and Mobile Agents in Virtual Organizations and E-Commerce (MAMA 2000) Citeseer (2000) 2. Nickelsen, A., Paternò, F., Grasselli, A., Schmidt, K.-U., Martin, M., Schindler, B., Mureddu, F.: OPEN: Open pervasive environments for migratory interactive services. In: Proceedings of the 12th international conference on Information Integration and Web-based Applications and Systems (iiWA S2010), ACM Press, New York (to appear 2010) 3. Klus, H., Niebuhr, D., Rausch, A.: A component model for dynamic adaptive systems. In: International workshop on Engineering of software services for pervasive environments, p. 28. ACM Press, New York (2007) 4. Fox, J., Clarke, S.: Exploring approaches to dynamic adaptation. In: Proceedings of the 3rd International DiscCoTec Workshop on Middleware-Application Interaction, pp. 19–24. ACM Press, New York (2009) 5. Hofmeister, C., Purtilo, J.: Dynamic reconfiguration in distributed systems: Adapting software modules for replacement. In: Proceedings the 13th International Conference on Distributed Computing Systems (1993), pp. 101–110. IEEE, Los Alamitos (2002) 6. Hillman, J., Warren, I.: An open framework for dynamic reconfiguration. In: Proceedings of the 26th International Conference on Software Engineering, pp. 594–603. IEEE Computer Society Press, Los Alamitos (2004) 7. Kalasapur, S., Kumar, M., Shirazi, B.: Dynamic service composition in pervasive computing. In: IEEE Transactions on Parallel and Distributed Systems, pp. 907–918 (2007)
Model-Based Decision Framework for Autonomous Application Migration
69
8. Paternò, F., Santoro, C., Scorcia, A.: User interface migration between mobile devices and digital tv. In: HCSE 2008, p. 292. Springer, Heidelberg (2008) 9. Wüst, C., Verhaegh, W.: Quality control for scalable media processing applications. Journal of Scheduling 7(2), 105–117 (2004) 10. Vengerov, D.: Dynamic Adaptation of user Migration Policies in Distributed Virtual Environments (2009) 11. Calinescu, R., Grunske, L., Kwiatkowska, M., Mirandola, R., Tamburrelli, G.: Dynamic qos management and optimisation in service-based systems. IEEE Transactions on Software Engineering (2010) 12. Schwefel, H., Praestholm, S., Andersen, S.: Packet Voice Rate Adaptation Through Perceptual Frame Discarding. In: IEEE Global Telecommunications Conference (GLOBECOM 2007), pp. 2497–2502 (2007) 13. Luna, C., Kondi, L., Katsaggelos, A.: Maximizing user utility in video streaming applications. IEEE Transactions on Circuits and Systems for Video Technology 13, 141–148 (2003) 14. Shenker, S.: Fundamental design issues for the future Internet. IEEE Journal on Selected Areas in Communications 13(7), 1176–1188 (1995) 15. Rabiner, L., Juang, B.: Introduction to hidden Markov models. IEEE ASSP MAG. 3(1), 4–16 (1986) 16. Salamatian, K., Vaton, S.: Hidden markov modeling for network communication channels. In: Proceedings of the 2001 ACM SIGMETRICS International Conference on Measurement and Modeling of Computer Systems, p. 101. ACM, New York (2001) 17. Puterman, M.: Markov decision processes: Discrete stochastic dynamic programming. IMA Journal of Management Mathematics (1994) 18. Højgaard-Hansen, K., Ngyuen, H.C., Schwefel, H.-P.: Session mobility solution for client-based application migration scenarios (2010) (submitted)
Optimisation of Virtual Machine Garbage Collection Policies Simonetta Balsamo, Gian-Luca Dei Rossi, and Andrea Marin Universit` a Ca’ Foscari di Venezia Dipartimento di Scienze Ambientali, Informatica e Statistica via Torino 155, Venezia {balsamo,deirossi,marin}@dsi.unive.it
Abstract. Garbage collection represents an important feature of many modern systems that allows programmers to avoid explicit memory management and related common errors. However, its usage introduces problems in software performance engineering, because on the one hand the system exhibits better performances when there is low memory occupancy and on the other hand the garbage collection activity blocks other processes, so it may introduce a performance drawback. We propose a queueing model to analyse a system with a garbage collector, where customers arrive according to a Poisson process and the service time distribution depends on the amount of free memory. Customer arrivals correspond to process activations in the system. The model parameters allow one to specify the garbage collector service rate, and the distribution of the delays between successive activations. We show that the process underlying such a queueing model is a Quasi-Birth-Death stochastic process and we derive the steady-state analysis via Matrix Geometric Methods. Finally, we propose a heuristic based on this model to derive an appropriate and effective garbage collector activation rate in order to minimise the average system response time. The parametrisation is done using system statistics.
1
Introduction
In the latest few years memory management in high-level programming languages has been highly improved. In particular, the traditional explicit memory management, which characterises many languages such as C and C++ has shown to be hard to use without introducing serious flaws in the program code. For instance, it may happen that the programmer does not free the memory allocated by an object before the end of the scope of its pointer or, even worse, he/she may refer to objects without allocating them in memory explicitly. The former error leads to the production of the so-called memory garbage, while the latter leads to unexpected program behaviours or even to run-time unrecoverable errors. In order to overcome memory management problems, and to let the programmer focus on the algorithmic aspects of the software, garbage collectors have been introduced. This is a common feature of many high level K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 70–84, 2011. c Springer-Verlag Berlin Heidelberg 2011
Optimisation of Virtual Machine Garbage Collection Policies
71
programming languages based on Virtual machines, such as Java, Microsoft C# but also those based on functional paradigm such as Microsoft F# and O’Caml. Basically, these programming languages abstract out the memory management issues by automatically allocating objects which, in the procedural programming paradigm, are then referred through handles. Handles play the same role of pointers in languages with explicit memory management, but are easier to use and safe, meaning that no unrecoverable run-time errors should occur (and anyway programming flaws are easier to detect). The drawback of this approach is the production of memory garbage (i.e., unreferenced memory blocks) not because of programming flaws, but as a normal activity. In order to avoid a gradual reduction of the available memory, garbage collectors are introduced. A garbage collector is a process that, according to possibly sophisticated algorithms (see, e.g., [4] for a basic review), explores the dynamic memory heap and checks whether an allocated block is referenced by any handle. If an object is not referenced by any handle, then the memory that it uses is marked as free. The non-triviality of the garbage collection algorithms (and also their requirements in terms of CPU usage) is due to the fact that chains or also cycles of objects containing cross-referencing handles may be stored in memory (consider, e.g., a circular list data structure). As a common extension, garbage collectors also compact the occupied memory blocks in order to reduce the fragmentation and allows for wide data structure allocations. This operation may be very time-consuming and can cause a fall of the system performance. Moreover, the activation of the garbage collector causes a partial or full blocking of the execution of the active processes since conflicts in the memory access must be avoided. A challenging problem in the software performance engineering consists in deciding the frequency of the garbage collector activations. Intuitively, a rare activation is desirable in order not to observe a decay of the system response time. Conversely, a lack of garbage collection runs causes the progressive reduction and fragmentation of the memory which leads to virtual memory (and hence disk-swap) need. Contribution. The scope of this paper is twofold. First, we define a queueing model of the process execution environments in which the garbage collector operates. The queue has an underlying Continuous Time Markov Chain (CTMC) whose regular-block-structure allows the application of Quasi-Birth&Death process analysis [8]. The strength of this approach is that both the derivation of the steadystate probabilities and of the stability condition is fully numerically tractable. We consider the basilar, but still widely applied, garbage collection policy called stopthe-world : in few words, when the garbage collector is activated, the execution of all the other processes is suspended until the execution is over. Obviously, several research efforts have been devoted to relax this strict requirement, e.g., in [10], but, as declared in [11], stop-the-world is a common assumption both for parallel and single-thread garbage collection implementations. Furthermore, we propose to use the model as the basis to define a heuristic policy to decide on-flight the frequency of garbage collector activation in real systems. We propose to parametrise the model according to a set of measurements
72
S. Balsamo, G.L. Dei Rossi, and A. Marin
which are done during the system working-time and derive an approximation of the optimum frequency of the garbage-collector runs. This policy tends to auto-adapt the system behaviour to the work-load characteristics and does not require a manual tuning of the Virtual Machine parameters which may result difficult also for specialised people. Related Works. To the best of our knowledge, although several works address the problem of estimating the worsening of the system performance due to garbage collection, our proposed approach is novel. In [4] the authors consider the delays introduced by the garbage collection activity by measurements on real system or simulation. In [3] the authors present a comparison between the explicit memory management mechanisms and the garbage collection with measurements on real systems. We will use this latter paper for a rough validation of our queueing model. Works on the checkpoint interval in databases [2] or on software rejuvenation [12] discuss the optimisation of system availability when some blocking operations are to be executed in order to maintain the system efficiency. None of them, however, considers the problem of garbage collection or uses QuasiBirth&Death processes. To be best of our knowledge, the usage of a queueing model to estimate the optimal garbage collection rate has not been considered in literature. Paper Structure. The paper is structured as follows: Section 2 briefly resumes the theoretical background needed to keep the paper self-contained. In particular, Section 2.1 presents Neuts’ matrix geometric method for the analysis of structured Markov chains, and Section 2.2 illustrates its standard application to quasi-birth&death stochastic processes. Section 3 introduces the model for the garbage collector that we present in this paper. In Section 4 we discuss an application of the proposed model to define a heuristic for determining the optimum activation rate in a system with garbage collection. Some numerical examples of applications of such a heuristic are given in Section 5 and, finally, Section 6 presents the conclusion.
2
Theoretical Background
In this part we recall the fundamental notions required to keep this paper selfcontained. We briefly present Neuts’ matrix geometric method for the analysis of structured Markov chains, and then we illustrate its standard application to quasi-birth&death stochastic processes (QBD). 2.1
Neuts’ Matrix Geometric Method
Matrix geometric [8,9] is an analysis technique that allows the efficient computation of the steady-state solution of Markov chains with a special structure of the transition rate matrix. In this paper we refer to the case of CTMCs whose infinitesimal generators Q are infinite block tridiagonal matrices with the following structure:
Optimisation of Virtual Machine Garbage Collection Policies
⎛
B00 ⎜ B10 ⎜ ⎜ 0 ⎜ Q=⎜ ⎜ 0 ⎜ ⎜ ⎝ .. .
B01 A1 A0 0 .. .
0 A2 A1 A0
0 0 A2 A1 .. . .. .. . .
0 0 0 A2 .. . .. .
0 0 0 0 .. . .. .
⎞ ... ...⎟ ⎟ ...⎟ ⎟ ...⎟ ⎟, ⎟ ⎟ ⎠ .. .
73
(1)
where: – – – –
A0 , A1 , A2 are square matrices with the same dimension C, B00 is a square matrix with dimension D, B10 is a C × D matrix, B01 is a D × C matrix.
Let π be the stationary distribution (assuming it exists) of the CTMC, i.e., πQ = 0 with the normalising condition π1 = 1, where 1 = (1, 1, 1, . . .). According to the structure of Q, we consider π = (π 0 , π 1 , π 2 , . . .) where π 0 = (π01 , . . . , π0D ) has dimension D, while π n = (πn1 , . . . , πnC ), n > 0, have dimension C. Vector π may be iteratively computed with the following scheme: π n+1 = π n R
n > 1,
(2)
where π 0 , π 1 and R are defined as in [8,9]. A faster iterative approach for the computation of R in case of QBD processes is described in [7]. 2.2
Quasi-Birth and Death Processes
The results presented in this section assume that the infinitesimal generator of the CTMC underlying a queueing system has the tridiagonal structure of (1) and that the ||π i ||1 , i ≥ 0 is the steady-state probability of observing exactly i customers in the systems, where || · ||1 denotes the 1-norm (or the Taxicab norm) of the vector. The first interesting problem concerns the decision of the stability of the queue. Let us define A = A0 + A1 + A2 and let π A be the solution of π A A = 0 and ||π A ||1 = 1. Then, for a QBD process to be ergodic, the following condition is required: π A A2 1 < π A A0 1 . (3) For this class of queueing models, we may also derive a closed-matrix-form expression for the mean number of customers in the system: E[N ] =
∞
k||π k ||1 = ||π 1 (I − R)2 ||1 .
(4)
k=1
Since there is no customer loss or creation in the queue, under stability condition the throughput is equal to the arrival rate λ, hence by Little’s result we derive the mean response time: E[N ] E[R] = (5) λ
74
3
S. Balsamo, G.L. Dei Rossi, and A. Marin
Model Definition and Analysis
This section introduces the model for the garbage collector that we present in this paper. Model description and underlying assumptions. 1. We consider an infinite set of undistinguishable customers that arrive at the system from the outside according to a homogeneous Poisson process with rate λ. Customer arrivals correspond to process activations in the system. 2. If we assume that a customer arrives at an empty system, no other customers arrivals during the service time, and that the garbage collector stays always inactive, then the service time is exponentially distributed and independent of the arrival time. 3. The scheduling discipline is Processor Sharing (see, e.g., [5]). This discipline resembles a Round Robin with pre-emption policy of the system. 4. The memory is divided into B blocks. At each customer arrival epoch, b blocks are occupied, where b is sampled from a discrete random variable with a certain probability distribution. In the rest of the paper we will assume for simplicity that b = 1, but the analysis can be applied for any distribution of b values. It is important to point out that these B blocks are partially allocated in the physical memory and the remaining part in the disk. Therefore, the overall system service rate depends on the amount of available memory. Specifically, in case of usage of disk-allocated memory blocks, the swapping activity, i.e., the passage of memory blocks between the disk to the physical memory and vice-versa, causes a high increase in the customer service time. Hence, the service rate μi is a function of the occupied memory blocks i, with 0 ≤ i ≤ B. Although it is possible to modify the model in order to consider service rates that depend on the number of customers, this would disrupt the regularity of the resulting matrix structure, and form a so-called Nonhomogeneous QBD process [6], whose solution is computationally challenging. 5. The garbage collector plays the role of freeing the allocated memory blocks that are actually unused. We assume the garbage collecting policy stop-theworld, meaning that during the memory optimisation time, the customer service is suspended. The aim of the garbage collector is to reduce the memory occupancy of the processes in order to maintain the number i of occupied blocks of memory low, and hence improve the service rate. Observe that, since garbage collectors are able to perform also data compression activity (thus reducing heap-memory fragmentation), it is possible (although unlikely) that at the end of its run the number of used blocks is lower than the number of customers in the system. The garbage collector is activated in two cases:
Optimisation of Virtual Machine Garbage Collection Policies
75
(a) The system memory is full, i.e., i = B and a customer arrival event occurs; (b) A timer set up with an exponentially distributed delay expires. The mean duration of these delays is α−1 , and we call α the activation rate of the garbage collector. Also in this case, one may assume the activation rate to be function of the occupied blocks of memory, i.e., αi ; The analysis of each memory block is carried out in an exponentially distributed random time with rate γi , with 1 ≤ i ≤ B. This rate, in general, depends on the memory occupancy, since some swaps may be necessary in case of blocks allocated in the disk. However, the garbage collection is unconditionally interrupted after a random delay βi , with 1 ≤ i ≤ B. This is done in order to prevent long-lasting blocking in the customer service activity. βi is called the deactivation rate. For instance, in case of server for graphical interactive applications (such as, on-line games) it may be worth to set up both high activation and deactivation rates, so that the garbage collector is frequently done for short times. On the other hand, a web server has not such a strict requirement. 6. As a final assumption, we consider the case of empty system, i.e., no customer (process) is being processed. In this case the garbage collector can immediately free all the memory blocks. State of the Model and Transition Diagram. We consider that the garbage collector can be active or suspended. Hence, we specify two possible states for the garbage collector: ON and OFF. When the garbage collector is switched on, all the other activities of the server are blocked, i.e., customers cannot be served. In our model, the state of the system can be completely described by a triplet (c, i, g), where c is the number of customers in the system, i is the number of occupied blocks and g is the state of the garbage collector, e.g. the state (5, 3, ON) means that there are 5 customers in the system, 3 blocks of used memory and that the garbage collector is running. Formally, the state space of the process is E = (0, 0, OFF) ∪ {(c, i, g)|c ∈ N>0 , i ∈ {1 . . . B}, g ∈ {ON, OFF}}. Figure 2 illustrates the structure of the regular portion of the resulting CTMC. We can notice that transitions from or to the state (c, i, g) occurs only with neighbouring states, i.e., states (c , i , g ) where c ∈ {c − 1, c, c + 1}, and have a regular pattern for every number of customers c > 1. This, as shown before, means that this is a QBD process, and that the infinitesimal generator of the Markov process has a regular block structure like the one described in Section 2.2. Moreover, we can assume that the system is initially empty, and that every time the system become empty again, all memory is instantaneously released, i.e., when c = 0 there is only one state (0, 0, OFF) that behaves as shown in Figure 1. Definition of the Matrix-blocks for the Matrix Geometric Analysis. Given the regular structure depicted above, we can formally define the structure of the blocks which the infinitesimal generator of the underlying CTMC consists of.
76
S. Balsamo, G.L. Dei Rossi, and A. Marin γ2
γ3
γB
γB−1 ...
(1, 1, ON)
α1
α2
β1
(1, 1, OFF)
(1, B − 1, ON)
αB−1
β2
...
(1, 2, OFF)
μ1
λ
...
(1, 2, ON)
μ2
(1, B, ON)
αB
βB−1
(1, B − 1, OFF)
βB
(1, B, OFF)
μB−1
...
μB
(0, 0, OFF)
Fig. 1. CMTC transitions for the queue with 0 or 1 customer and b = 1. For the sake of clarity, transitions from and to non represented states are omitted.
(n + 1, 1, ON)
...
(n + 1, 2, ON)
(n + 1, 1, OFF)
...
(n + 1, 2, OFF)
(n + 1, B, ON)
(n + 1, B − 1, OFF)
(n + 1, B, OFF)
γB
γB−1
γ3
γ2
(n + 1, B − 1, ON)
... (n, 1, ON)
α1
...
(n, 2, ON)
α2
β1
(n, B − 1, ON)
αB−1
β2
(n, B, ON)
αB
βB−1
βB
λ (n, 1, OFF)
...
(n, 2, OFF)
(n, B − 1, OFF)
(n, B, OFF)
... μ1
λ
μ2
λ
(n − 1, 1, ON)
(n − 1, 1, OFF)
λ
(n − 1, 2, ON)
(n − 1, 2, OFF)
λ
μB−1
λ
(n − 1, B − 1, ON)
(n − 1, B − 1, OFF)
λ
μB
λ
λ
(n − 1, B, ON)
(n − 1, B, OFF)
Fig. 2. The regular blocks of the model for b = 1
We use the same block name as those given by Equation (1). A0 , A1 and A2 are matrices of size 2B × 2B, defined as follows: A0 (i, j) =
μ i+1 if i = j and i, j are odd 2 0 otherwise
Optimisation of Virtual Machine Garbage Collection Policies
77
⎧ if j = i + 1 ∧ i is odd ⎪ ⎪ α i+1 2 ⎪ ⎪ ⎪ i β if j = i − 1 ∧ i is even ⎪ ⎪ ⎨ 2 γ 2i if j = i − 2 ∧ i is even A1 (i, j) = ⎪ ⎪ − (A (i, k) + A (i, k) + A (i, k)) if i = j 0 1 2 ⎪ ⎪ ⎪ ⎪ ∀k = i ⎪ ⎩ 0 otherwise (6) ⎧ ⎨ λ if j = i + 2 A2 (i, j) = λ if (i = 2B ∨ i = 2B − 1) ∧ j = 2B ⎩ 0 otherwise Here the even rows and columns represent states (c, i, g) where g = ON, i.e., the garbage collector is active, while the odd ones represents states where g = OFF. Moreover, let B0 , B1 and B2 be a column vector of size 2B, a single-component vector and a row vector of size 2B, respectively, defined as follows: B0 (i) =
μ i+1 if i is odd 2 0 otherwise
B1 (1) = −λ B2 (j) =
λ if j = 1 0 otherwise
Example 1. Let us consider the case B = 4, then we have: ⎛ ⎞ ⎛ ⎞ μ1 0 0 0 0 0 0 0 00λ0 0 0 0 0 ⎜ 0 0 0 0 0 0 0 0⎟ ⎜0 0 0 λ 0 0 0 0 ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ 0 0 μ2 0 0 0 0 0⎟ ⎜0 0 0 0 λ 0 0 0 ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ 0 0 0 0 0 0 0 0⎟ ⎜0 0 0 0 0 λ 0 0 ⎟ ⎜ ⎟ ⎜ ⎟ A0 = ⎜ A2 = ⎜ ⎟ ⎟ ⎜ 0 0 0 0 μ3 0 0 0⎟ ⎜0 0 0 0 0 0 λ 0 ⎟ ⎜ 0 0 0 0 0 0 0 0⎟ ⎜0 0 0 0 0 0 0 λ⎟ ⎜ ⎟ ⎜ ⎟ ⎝ 0 0 0 0 0 0 μ4 0⎠ ⎝0 0 0 0 0 0 0 λ⎠ 0 0 0 0 0 0 0 0 0000000λ ⎛
∗ ⎜β1 ⎜ ⎜0 ⎜ ⎜0 A1 = ⎜ ⎜0 ⎜ ⎜0 ⎜ ⎝0 0
α1 ∗ 0 γ2 0 0 0 0
0 0 ∗ β2 0 0 0 0
0 0 α2 ∗ 0 γ3 0 0
0 0 0 0 ∗ β3 0 0
0 0 0 0 α3 ∗ 0 γ4
0 0 0 0 0 0 ∗ β4
⎞ 0 0⎟ ⎟ 0⎟ ⎟ 0⎟ ⎟, 0⎟ ⎟ 0⎟ ⎟ α4 ⎠ ∗
where diagonal elements, denoted with ∗, are given by Equation (6).
78
S. Balsamo, G.L. Dei Rossi, and A. Marin
⎛ ⎞ μ1 ⎜0⎟ ⎜ ⎟ ⎜μ2 ⎟ ⎜ ⎟ ⎜0⎟ ⎟ B0 = ⎜ ⎜μ3 ⎟ ⎜ ⎟ ⎜0⎟ ⎜ ⎟ ⎝μ4 ⎠ 0
B1 = −λ
B2 = λ 0 0 0 0 0 0 0
Analysis. As we pointed out before, the stochastic model has an underlying QBD process, hence the equations and analysis method described in Section 2 can be applied. Specifically, the steady-state probabilities can be computed once Neuts’ matrix R is known and the closed matrix-formula (4) and (5) can be applied. Other interesting performance indices may be computed up to an arbitrary precision, by truncation of the Markov process, e.g., the overhead caused by the garbage collector or the mean time spent after a garbage collector activation. Stability condition can be tested with inequality (3). We are interested in establishing the activation rate of the garbage collector that minimises the mean response time of the system. We assume that all the other parameters are given and, in particular, that the duration of the garbage collector runs are determined by system requirements, such as avoiding longlasting stop-the-world phases. As a simplifying hypothesis, let us consider constant rates αi = α, βi = β, and let R(α) be the mean response time of the model as function of α. Hence, we should address the optimisation problem: α∗ = argminα R(α),
(7)
i.e., finding the optimum garbage collector activation rate that minimises the mean response time. Since we do not have an analytic expression for function R(α) a numerical approach must be adopted, and an interval inside which the optimum is contained must be found. The following proposition gives this interval. Proposition 1. If the optimisation problem (7) admits a solution, then the following inequality holds: 0 < α∗ <
(β + γ)(μ+ − λ) , λ
(8)
where μ+ = maxi (μi ), 0 ≤ i ≤ B. Proof. We aim to find an upper bound α+ for the activation rate. We derive α+ as the stability condition of a queue whose service rate is higher than that of the model we are studying. The fictitious queue, whose underlying stochastic process is depicted in Figure 3, alternates working-phases and idle-phases and has a Poisson arrival process. The service rate, when in activity, is exponentially distributed with rate μ+ = maxi (μi ), 0 ≤ i ≤ B. Observe that this service rate is an upper bound of that of the garbage collector queue. We want that the rate at which the
Optimisation of Virtual Machine Garbage Collection Policies
79
fictitious queue enters into an idle state to be an upper bound of the garbage collector activation rate, i.e., we assume it to be α. Finally, we need to find a lower bound for the rate of entering again into an active-state from a idle-state. Observe that, in the GC model the time spent in the collecting phase which starts from i has the distribution of the minimum of the sum of i independent exponential random variables with parameter γ and the exponential random variable with parameter β. In the average, the time is greater than the minimum of one exponential random variable with rate γ and one with rate β, i.e., a random variable with rate γ + β. The fictitious queue is itself a simple QBD process whose stability condition is necessary for the stability of the original queue. The symbolic condition can be easily derived using Inequality (3). Note that, a purely algebraic approach may also be taken to prove that the stability condition of the fictitious queue is necessary for that of the original garbage collector queue. In this case, one first observes that the left-hand-sides of Inequality (3) is λ for both queues. For what concerns the right-hand-sides, observe that the easy structure of A0 (in both the queues) and the observation that for large n the probability of observing the garbage collector inactive (odd states) is lower in the original queue than in the fictitious one (which
relates the vector π A of both the queues), we algebraically obtain the proof. λ
λ
0
λ
1
2
μ+
μ+ α
β+γ
μ+ α
β+γ
1
α
β+γ
2
λ
...
3
3
...
λ
Fig. 3. The fictitious model used to prove Equation (8)
Given the interval of search non-linear optimisation problem (7) can be solved, e.g., with a Golden section search or, more practically, with Matlab function fmincon. Observe that, although we have not the proof that the there exists only one minimum, we surely know that if a stability region of the queue exists for α, then there is at least a local minimum. By informal considerations on the model behaviour, and supported by experimental evidences, we also conjecture that the local minimum is unique and hence also an absolute minimum.
4
Heuristic for Minimal Average Response Time
In this section we discuss an application of the proposed model to define a heuristic for determining the optimum activation rate in a system with garbage
80
S. Balsamo, G.L. Dei Rossi, and A. Marin
collection. In practice, we aim to determine, in flight, the optimum garbage collector activation rate αi . ¯ available memory blocks and equipped Assume that given a system with B with a garbage collector, we can measure the number of free memory blocks f , and, given this value, the average service times μ¯i , the average rates at which the garbage collector can free a block of memory γ¯i and the average rate at which ¯ − f , i.e., the garbage collector returns control to the program β¯i , where i = B ¯ the number of occupied blocks. B should be chosen so that the size of each block is equal to the average memory occupation required by a customer. Those statistics are easily measurable in many real systems, e.g., in the Sun/Oracle Java Virtual Machine using the -verbose:gc option, and can be ¯ whose indices are the number of occonveniently stored in vectors of length B ¯ for values of μ¯i , γ¯i and ¯ γ¯ and β cupied blocks i. We should call those vectors μ, ¯ ¯ be the vector of the optimal activation rates. βi , respectively. Moreover, let α ¯ This vector, initially, contains unknown rates α¯i = , 1 ≤ i ≤ B. ¯ ¯ γ ¯ and β At any given time, the system could be able to measure values of μ, ¯ only for the first k blocks of occupied memory. The remaining rates βi , γ¯i and ¯ are then assumed as equal to β¯k , γ¯k and μ¯k , respectively. μ¯i for k < i ≤ B ¯ as ¯ , γ¯ and β, The model is then parametrised, given the measurements in μ follows: ¯ B=B μi = μ¯i ∀i ∈ {1 . . . B} (9) βi = β¯i ∀i ∈ {1 . . . B} γi = γ¯i ∀i ∈ {1 . . . B}. These assignments leave a set of free parameters {αi } for 1 ≤ i ≤ B, that have to be determined in order to fully instantiate the model. The aim of our proposed heuristic is to find an assignment for this set that minimise the average response time. Let α be a vector of size B and M (α ) be the model with the parametrisation shown in Equation (9), where αi = α i , ∀i ∈ {1 . . . B}, i.e., where all garbage collector activation rates are parametrized using the elements of the vector. Moreover, let R(α ) be the average response time predicted using the model M (α ). We recall that, when the condition of Equations (3) holds, we can easily compute the mean response time R = E[R] using Equations (4) and (5). In order to make the vector α , and thus the optimisation problem, dependent on a single variable, let AB : R>0 → RB >0 be a function that, given a positive real number, returns a vector of B real numbers such that the following proportionality condition holds: ∀i ∈ {1 . . . B} a /a = k ⇒ AB (a )i /AB (a )i = k. For the sake of simplicity, in the rest of the paper we would use a function AB such that AB (a) = [αi ]|αi = a ∀i ∈ {1 . . . B}, i.e., a vector where all elements are equal to a.
Optimisation of Virtual Machine Garbage Collection Policies
81
We have discussed the solution of the optimisation problem in the previous section in case if αi = α for all i = 1, . . . , N . This choice is convenient from the implementation point of view since the activation of the garbage collector is controlled by a timer which is initialised according to an exponentially distributed random delay with mean α−1 , hence its activation is state-independent. Also the optimisation problem becomes easier to solve. In Section 5 we will show an example of the average response time as function of α for a special case. Nevertheless, one may decide to keep different values for αi (maybe just by speeding up the activation rate when the swap-area is approaching) and still use the fmincon Matlab function to obtain a (sub)optimum solution. Observe that, one may wish also to consider βi as a parameter for the optimisation, maybe introducing other constrain due to the type of applications that the server is running. Vector α = A(ai ) is then used to tune the garbage collector, i.e., to set the ¯ actual activation rates α. It is important to recall that previsions made by our heuristic are based on incomplete data, i.e., on measurements made by the system up to k used memory blocks. The system behaviour when the memory occupancy is increased could be very different, so, in order to deal with this problem, we have to define a policy for model parametrisation updating. Whenever the system uses more than k blocks, where k is the number used for the previous parametrisation, it could determine if the estimation, for k < i ≤ B of the values of βi , γi and μi as βk , γk and μk , respectively, are good enough, e.g., if they differ by less than a chosen percentage, or if the model has to be parametrised again in order to get better estimation for αi values, that could be then used to parametrise again the actual system, and so on, in a continuous cycle of estimation and parametrisation.
5
Numerical Examples
Once defined a heuristic for finding an optimal garbage collection activation rate, we should be interested in the sensitivity of this optimum in respect of other parameters. In this section we show some numerical examples obtained using our model. In order to compute these results we have used some software tools, such the library SMCSolver [1] and MATLAB. In Figure 4 we can see how the mean response time varies in function of the garbage collection activation rate for an arrival rate λ = 3. The other parameters of the model are shown in Table 1. In Figure 5 we can see how the optimal garbage collector activaton rate α varies when the customer arrival rate λ. As in the previous example, the other parameters of the model can be seen in Table 1. Figure 6 shows how the system utilisation ρ, i.e., the probability that the system is non-empty, given an arrival rate λ = 3 and the other parameters as shown in Table 1, is affected by the choice of a value for the garbage collector activation rate α. Notice that, in the previous example, the utilisation ρ is minimised for an α value that is different from the value that minimises the mean response time. This
S. Balsamo, G.L. Dei Rossi, and A. Marin
1.96
1.94
Mean Response Time
1.92
1.9 1.88
1.86
1.84
1.82
1.8
1.78 0.8
0.82
0.84
0.86
0.88
0.9
0.92
0.94
0.96
0.98
1
Garbage Collector Activation Rate
Optimal Garbage Collector Activation Rate
Fig. 4. An example of the function R
1.05 1 0.95 0.9 0.85 0.8 0.75 0.7 0.65
2.5
2.7
2.6
2.8
3
2.9
3.1
3.3
3.2
3.4
Customer Arrival Rate
Fig. 5. Optimal α value in function of λ
0.85 0.84 0.83 0.82
Utilisation
82
0.81 0.8 0.79 0.78 0.77 0.76 0.6
0.7
0.8
0.9
1
Garbage Collector Activation Rate
Fig. 6. ρ value in function of α
1.1
1.2
Optimisation of Virtual Machine Garbage Collection Policies
83
0.25
α = 0.7 α = 0.9 Stationary Probability
0.2
0.15
0.1
0.05
0 0
1
2
3
4
5
6
7
8
9
Number of Customers
Fig. 7. Vector π for two different α values and λ = 3 Table 1. Parameter Values in Numerical Examples Parameter Name Value B 50 βi 3 ∀i ∈ {1 . . . B} γi 25 ∀i ∈ {1 . . . B} μi 5.0 for 1 ≤ i ≤ B/2, 0.05 for B/2 < i ≤ B
behaviour can be explained observing that, as shown in Figure 7, it is possible that, given two different distributions π and π , after a certain k, π(k + i) < π (k + i) for i ∈ N, even if π(0) > π (0).
6
Conclusion
In this paper we presented a queueing model of a system with garbage collection. From a theoretical point of view, the model is a Quasi-Birth&Death process, and can be studied via Matrix Geometric method. Specifically, closed expressions for the mean number of customers and the mean response time are given. The queueing model is then used to provide an estimation of the optimum garbage collection activation rate in order to minimise the mean customer response time. We showed that under a set of conditions the problem is numerically tractable with automatic tools. Finally, we proposed to use the introduced queueing model as a base for the scheduling activities of the garbage collector. To this purpose, there should be a monitor collecting system statistics on the workload of the processes. These data are used to parametrise the model and periodically determine a new optimum activation rate for the garbage collector in order to minimise the mean response time. Future research efforts will be devoted to a stronger validation of the model with real-measurements. Moreover, we plan to compare the performance indices of traditional garbage collector activation policies with the one we proposed here.
84
S. Balsamo, G.L. Dei Rossi, and A. Marin
References 1. Bini, D., Meini, B., Steff´e, S., Van Houdt, B.: Structured Markov chains solver: software tools. In: Proc. of the 2006 Workshop on tools for Solving Structured Markov Chains, p. 14. ACM Press, New York (2006) 2. Gelenbe, E.: On the optimum checkpoint interval. J. ACM 26, 259–270 (1979) 3. Hertz, M., Berger, E.D.: Quantifying the performance of garbage collection vs. explicit memory management. SIGPLAN Not. 40(10), 313–326 (2005) 4. Jones, R., Lins, R.: Garbage Collection: Algorithms for Automatic Dynamic Memory Management. Wiley, Chichester (1996) 5. Kant, K.: Introduction to Computer System Performance Evaluation. McGrawHill, New York (1992) 6. Latouche, G., Ramaswami, V.: Introduction to Matrix Anlytic Methods in Stochastic Modeling. Statistics and applied probability ASA-SIAM, Philadelphia, PA(1999) 7. Latouche, G., Ramaswami, Y.: A logaritmic reduction algorithm for Quasi Birth and Death processes. J. of Appl. Prob. 30, 650–674 (1994) 8. Neuts, M.F.: Matrix Geometric Solutions in Stochastic Models. John Hopkins, Baltimore (1981) 9. Neuts, M.F.: Structured stochastic matrices of M/G/1 type and their application. Marcel Dekker, New York (1989) 10. Schoeberl, M., Puffitsch, W.: Nonblocking real-time garbage collection. ACM Trans. Embed. Comput. Syst. 10(1), 1–28 (2010) 11. Sun Microsystem: Memory Management in the Java HotSpot Virtual Machine (April 2006) 12. Vaidyanathan, K., Trivedi, K.: A comprehensive model for software rejuvenation. IEEE Trans. on Dependable and Secure Comput. 2(2), 124–137 (2005)
Performance Evaluation of a Single Node with General Arrivals and Service Alexandre Brandwajn1 and Thomas Begin2 1
Baskin School of Engineering, University of California Santa Cruz, USA [email protected] 2 LIP, Université Lyon 1, France [email protected]
Abstract. Queueing delays experienced by packets buffered at a node are among the most difficult to predict when considering the performance of a flow in a network. The arrivals of packets at a node tend to be highly variable so that a finitebuffer single-server queue with general arrivals and service emerges as a natural model of a network link. In this paper we propose an approach to the solution of such a queue when the times between arrivals and service times are represented as acyclic phase-type distributions. The proposed solution approach, based on the use of conditional probabilities, is conceptually simple, easy to implement in a standard computer language, numerically robust and reasonably fast. In addition to standard steady-state probabilities and queue size averages, the proposed approach produces the probabilities of the state of the queue found by an arriving packet, in particular, the packet loss probability, directly linked to the QoS perceived by the user. Keywords: Capacity planning; buffer sizing; quality of service; modeling; single-server queue; Ph/Ph/1/N queue.
1 Introduction and State of the Art When considering the performance of a flow at a network node, queueing delays experienced by packets (or frames) buffered at the node are among the most difficult to predict [23]. Given that a network interface can only transmit one packet at a time, a single-server queue seems a natural model of a network link. There is general agreement that the arrivals of packets at a node are highly variable and a Poisson process is not a valid representation [17, 10, 30]. With variable size packets, the transmission time (service time) is also variable and, generally, not exponentially distributed. Additionally, buffers have finite capacity, sometimes quite small [40], so that the buffer overflow probability and resulting packet loss are of major interest (e.g., because of its effect on TCP congestion window [3]). Hence, the underlying queueing model is a so-called G/G/1/N queue [2]. While the equilibrium solution of the M/M/1/N queue (with Poisson arrivals and exponential service) is straightforward [2], there are no readily usable analytical results for the more realistic G/G/1/N queue. Thus, there are essentially three possible approaches to the solution of such a queue. K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 85–98, 2011. © Springer-Verlag Berlin Heidelberg 2011
86
A. Brandwajn and T. Begin
The first one is to solve the state equations of the queueing system numerically. A commonly adopted approach is to represent the times between arrivals, as well as the service times, as phase-type distributions [28, 27], and then attempt to solve the resulting balance equations. Here, besides general methods for systems of linear equations (e.g., [35, 12]), which include direct iterative methods (e.g., Gauss-Seidel, over-relaxation [33]), specific approaches for Quasi Birth and Death processes could be used (e.g., Matrix Geometric [27, 26, 24], Spectral Expansion [25]). The latter methods may require a non-trivial degree of mathematical sophistication [15]. The second possible approach is to use discrete-event simulation. While simple in principle, this solution turns out to be fraught with problems. To achieve a reasonable accuracy, serious problems appear when simulating heavy-tailed distributions (such as the Pareto distribution for the time between arrivals) involving rare but important events (cf. [4, 13, 5]). Additionally, the simulation times tend to elongate considerably when the link utilization approaches saturation. As a result, simulation times may become long, making difficult the systematic exploration of a large number of parameter values. When there is no easy exact solution and the simulation becomes exceedingly long, a natural alternative is to look for simple approximations that would be accurate enough to provide meaningful estimates for delays and loss probabilities. There are several bounds and approximations for the G/G/1 queue with an infinite buffer [21, 22, 34, 37, 2, 19, 9, 31], which may be used to estimate delays for lightly loaded links but not to assess loss probabilities or dimension buffers. There are fewer results for the G/G/1/N queue [20, 38, 39], either limited to the first two moments of the inter-arrival and service times distributions or based on heavy-traffic assumption, which may not be applicable in a realistic network with moderate levels of losses. To the best of our knowledge there are no readily applicable good approximate results for the loss probability. This paper falls into the first category of approaches. Within the framework of acyclic phase-type representation of general distributions, we propose to use conditional probabilities to obtain a conceptually simple numerical solution that is easy to implement, generally fast, and stable in practice. Our approach allows us to obtain the state probabilities at instants of packet arrival, and hence, the packet loss probability, as well as such customary measures as the expected time in the queue. We have implemented our method in standard C language, and, in the very many test we ran, it performed well, including with phase representations of heavy-tailed distributions. Our paper is organized as follows. In Section 2 we describe our model and the proposed solution method. Section 3 discusses the practical performance of the method. We use two non-trivial examples to compare the performance of the proposed approach with that of a discrete-event simulation. Section 4 concludes this paper.
2 Model and Its Solution We focus our attention on a single node viewed as a G/G/1/N queue with a FIFO discipline. We adopt the acyclic phase-type representation of the time between arrivals of packets and of their service times. We use the terms requests and packets
Performance Evaluation of a Single Node with General Arrivals and Service
87
(or frames) interchangeably. As is well known, any distribution can be approximated arbitrarily closely by a finite number of exponential phases [28, 27], and algorithms exist to represent a given distribution by a phase-type distribution (e.g., [16, 6, 29, 18, 36, 11]). Several authors address more specifically the representation of heavy-tailed distributions (for instance, [16, 18, 11]). Thus, our G/G/1/N model becomes what is known as the Ph/Ph/1/N queue. The advantage of the phase-type representation is that we are able to easily obtain the state equations for our model in the form of the regular balance equations.
Fig. 1. Modeling a network link or an output interface as a Ph/Ph/1/N queue
We denote by a the number of phases in the arrival process, and by b the number of phases in the service process (see Fig. 1). We let λ j be the rate (intensity) of phase j, j = 1,..., a , rjl the probability that phase j is followed by phase l ( l > j ), rˆj the
probability that the arrival process ends after phase j , and τ j the probability that the arrival process starts in phase j . Similarly, for the service process, we denote by μi the rate (intensity) of phase i, i = 1,..., b , qil the probability that phase i is followed by phase l ( l > i), qˆ i the probability that the service process end after phase i, and σ i the probability that the service process starts in phase i, i = 1,..., b . As an example, with a hyper-exponential service time distribution, we have qil = 0 for all values of i and l , and qˆi = 1 for all phases i. Clearly, for any distribution, we must have a
a
a
b
b
b
j =1
j =1
l = j +1
i =1
i =1
l =i +1
∑τ j = 1 , ∑ rˆj + ∑ rjl = 1 , and, similarly, ∑ σ i = 1 , ∑ qˆi + ∑ qil = 1 .
88
A. Brandwajn and T. Begin
A possible state description for the Ph/Ph/1/N queue is p( j, i, n) which is the probability that the arrival process is in its phase j, j = 1,..., a , the service process is in its phase i, i = 1,..., b , and there is a total of n, n = 0,..., N requests in the system (queued and in service). The state probabilities are subject to the normalizing condition a
b
N
∑∑ ∑ p( j, i, n ) = 1 . The balance equations together with this normalizing condition j =1 i =1 n =0
define a system of linear equations for the probabilities p( j, i, n), and classical numerical solution methods for this type of queueing system seek to solve this system of linear equations (e.g.,Chapter 3 [7], Chapter 8 [14]) as discussed in the Introduction. We adopt the same basic state description but we use the fact that, from the definition of conditional probability, we have p( j, i, n) = p( j, i | n) p(n)
(1)
where p(n) is the probability that there are n, n = 0,..., N requests in the system, and p( j, i | n) is the conditional probability of the current phases of arrival and service given the number of requests. Note that, for n = 0, the index of the current phase of the service process becomes meaningless, and we write simply p( j | 0) to denote the state of the arrival process given that the system is idle. It is not difficult to show that the probability p (n ) can be expressed as p( n ) =
1 n α ( k − 1) , ∏ G k =1 u( k )
(2)
where a b ⎧∑ λ j rˆj ∑ p( j , i | n), if n > 0 ⎪ j =1 i =1 α ( n) = ⎨ a ⎪∑ λ j rˆj p( j | 0), if n = 0 ⎩ j =1
(3)
is the conditional rate of request arrivals with n requests in the system, and b
a
i =1
j =1
u (n) = ∑ μ i qˆ i ∑ p( j , i | n),
n ≥1
(4)
denotes the conditional rate of request service given n . G is a normalizing constant N
chosen so that ∑ p( n ) = 1 . n=0
The probability of a lost request (packet loss probability) can be obtained as ploss =
α ( N ) p( N ) N
∑ α (k ) p (k )
,
(5)
k =0
the probability that there is no wait is given by
pno wait =
α (0) p(0) N
∑ α (k) p(k) k =0
.
(6)
Performance Evaluation of a Single Node with General Arrivals and Service
89
More generally, we have for the probability that an arriving request finds n requests already present in the system PA (n) =
α (n) p(n) N
∑ α (k) p(k)
n = 0,..., N ,
,
(7)
k =0
Thus, to obtain the quantities of interest (such as the loss probability), it suffices to obtain the conditional rates α (n) and u(n) , i.e., to solve for the conditional probabilities p( j, i | n) . Using the basic identity (1) in the balance equations, we obtain the following system of equations for the conditional probabilities p( j, i | n) : for n = 2,..., N −1 j −1
i −1
l =1
l =1
p ( j , i | n)(λ j + μ i ) = ∑ p (l , i | n)λl rlj + ∑ p ( j , l | n) μ l q li a
b
l =1
l =1
(8)
+ u (n)τ j ∑ p (l , i | n − 1)λ l rˆl / α (n − 1) + α ( n)σ i ∑ p ( j , l | n + 1) μ l qˆ l / u ( n + 1)
for n = N j −1
i −1
l =1
l =1
p( j, i | N )(λ j + μ i ) = ∑ p(l , i | N )λ l rlj + ∑ p( j, l | N ) μ l q li a
a
l =1
l =1
(9)
+ u ( N )τ j ∑ p(l , i | N − 1)λ l rˆl / α ( N − 1) + τ j ∑ p(l , i | N )λ l rˆl
for n = 1 j −1
i −1
l =1
l =1
p( j , i | 1)(λ j + μ i ) = ∑ p(l , i | 1)λl rlj + ∑ p( j , l | 1) μ l q li a
b
l =1
l =1
(10)
+ u (1)τ j σ i ∑ p(l | 0)λ l rˆl / α (0) + α (1)σ i ∑ p( j , l | 2) μ l qˆ l / u ( 2)
for n = 0 j −1
b
l =1
i =1
p ( j | 0)λ j = ∑ p(l | 0)λl rlj + α (1) ∑ p( j, i | 1) μi qˆ i / u( 2) a
b
(11)
a
Note that we have ∑ ∑ p( j, i | n ) = 1 for n > 0 and ∑ p( j | 0) = 1 , i.e., we have a j =0 i =0
j =0
separate normalizing condition for each value of the number of requests in the system. We propose a simple iteration akin to a recent iterative method for Cm/Ck/c-like queues [8] to solve this system of non-linear equations. Details of this easy-to-implement iteration are given in the Appendix. In the next section, we apply our approach to study the effect of buffer size on loss probability in a network node. Additionally, we compare the performance of our method with discrete-event simulation when the times between arrivals are represented by a Pareto-like distribution.
3 Performance of the Proposed Approach In our first example, we study the performance of our approach using a model of a node with a finite buffer of 50 requests. The request arrival process is represented by
90
A. Brandwajn and T. Begin
a Pareto-like distribution. The latter was obtained using the PhFit package [16], and has a total of 16 exponential phases, 10 of which are used for the heavy-tailed part of the distribution. The parameters of this phase distribution are given in Table 1 in the Appendix. The service times in our Ph/Ph/1/50 model are represented by a threephase distribution chosen so as to match the first three moments of a reported packet mix in real networks [1] on a link operating at about 2.5 Gb/s. We used the method proposed by Bobbio et al. [6] to perform the matching of the first three moments. We give in Table 2 in the Appendix the parameters of the resulting phase distribution. Fig. 2 and Fig. 3 illustrate the results obtained. In all examples we set the convergence stringency of our algorithm at ε = 10 −7 (increasing the convergence stringency does not change our results). In Fig. 2 we show the number of iterations in our method needed to solve the Ph/Ph/1/50 model for server utilization ranging from 0.1 to 0.9. Fig. 3 displays the execution times of a C implementation on an Intel processor running at 2.2 GHz. For comparison, we include the execution times of a discrete-event simulation of the same model on a processor of the same speed. The simulation has been run long enough to attain a confidence interval of no more than 5% around the exact value of the average number of requests in the queue at 95% confidence level. We used 7 independent replications in our runs. We observe in Fig. 2 that, for the server utilization levels considered, the proposed method requires only a few tens of iterations (below 100 in all cases). The simulation performance is displayed in terms of the number of packets generated to achieve the desired confidence intervals, and ranges from a total of about 350,000 to 8,000,000 packets. In Fig. 3 we compare the CPU times for both approaches. In the example considered, the CPU time for the proposed solution remains below 0.25 s in all cases. By contrast, the CPU time for the simulation tends to increase significantly as the server utilization increases, exceeding 3 s even for moderate loads. Note that we ran the simulation only for as long as was needed to achieve the desired accuracy, knowing the exact value from our solution method. In practice, one does not know in advance the correct value, so that the simulation needs to be run until the estimated confidence interval at the desired confidence level is sufficiently narrow. This might result in longer simulation times.
Fig. 2. Number of iterations of proposed approach and number of packets generated in simulation vs. link utilization
Performance Evaluation of a Single Node with General Arrivals and Service
91
Fig. 3. CPU time for proposed approach and simulation vs. link utilization
In our second example we apply our approach to study the effect of the buffer size on the packet loss probability in a hypothetical configuration. Obviously, the issue of buffer sizing is not new and has received considerable attention (e.g., [40, 3]). In our hypothetical configuration, the rate of packet arrivals is set to a value such that with unrestricted buffer, i.e., with no packets lost, the resulting link utilization would be 0.8. We keep the same type of Pareto-like arrival process as in our first example. For the service process, we assume a single packet size of 1500 bytes and a link speed of 2.5 Gb/s. We represent the resulting service times as a 10-phase Erlang distribution. Fig. 4 shows the loss probability as a function of the buffer size obtained using the proposed exact solution of our Ph/Ph/1/N queue. We observe the rapid decrease of losses as the buffer size increases. The ability to predict accurately the loss probability is important to properly size buffers, in particular in the context of TCP [40].
Fig. 4. Predicted loss probability as a function of buffer size
The loss probability estimated by simulation follows the same general pattern. However, as shown in Fig. 7 in the Appendix, the relative error versus the exact value
92
A. Brandwajn and T. Begin
for the loss probability varies somewhat erratically. The simulation appears to have trouble estimating accurately smaller loss probabilities. We think that this is due to the heavy-tailed nature of the Pareto-like arrival process and the general difficulty of estimating the probability of rare events in a straightforward simulation (similar issues have been pointed out by other authors [4, 13, 5]). If desired, the simulation accuracy could be improved at the expense of non-negligible additional sophistication (e.g., Chapter 5 [32]). We believe that, given its reasonable speed and conceptual simplicity, the proposed approach offers an attractive alternative to simulation for buffer sizing under nonPoisson assumptions. In that respect, it is worthwhile noting that, for instance, for a buffer size of 80 ( N = 80 ) the proposed solution approach computes some 14000 unknowns (the probabilities p( j , i | n) ) in fewer than 100 iterations. Additionally, unlike simulation, analytical or numerical solutions produce directly the desired result and not an estimated confidence interval. The next section concludes our paper.
4 Conclusion In this paper we propose an approach to the solution of a single server queue with a finite buffer and general (but independent) arrivals and service represented through phase-type distributions. Such a Ph/Ph/1/N queue can be viewed as a model of a link or a node in a network. The proposed solution approach is based on the use of conditional probabilities. It is conceptually simple, easy to implement in a standard computer language, numerically robust and reasonably fast. To deploy our method in practice, one needs to represent the distribution of the times between arrivals and the service time distribution as acyclic phase-type distributions, and then apply our iterative procedure. In addition to standard steady-state probabilities and queue size averages, the proposed approach produces the probabilities of the state of the queue found by an arriving packet, in particular, the packet loss probability. Note that the state of the queue found by an arriving packet is directly linked to the QoS perceived by the user. We illustrate the performance of the proposed method using an assumed Paretolike distribution of the times between arrivals and non-exponential service time distributions. We apply our method to the sizing of a buffer in a hypothetical configuration. Additionally, we compare the performance of the proposed approach with that of a discrete-event simulation. Besides being an order of magnitude faster than the simulation, our exact solution has the advantage of avoiding non-trivial issues that may appear in simulation when dealing with heavy-tailed distribution and rare events. We believe that the proposed iterative solution for a Ph/Ph/1/N queue is simple enough to be of practical interest for researchers and practitioners who are not necessarily specialists in queueing theory or advanced numerical methods.
Performance Evaluation of a Single Node with General Arrivals and Service
93
References 1. CAIDA: IP packet length distribution hist (2000), 2. http://www.caida.org/analysis/AIX/plen 3. Allen, A.O.: Probability, Statistics and Queueing Theory, 2nd edn. Academic Press, London (1990) 4. Appenzeller, G., Keslassy, I., McKeown, N.: Sizing router buffers. Proceedings of SIGCOMM Comput. Commun. Rev. 4, 281–292 (2004) 5. Asmussen, K., Binswanger, K., Hojgaard, B.: Rare events simulation for heavy-tailed distributions. Bernoulli 2, 303–322 (2000) 6. Begin, T., Brandwajn, A.: Note sur la simulation d’une file M/G/1 selon la distribution du temps de service. In: Proceedings of ALGOTEL (2010) 7. Bobbio, A., Horváth, A., Telek, M.: Matching three moments with minimal acyclic phase type distributions. Stochastic Models 3, 303–326 (2005) 8. Bolch, G., Greiner, S., Meer, H., Trivedi, K.: Queueing Networks and Markov Chains, 2nd edn. Wiley Interscience, Hoboken (2005) 9. Brandwajn, A., Begin, T.: Preliminary Results on a Simple Approach to G/G/c-like Queues. In Proceedings of the 16th ASMTA (2009) 10. Buzacott, J.A., Shanthikumar, J.G.: Stochastic models of manufacturing systems. Prentice Hall, Englewood Cliffs (1993) 11. Crovella, M.E., Bestavros, A.: Self-similarity in World Wide Web traffic: evidence and possible causes. IEEE/ACM Trans. Netw. 6, 835–846 (1997) 12. Feldmann, A., Whitt, W.: Fitting Mixtures of Exponentials to Long-Tail Distributions to Analyze Network Performance Models. In: Proceedings of INFOCOM (1997) 13. Grassmann, W.K., Taksar, M.I., Heyman, D.P.: Regenerative analysis and steady state distribution for Markov chains. Oper. Res. 33, 1107–1116 (1985) 14. Gross, D., Shortle, J.F., Fischer, M.J., Masi, D.M.: Simulation input analysis: difficulties in simulating queues with Pareto service. In: Proceedings of the 34th Winter Simulation Conference, pp. 407–415 (2002) 15. Gross, D., Shortie, J.F., Thompson, J.M., Harris, C.M.: Fundamentals of Queueing Theory, 4th edn. John Wiley & Sons, Inc., Chichester (2008) 16. Haverkort, B.R., van Moorsel, A.P., Dijkstra, A.: MGMtool: A performance modelling tool based on matrix geometric techniques. Computer performance evaluation, Modelling Techniques and Tools, 397–401 (1992) 17. Horváth, A., Telek, M.: PhFit: A General Phase-Type Fitting Tool. In: International Conference on Computer Performance Evaluation, Modelling Techniques and Tools, pp. 14–17 (2002) 18. Jiang, H., Dovrolis, C.: Why is the internet traffic bursty in short time scales? In: ACM SIGMETRICS, pp. 241–252 (2005) 19. Khayari, R.A., Sadre, R., Haverkort, B.R.: Fitting world-wide web request traces with the EM-algorithm. Performance Evaluation 3, 175–191 (2003) 20. Kimura, T.: Approximating the Mean Waiting Time in the GI/G/s Queue. Journal of the Operational Research Society 11, 959–970 (1991) 21. Kouvatsos, D.D.: A maximum entropy queue length distribution for the G/G/1 finite capacity queue. Proceedings of SIGMETRICS Perform. Eval. Rev. 1, 224–236 (1986) 22. Kraemer, W., Langenbach-Belz, M.: Approximate formulae for the delay in the queueing system G/G/1. In: Proceedings of International Teletraffic Congress (1976) 23. Kuehn, P.J.: Approximate analysis of general queueing networks by decomposition. IEEE Transactions on Communications 27, 113–126 (1979)
94
A. Brandwajn and T. Begin
24. Kurose, J.F., Ross, K.W.: Computer Networking: a Top-Down Approach, 5th edn. Addison-Wesley, Reading (2009) 25. Latouche, G., Ramaswami, V.: A logarithmic reduction algorithm for quasi-birth-anddeath processes. Journal of Applied Probability 30, 650–674 (1993) 26. Mitrani, I., Chakka, R.: Spectral expansion solution for a class of Markov models: application and comparison with the matrix-geometric method. Performance Evaluation 23(3), 241–260 (1995) 27. Naoumov, V., Krieger, U.R., Wagner, D.: Analysis of a Multi-Server Delay-Loss System with a General Markovian Arrival Process. Matrix-analytic Methods in Stochastic Models, 43–66 (1996) 28. Neuts, M.F.: Matrix-geometric solutions in stochastic models. An algorithmic approach. Dover Books on Advanced Mathematics (1994) 29. O’Cinneide, C.A.: Characterization of phase-type distributions. Communications in Statistics: Stochastic Models 1, 1–57 (1990) 30. Osogami, T., Harchol-Balter, M.: Closed form solutions for mapping general distributions to quasi-minimal PH distributions. Perform 6, 524–552 (2006) 31. Paxson, V., Floyd, S.: Wide area traffic: the failure of Poisson modeling. IEEE/ACM Trans. Netw. 3(3), 226–244 (1995) 32. Rao, B.V., Feldman, R.M.: Numerical approximations for the steady-state waiting times in a GI/G/1 queue. Queueing Syst. Theory Appl. 2, 25–42 (1999) 33. Rubino, G., Tuffin, B.: Rare Event Simulation Using Monte Carlo Methods. Wiley Publishing, Chichester (2009) 34. Saad, Y., van der Vorst, H.A.: Iterative solution of linear systems in the 20th century. J. Comput. Appl. Math. 123(1-2), 1–33 (2000) 35. Shanthikumar, J.G., Buzacott, J.A.: On the approximations of the single-server queue. International Journal Production Research 18, 761–773 (1980) 36. Stewart, W.J.: Introduction to the numerical solution of Markov chains. Princeton University Press, Princeton (1994) 37. Thummler, A., Buchholz, P., Telek, M.: A Novel Approach for Phase-Type Fitting with the EM Algorithm. IEEE Trans. Dependable Secur. Comput. 3(3), 245–258 (2006) 38. Whitt, W.: An Interpolation Approximation for the Mean Workload in a GI/G/1 Queue. Operations Research 37(6), 936–952 (1989) 39. Whitt, W.: Approximations for the GI/G/m queue. Production and Operations Management 2(2), 114–161 (1993) 40. Whitt, W.: Heavy-Traffic Limits for Loss Proportions in Single-Server Queues. Queueing Syst. Theory Appl. 46(3/4), 507–536 (2004) 41. Wischik, D., McKeown, N.: Part I: buffer sizes for core routers. Proceedings of SIGCOMM Comput. Commun. Rev. 35(3), 75–78 (2005)
Appendix A. Details of the Proposed Iterative Solution
Our goal is to solve the system of non-linear equations (8) through (11). We use a superscript to denote the iteration number, and for sake of simplicity we introduce the following notation for n ≥ 1 :
Performance Evaluation of a Single Node with General Arrivals and Service
⎧ ⎪ (λ ⎪ j A( k ) ( j, i, n) = ⎨ ⎪ ⎪⎩ (λ j B ( k ) ( j, i, n ) =
95
j −1 1 (k ) ∑ p (l , i | n)λl rlj , if n < N + μi ) l =1 j −1 a 1 [∑ p ( k ) (l, i | n)λl rlj + ∑ p ( k ) (l , i | N )λl rˆl ], if n = N l =1 + μ i ) l =1
i −1 1 (k) ∑ p ( j, l | n ) μl qli (λ j + μi ) l =1
a ⎧ τj ∑ p ( k ) (l , i | n − 1)λl rˆl / α ( k ) (n − 1), if n > 1 ⎪ ⎪ (λ j + μ i ) j =1 C ( k ) ( j , i, n ) = ⎨ a ⎪ σ iτ j p ( k ) (l | 0)λl rˆl / α ( k ) (0), if n = 1 ⎪ (λ j + μ i ) ∑ j =1 ⎩
b ⎧ σi (k ) (k ) ∑ p ( j, l | n + 1) μ l qˆ l / u (n + 1), if n < N ⎪ = l D ( j , i, n ) = ⎨ ( λ j + μ i ) 1 ⎪0, if n = N ⎩ (k )
Our solution proceeds as follows 1) Select initial distributions p ( 0 ) ( j | 0) and p ( 0 ) ( j, i | n ) for n ≥ 1. We must have a
b
a
(0) (0) ∑ ∑ p ( j, i | n ) = 1 for n ≥ 1, and ∑ p (l | 0) = 1 . A simple equally likely j =0 i = 0
j =0
distribution will work just fine ( p ( 0 ) ( j | 0) = 1 / a and p ( 0 ) ( j , i | n ) = 1 /( ab) for n ≥ 1). Compute also the corresponding values α ( 0 ) (n ) and u ( 0 ) ( n ) . 2) At iteration k = 1,..., • Consider consecutive increasing values of the number of requests in the system n = 0,1,..., N • Enumerate phases of the arrival process from j equal 1 to a • Enumerate phases of the service process from i equal 1 to b • Compute new non-normalized values of p ( k ) ( j, i | n)
for n ≥ 1 p ( k ) ( j , i | n) ← A ( k ) ( j , i, n) + B ( k ) ( j , i, n) + u ( k −1) ( n)C ( k ) ( j, i, n) + α ( k −1) (n) D ( k −1) ( j , i, n) for n = 0 p ( k ) ( j | 0) ←
1
λj
j −1
b
l =1
i =1
[∑ p ( k ) (l | 0)λl rlj + α ( k −1) (0)∑ p ( k −1) ( j , i | 1) μ i qˆ i / u ( k −1) (1)]
96
A. Brandwajn and T. Begin a
b
• Normalize newly computed values so that ∑∑ p ( k ) ( j , i | n ) = 1 for n ≥ 1, and j =0 i =0
a
∑ p ( l | 0) = 1 (k )
j =0
• Compute new values for the conditional arrival and service rates a b ⎧∑ λ j rˆj ∑ p ( k ) ( j , i | n), if n > 0 ⎪ j =1 i =1 α ( k ) ( n) = ⎨ a ⎪∑ λ j rˆj p ( k ) ( j | 0), if n = 0 ⎩ j =1 b
a
i =1
j =1
u ( k ) ( n ) = ∑ μi qˆi ∑ p ( k ) ( j , i | n ) for n ≥ 1. • If 1− α ( k −1) (n) / α (k ) (n) < ε and 1− u (k −1) (n) / u ( k ) (n) < ε where ε is the desired
convergence stringency (e.g., ε = 10 −7 ), finish the iteration and proceed to Step 3. Otherwise, perform another iteration step, i.e., go back to Step 2. 3) Compute p(n) using formula (2) and any other quantities of interest using formulas (5) to (7).
Fig. 5. Structure of the Pareto-like distribution of the time between arrivals
B. Parameters of the Pareto-Like Distribution of the Time between Arrivals
The Pareto-like distribution used in our examples to represent the times between arrivals has the structure shown below in Fig. 5. The phase rate values given in the following table correspond to a mean time between arrivals of 7.797. For a different time between arrivals, these phase rates need to be scaled up or down by multiplying each rate by the ratio 7.797 / Ta where Ta is the desired mean time between arrivals, i.e., the inverse of the desired rate of request arrivals.
Performance Evaluation of a Single Node with General Arrivals and Service
97
Table 1. Pareto-like distribution for the time between arrivals used in Section 3 Probabilities 1.39201642e-004
Phase rate 1.49162788e+001
1.77752368e-004
1.34254874e+001
1.91426701e-005
1.06568964e+001
3.45978796e-005
9.00035659e+000
4.75808142e-005
7.61426145e+000
1.99877132e-005
4.77130864e+000
7.26038667e-005
3.75562889e+000
1.39327654e-004
2.37959901e+000
6.32355379e-002
1.97633786e+000
2.83641569e-001
1.76580558e+000
2.00491113e-006
2.23396046e-005
3.08716391e-005
1.69138281e-004
4.11347558e-004
9.82050775e-004
5.33726475e-003
5.48273618e-003
6.52276871e-002
3.01135332e-002
5.81463522e-001
1.55607459e-001
C. Parameters of the Three-Phase Distribution of Example 1
The parameters of this distribution (see Fig. 7) have been selected [6] so that its three first moments (or, equivalently, its mean, variance and skewness) match those of a mix of three packet sizes (50 bytes, 500 bytes and 1500 bytes) transmitted on a 2.5 Gb/s link. The resulting distribution has a mean of 1, coefficient of variation of 1.41, and skewness of 1.84. Table 2. Distribution for the service time used in Section 3
σ1 σ3
Probabilities 4.7162e-001
1 − σ1 q12 ,q 23 = qˆ 3 = 1
μ1 μ2 μ3
Phase rate 9.8864504e-001 9.8864504e-001 2.2820616e+001
Fig. 6. Structure of the service time distribution in first example
D. Equations for the Case of Blocked Arrivals
In cases where the source of requests is regulated by acknowledgments from the receiver, one can view the source as becoming blocked when the buffer at the receiver
98
A. Brandwajn and T. Begin
is at capacity. In such a case, the state equations given in Section 2 need to be modified for the values of n = N −1 and n = N . These modified equations lead to the following changes in the iterative scheme • for n = N −1 p ( k ) ( j, i | N − 1) ← A ( k ) ( j, i, N − 1) + B ( k ) ( j, i, N − 1) + u ( k −1) ( N − 1)C ( k ) ( j, i, N − 1) + α ( k −1) ( N − 1) E ( k −1) ( j, i, N − 1) where
E ( k ) ( j, i, N − 1) =
σ iτ j b ( k ) (k ) ∑ p (l | N ) μl qˆl / u ( N ) . Note that (λ j + μi ) l =1
p(i | N )
denotes the probability of the service process being in its stage i, i = 1,..., b given that the buffer is at capacity and the source is blocked. • for n = N p ( k ) (i | N ) ←
1
μi
i −1
a
l =1
j =1
[∑ p ( k ) (l | N )μ l qli + u ( k −1) ( N )∑ p ( k ) ( j , i | N − 1)λ j rˆj / α ( k ) ( N − 1)]
For all other values of n , the iteration proceeds as outlined in Appendix A. Note that, with blocked arrivals, we have α ( N ) = 0 , i.e., there are no packets lost. The fraction of time during which the arrivals are blocked is given by p(N ). E. Accuracy of Discrete-Event Simulation with Heavy-Tailed Distributions
In Fig. 7 we show the simulation results for 3 different simulation runs whose lengths range from 700 thousand to 70 million packets generated. Interestingly, increasing the length of the simulation does not necessarily reduce the relative error. In our example, for a larger buffer size, the latter can exceed 20% with 7 million packets generated.
Fig. 7. Relative error for loss probability of simulation vs. exact results as a function of buffer size
Tandem Queueing System with Different Types of Customers Valentina Klimenok1 , Che Soong Kim2 , and Alexander Dudin1 1
Department of Applied Mathematics and Computer Science Belarusian State University Minsk 220030, Belarus {klimenok,dudin}@bsu.by 2 Department of Industrial Engineering Sangji University Wonju, Kangwon, Korea 220-702 [email protected]
Abstract. A dual tandem consisting of multi-server queueing systems without buffers is considered. Customers of two types arrive to Station 1 in the M M AP (Marked Markovian Arrival Process). The first type customers aim to be served at Station 1 only while the second type customers should be served at both stations. The stationary distribution of the system states and the main performance measures of the tandem queue under consideration are calculated. Illustrative numerical examples are presented. Keywords: Tandem queueing model, heterogeneous customers, stationary state distribution, optimization.
1
Introduction
Consideration of the particular kind of a tandem queueing model in this paper is motivated by its practical importance when the optimal topology, technology, hardware and software of an office local area network with restricted access to an external network (e.g., Internet) should be designed. It is assumed that possibly a part of users (officers) will be granted access to the external network while the rest of users can work only with local resources. Authorized officers intended to start access to the external network should first go through the local recourses to reach the router to the external network. Sometimes, the use of external network is quite expensive. So, important problem is to properly match architecture of the local network to the rate (bandwidth) of access to the external network. The lack of this rate and the absence of control by the access of the users of the local network to the bandwidth can cause congestion in the network. The excessive bandwidth rate and too strict restriction of access of users of the local network to the external network leads to poor utilization of the bandwidth while it can be rather expensive. The model considered in this paper can be helpful in solution of this problem. Aiming to better accounting the possible activity of both types of customers K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 99–112, 2011. c Springer-Verlag Berlin Heidelberg 2011
100
V. Klimenok, C.S. Kim, and A. Dudin
we assume quite general models of the heterogeneous arrival process and service time distribution. Literature relating to multi-server tandem queues is not rich. As the recent paper worth to mentioning we can refer to [3]. The rest of the text is organized as follows. In section 2, the mathematical model is described. In section 3, we describe the multi-dimensional Markov chain defining behavior of the queueing model under study and present the generator of this chain. Algorithm for computing the steady state distribution of the system states is presented in section 4. Some important performance measures of the system are given in section 5. Section 6 contains some numerical results and section 7 concludes the paper.
2
Model Description
We consider a tandem queueing system consisting of two stations in series. Station 1 is represented by the N -server queue without a buffer. The input flow at this station consists of two types of customers which arrive in the correlated flow described as M M AP (Marked Markovian Arrival Process). The first type customers aim to be served at Station 1 only while the second type customers should be served at both stations. Arrival of customers in the M M AP is directed by the underlying random process νt , t ≥ 0. The process νt , t ≥ 0, is an irreducible continuous time Markov chain with state space {0, 1, ..., W }. The sojourn time of this chain in state ν is exponentially distributed with the positive finite parameter λν . When the sojourn time in the state ν ex(0) pires, with probability pν,ν the process νt jumps into the state ν without generation of customers, ν, ν ∈ {0, . . . , W }, ν = ν , and with probability pν,ν the process νt jumps into the state ν with generation of a customer of type r, r = 1, 2, ν, ν ∈ {0, . . . , W }. The behavior of the M M AP is completely characterized by the matrices (r) D0 , Dr , r = 1, 2, defined by their entries (Dr )ν,ν = λν pν,ν , ν, ν ∈ {0, . . . , W }, r = 1, 2, and (D0 )ν,ν = −λν , ν ∈ {0, . . . , W }, (r)
(D0 )ν,ν = λν p(0) , ν, ν ∈ {0, . . . , W }, ν = ν . ν,ν The matrix D(1) = D0 + D1 + D2 is the generator of the process νt , t ≥ 0. The fundamental arrival rate λ is defined by λ = θ(D1 + D2 )e where θ is the row vector of a stationary probabilities of the Markov chain νt , t ≥ 0. The vector θ is the unique solution to the system θD(1) = 0, θe = 1. Here and in the sequel e is the column-vector of appropriate size consisting of 1’s and 0 is the row-vector of appropriate size consisting of zeros.
Tandem Queueing System with Different Types of Customers
101
The arrival rate λr of the type r customers, is defined by λr = θ Dr e, r = 1, 2. (r) The coefficient of variation cvar of inter-arrival times for the type r customers is given by 2 c(r) = 2λr θ(−D0 − Dr¯)−1 e − 1, r, r = 1, 2, r¯ = r. var (r)
The coefficient of correlation ccor of two successive intervals between type r customers arrival is computed by 2
−1 c(r) Dr (D0 + Dr¯)−1 e − 1]/c(r) ¯ = r. cor = [θλr (D0 + Dr¯) var , r
The coefficient of variation, cvar , of intervals between successive arrivals is defined by c2var = 2λθ(−D0 )−1 e − 1. The coefficient of correlation ccor of the successive intervals between arrivals is given by ccor = (λθ(−D0 )−1 (D(1) − D0 )(−D0 )−1 e − 1)/c2var . For more information about the M M AP see, e.g., [2]. Assumption that the arrival process of customers of two types is defined by the M M AP instead of the model with more simple two independent stationary Poisson arrival processes allows to effectively take into account different variance of inter-arrival times and possible correlation of successive inter-arrival times of customers of the same type and cross-correlation between two types. If an arriving customer of any type sees all servers of Station 1 busy it leaves the system. Otherwise the customer occupies any idle server and its service starts immediately. Service time is assumed to be exponentially distributed with parameter μr depending on the type r of the customer, r = 1, 2. After the service completion, the customer of type 2 leaves the system forever while the customer of type 1 proceeds to Station 2. Station 2 is represented by R -server queue without a buffer. If a customer proceeding from Station 1 finds an idle server his (her) service is started immediately. In the opposite case this customer is lost. Service time at Station 2 is exponentially distributed with parameter γ. The structure of the system is presented in Figure 1. Our aim is to calculate the steady state distribution of the system states and the main performance measures of the system. The obtained results are used to solve numerically the problem of optimal choice of the number of servers at Station 1 and Station 2.
3
Process of the System States
The process of the system states is described in terms of the irreducible multidimensional continuous-time Markov chain ξt = {it , rt , nt , νt }, t ≥ 0, where it is the number of busy servers at Station 1; rt is the number of busy servers at Station 2, nt is the number of servers of Station 1 performing the service of
102
V. Klimenok, C.S. Kim, and A. Dudin
Fig. 1. The structure of the system
customers of type 1, νt is the state of the M M AP underlying process at time t, it ∈ {0, . . . , N }; rt ∈ {0, . . . , R}; nt ∈ {0, . . . , it }; νt ∈ {0, . . . , W }. Let us enumerate the states of the Markov chain ξt , t ≥ 0, in lexicographic order. The matrices Qi,l , i, l ∈ {0, . . . , N }, contain the transition rates from the states having the value i of the component it to the states having the value l of this component. Lemma 1. Infinitesimal generator A of the Markov chain ξt , t ≥ 0, has the following block structure: ⎞ ⎛ 0 0 Q0,0 Q0,1 0 . . . ⎜ Q1,0 Q1,1 Q1,2 . . . 0 0 ⎟ ⎟ ⎜ ⎜ .. .. .. ⎟ .. .. . . ⎝ . . . . . . ⎠ 0 ⎛
where Q0,0
0
0
D0 0 ⎜ γI D0 − γI ⎜ =⎜ . .. ⎝ .. . 0 0
. . . QN,N −1 QN,N ⎞ ... 0 0 ⎟ ... 0 0 ⎟ ⎟, .. .. .. ⎠ . . . 0 . . . RγI D0 − RγI 0 0 .. .
and the matrices Qi,j , i+j = 0, of size (R+1)(i+1)(W +1)×(R+1)(j+1)(W +1) are represented in the block form Qi,j = (Qi,j (r, r ))r,r ∈{0,...,R} where the non-zero blocks (Qi,j (r, r ) are defined as follows: ⎞ ⎛ iμ2 0 0 ... 0 ⎜ 0 (i − 1)μ2 0 ... 0 ⎟ ⎟ ⎜ ⎜ 0 0 (i − 2)μ2 . . . 0 ⎟ ⎟ ⎜ ⊗ IW +1 , Qi,i−1 (r, r) = ⎜ . .. .. . . .. ⎟ ⎟ ⎜ .. . . . . ⎟ ⎜ ⎝ 0 0 0 . . . μ2 ⎠ 0 0 0 ... 0
Tandem Queueing System with Different Types of Customers
103
i ∈ {1, . . . , N }, r ∈ {0, . . . , R − 1}, ⎛
0 iμ2 ⎜ μ1 (i − 1)μ2 ⎜ ⎜ .. Qi,i−1 (R, R) = ⎜ ... . ⎜ ⎝ 0 0 0 0 ⎛
0 ⎜ μ1 ⎜ ⎜ Qi,i−1 (r, r+1) = ⎜ 0 ⎜ .. ⎝ . 0
0 0 2μ1 .. .
0 0 0 .. .
... ... ... .. .
... ... .. .
0 0 .. .
0 0 .. .
⎞
⎟ ⎟ ⎟ ⎟ ⊗ IW +1 , i ∈ {1, . . . , N }, ⎟ . . . (i − 1)μ1 μ2 ⎠ ... 0 iμ1
0 0 0 .. .
⎞ ⎟ ⎟ ⎟ ⎟⊗IW +1 , i ∈ {1, . . . , N }, r ∈ {0, . . . , R−1}, ⎟ ⎠
0 0 . . . iμ1
Qi,i (r, r − 1) = rγI(i+1)(W +1) , i ∈ {1, . . . , N }, r ∈ {1, . . . , R},
Qi,i (r, r) = Ii+1 ⊗ (D0 + δi,N D1 ) − diag{nμ1 + (i − n)μ2 , n = 0, . . . , i} ⊗ IW +1 −Qi,i (r, r − 1), i ∈ {1, . . . , N }, r ∈ {0, . . . , R}, ⎛
D2 ⎜ 0 ⎜ Qi,i+1 (r, r) = ⎜ . ⎝ .. 0
D1 D2 .. .
0 ... D1 . . . .. . . . . 0 0 ...
0 0 .. .
0 0 .. .
⎞ ⎟ ⎟ ⎟ , i ∈ {0, . . . , N − 1}, r ∈ {1, . . . , R}. ⎠
D2 D1
Here ⊗ is a symbol of Kronecher’s product of matrices, see, e.g., [1]; δi,N is equal to 1 if i = N and is equal to 0 otherwise, diag{nμ1 + (i − n)μ2 , n = 0, . . . , i} stands for the diagonal matrix defined by the diagonal entries listed in the brackets. Proof of the lemma is implemented by analyzing the intensities of transition of the multi-dimensional Markov chain ξt , t ≥ 0.
4
Stationary Distribution
Because the four-dimensional Markov chain ξt = {it, rt , nt , νt }, t ≥ 0, is an irreducible and regular and has the finite state space, the following limits (stationary probabilities) exist for any set of the system parameters: p(i, r, n, ν) = lim P {it = i, rt = r, nt = n, νt = t}, t→∞
104
V. Klimenok, C.S. Kim, and A. Dudin
it ∈ {0, . . . , N }; rt ∈ {0, . . . , R}; nt ∈ {0, . . . , it }; νt ∈ {0, . . . , W }. Let us enumerate the probabilities corresponding the value i of the first component in lexicographic order and form from these probabilities the row vectors pi , i ∈ {0, . . . , N }. These vectors satisfy the following Chapman-Kolmogorov’s equations (equilibrium equations) ⎧ N ⎪ ⎪ pi Qi,j = 0, j ∈ {0, . . . , N }, ⎨ i=0 (1) N ⎪ ⎪ ⎩ pi e = 1. i=0
The rank of the system is equal to (N + 1)(N + 2)(R + 1)(W + 1)/2) and can be very large. E.g., in case N = 10, R = 2, W = 1 the rank is equal to 396, in case N = 20, R = 2, W = 1 it is equal to 2310, in case N = 30, R = 2, W = 1 it is equal to 6944 etc. Thus, the direct solution of system (1) can be time and resource consuming. In the case when at least one of values N, R, W is large, the numerically stable algorithm based on probabilistic meaning of the matrix Q can be applied (see [4]). This algorithm is given by the following assertion. Theorem 1. The stationary probability vectors pi , i ∈ {0, . . . , N }, are computed by pl = p0 Fl , l = 1, . . . , N, where the matrices Fl are computed recurrently: F0 = I, Fi = −Fi−1 Qi−1,i (Qi,i + (1 − δi,N )Qi,i+1 Gi )−1 , i = 1, . . . , N, the matrices Gi , i = 0, N − 1, are computed from the backward recursion: Gi = −(Qi+1,i+1 + Qi+1,i+2 Gi+1 )−1 Qi+1,i , i = N − 2, N − 3, . . . , 0, with the terminal condition GN −1 = −(QN,N )−1 QN,N −1, the vector p0 is calculated as the unique solution to the following system of linear algebraic equations: p0 (Q0,0 + Q0,1 G0 ) = 0, p0
N
Fl e = 1.
l=0
Note that all inverse matrices in the theorem statement exist and are nonsingular because the inverted matrices are all sub-generators. The straightforward algorithmic way for calculating the stationary probability vectors pi , i ∈ {0, . . . , N }, given by this theorem well suits for realization on computer.
Tandem Queueing System with Different Types of Customers
5
105
Performance Measures
Having the stationary distribution pi , i ≥ 0, calculated we can find a number of stationary performance measures of the system. Below we give formulas for computing some of them. • Mean number of busy servers at Station 1 (1) Nbusy
=
N
ipi e.
i=1
• Mean number of type 1 customers at Station 1 (1)
Nbusy,1 =
N
pi (eR+1 ⊗ Ii+1 ⊗ eW +1 )diag{0, 1, ..., i}e.
i=1
• Mean number of type 2 customers at Station 1 (1)
(1)
(1)
Nbusy,2 = Nbusy − Nbusy,1 . • Probability that a customer of type k will be lost at Station 1 Ploss,k = λ−1 k pN (e(R+1)(N +1) ⊗ IW +1 )Dk e, k = 1, 2. (1)
• Probability that a customer of type k will be successfully served at Station 1 (1) (1) Psucc,k = 1 − Ploss,k , k = 1, 2. • The rate of input flow at Station 2 (coincides with the rate of output flow of type 1 customers from Station 1) (2)
(1)
λinp = λ1 (1 − Ploss,1 ). • The rate of output flow from Station 2 (2)
λout = γ
N
pi (IR+1 ⊗ e(i+1)(W +1) )diag{0, 1, ..., R}e.
i=0
• Mean number of busy servers at Station 1 (2)
(2)
Nbusy =
λout . γ
• Probability that a customer of type 1 will be lost at Station 2 (2)
(2)
Ploss = 1 −
λout (2)
.
λinp
• Probability that a customer of type 1 will be successfully served at both stations (1)
(2)
Psucc = Psucc,1 (1 − Ploss ).
106
6
V. Klimenok, C.S. Kim, and A. Dudin
Numerical Results
In the numerical experiment, we solve the problem of optimal choice of the number N of servers at Station 1 and the number R of servers at Station 2. We consider the following cost criterion (an average gain per unit time under the steady-state operation of the system) of the system operation: I = c1 λ1 Psucc,1 + c2 λ2 Psucc,2 − aR, where a is the cost of utilization of a server at Station 2 per unit time (maintenance cost), cr is a gain for successful service of each customer of type r, r = 1, 2. Our aim is to find numerically the optimal number R of servers at Station 2 that provides the maximal value to the cost criterion for different number N of servers at Station 1. The input flow to the tandem is described by the M M AP defined by the following matrices: D0 =
−13.49076 0.0000109082 2.2335616667 0.0148965153 , D1 = , 0.0000109082 −0.43891 0.040809 0.032340848633 D2 =
11.1678083333 0.0744825765 . 0.204045 0.161704243167
Intensities of arrival of type-r customers are equal to λ1 = 1.66671 and λ2 = 8.33357, respectively. Coefficient of correlation of two successive inter-arrival times is equal to 0.2. Coefficients of correlation of two successive intervals between arrivals of type-1 and type-2 customers are equal to 0.0425364 and 0.178071, respectively. The service rates of customers at Station 1 are defined by μ1 = 0.5, μ2 = 1. The service rate of customers at Station 2 is γ = 0.1. (1) Let us first illustrate dependence of probability Psucc,1 of successful service (2)
(2)
of type-1 customers at Station-1, probability Psucc,1 = 1 − Ploss of successful service of type-1 customers at Station-2, and probability Psucc,1 of successful service of type-1 customers at both stations. (1) Table 1 contains the values of probability Psucc,1 on the number N of servers at Station 1. Evidently, this probability does not depend on the number R of servers at Station 2. (1)
Table 1. Dependence of probability Psucc,1 on the number N of servers at Station 1
number N of servers 5 10 (1) probability Psucc,1 0.317301 0.599657
15 0.823246 (2)
20 0.9532157
35 0.9999932
Table 2 contains the values of probability Psucc,1 on the number N of servers at Station 1 and the number R of servers at Station 2.
Tandem Queueing System with Different Types of Customers
107
(2)
Table 2. Dependence of probability Psucc,1 of successful service of type-1 customers at Station-2 on and R of servers
N N N N N
R = 1 R = 3 R = 5 R = 8 R = 10 R = 13 R = 17 R = 20 = 5 0.155 0.439 0.675 0.902 0.969 0.997 0.998 0.999 = 10 0.088 0.258 0.418 0.633 0.753 0.887 0.976 0.995 = 15 0.065 0.193 0.317 0.491 0.598 0.739 0.882 0.948 = 20 0.057 0.169 0.277 0.432 0.529 0.662 0.810 0.893 = 35 0.054 0.161 0.265 0.413 0.507 0.636 0.783 0.869
Table 3 contains the values of probability Psucc,1 on the number N of servers at Station 1 and the number R of servers at Station 2. Table 3. Dependence of probability Psucc,1 of successful service of type-1 customers both stations on N and R
N N N N N
R = 1 R = 3 R = 5 R = 8 R = 10 R = 13 R = 17 R = 20 = 5 0.049 0.139 0.214 0.286 0.307 0.316 0.317 0.317 = 10 0.053 0.154 0.251 0.379 0.451 0.532 0.585 0.596 = 15 0.054 0.159 0.261 0.404 0.492 0.609 0.726 0.781 = 20 0.055 0.161 0.264 0.412 0.504 0.631 0.772 0.851 = 35 0.055 0.161 0.265 0.413 0.507 0.636 0.783 0.869
Let now consider optimization problem. Let the values of the cost coefficients c1 , c2 , a are assumed to be as follows: c1 = 15, c2 = 1, a = 1. The value of criterion I as a function of the numbers R and N of servers at Station 2 and Station 1 is presented in Figure 2. 1
,
5
Fig. 2. The cost criterion as a function of the number of servers at Station 1 and Station 2
108
V. Klimenok, C.S. Kim, and A. Dudin IR
10
5
5
10
5
N10
N15 N35
20
N5
N20
15
10
R
Fig. 3. The cost criterion as a function of the number of servers at Station 2 under different number of servers at Station 1 IN
10
5
5
10
R5
R15
5
R1
R10
R20
10
15
20
25
30
35
N
Fig. 4. The cost criterion as a function of the number of servers at Station 1 under different number of servers at Station 2
For better understanding the behavior of cost criterion we present the values of the criterion as function of R under different but fixed values of N in Figure 3 and the values of the criterion as function of N under different but fixed values of R in Figure 4. Table 4 contains the values of cost criterion I for some values of R and N. The optimal values of I as a function of R for different values of N are shown by bold numbers.
Tandem Queueing System with Different Types of Customers
109
Table 4. Dependence of cost criterion I on R and N
N N N N N
R = 1 R = 3 R = 5 R = 8 R = 10 R = 13 R = 17 R = 20 = 5 2.877 3.133 3.001 1.804 0.332 -2.447 -6.423 -9.423 = 10 5.319 5.871 6.274 6.495 6.294 5.308 2.634 -0.080 = 15 7.212 7.851 8.393 8.979 9.178 9.091 8.028 6.3898 = 20 8.306 8.974 9.558 10.249 10.559 10.736 10.268 9.243 = 35 8.699 9.373 9.967 10.681 11.016 11.251 10.922 10.066
Table 5 contains the relative profit provided by the optimal value R∗ of a parameter R comparing to other values of a parameter. This relative profit is calculated by formula I(R∗ ) − I(R) 100%. I(R∗ ) Table 5. Dependence of the relative profit on R and N
N N N N N
R = 1 R = 3 R = 5 R = 8 R = 10 R = 13 R = 17 R = 20 = 5 8.167 0.00 4.193 42.409 89.386 178.10 305.04 400.79 = 10 18.103 9.604 3.399 0.00 3.089 18.268 59.447 101.23 = 15 21.412 14.453 8.551 2.165 0.00 0.943 12.524 30.385 = 20 22.631 16.415 10.976 4.539 1.651 0.00 4.368 13.903 = 35 22.681 16.686 11.407 5.059 2.086 0.00 2.919 10.530
It is seen from Figure 4 and Table 4 that, for each R, the value I(N ) of the gain increases in the beginning and then becomes constant. It is explained by the fact that, for large value of N , all entering customers get service at Station 1 so that the gain from the successful service at this station and the rate of input flow at Station 2 become constant. Since the number R of servers at Station 2 is constant, the gain from the successful service at Station 2 becomes constant too. Thus, the value of total gain does not vary for large N . To illustrate effect of correlation in the arrival process (and justify consideration of the M M AP instead of much simpler stationary Poisson arrival processes, we consider, in addition to the M M AP introduced above and having coefficient of correlation 0.2, two other M M AP s. These M M AP s have the same intensities of customers arrival, but different coefficient of correlation of successive interarrival times. One M M AP is a superposition of two independent stationary Poisson arrival processes with intensities equal to λ1 = 1.66671 and λ2 = 8.33357, respectively. This M M AP has correlation equal to zero. The second M M AP defined by the following matrices: −11.7494 0.0000117494 1.95224333 0.005988 D0 = , D1 = , 0.0000117494 −0.25736 0.033422 0.0094691666 9.76121666 0.02994 D2 = . 0.16711 0.0473458333
110
V. Klimenok, C.S. Kim, and A. Dudin
P1 loss,1 0.6 0.5 0.4
0.3 0.2 0.1
6
8
Ccorr 0
Ccorr 0.1
Ccorr 0.2
10
12
14
16
18
20
Λ
(1)
Fig. 5. Dependence of probability Psucc,1 of successful service of type-1 customers at Station-1 on the average arrival rate λ P2 loss 0.7
0.6
0.5
0.4 0.3
Ccorr 0
Ccorr 0.1
Ccorr 0.2
0.2 0.1
6
8
10
12
14
16
18
20
Λ
(2)
Fig. 6. Dependence of probability Ploss of successful service of type-1 customers at Station-2 on the average arrival rate λ
Coefficient of correlation of two successive inter-arrival times is equal to 0.1. Coefficients of correlation of two successive intervals between arrivals of type-1 and type-2 customers are equal to 0.0154306, 0.0853564, respectively. (1) Figures 5 and 6 show dependence of probabilities Psucc,1 of successful service (2)
of type-1 customers at Station-1 and Ploss of successful service of type-1 customers at Station-2 on the average arrival rate λ. This rate is varied by means of multiplying the matrices Dk , k = 0, 1, 2, by a scalar.
Tandem Queueing System with Different Types of Customers
111 (1)
It is evidently seen from Figures 5 and 6, that the value of probabilities Ploss,1 (2) Ploss
and essentially depend on correlation in arrival process. It is interesting to (1) observe that probability Ploss,1 of a customer loss at Station-1 increases when (2)
correlation in the arrival process grows, while probability Ploss decreases. Explanation of this fact is as follows. Higher correlation in arrival process implies more bursty arrival of customers. There are time intervals when arrivals occur frequently and loss probability is high. So, higher correlation implies bigger value (1) of probability Ploss,1 . This implies that the arrival flow to Station 2 has smaller intensity, so loss probability at this Station is smaller.
7
Conclusion
We have analyzed the tandem queue with two stations defined by the multiserver queues without buffers where a part of arriving customers are served only at Station 1 while the others have to be served at both stations. Optimization problem is considered and solved. Cost criterion includes the gain of the system obtained from the service of customers and the maintenance cost of the servers at Station 2. The obtained results can be applied for optimization of the structure of an office computer network with partial access of officers to the external network. Results can be extended to the case of more general so called P H - phase type distribution of the service times, see, e.g., [5]. However computer realization in this case becomes much more time consuming due to the essential increase of the state space of the Markov chain under study that will additionally include components indicating the current phases of the service at each busy server or the number of servers at each phase of service of two types of customers at Station 1 and service at Station 2. The results can be also extended to the case when not only the number of servers at both stations should be optimized, but additionally the share of customers, which are permitted to go to Station 2 after the service at Station 1, is a subject of optimization.
Acknowledgements This research was supported by Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education, Science and Technology (Grant No. 2010-0003269).
References 1. Graham, A.: Kronecker Products and Matrix Calculus with Applications. Ellis Horwood, Cichester (1981) 2. He, Q.M.: Queues with marked customers. Advances in Applied Probability 28, 567–587 (1996)
112
V. Klimenok, C.S. Kim, and A. Dudin
3. Kim, C.S., Dudin, S.: Priority tandem queueing model with admission control. Computers and Industrial Engineering 60 (2011), doi:10.1016/j.cie.2011.03.003 4. Klimenok, V., Kim, C.S., Orlovsky, D., Dudin, A.: Lack of invariant property of Erlang loss model in case of the MAP input. Queueing Systems 49, 187–213 (2005) 5. Neuts, M.: Matrix-Geometric Solutions in Stochastic Models - An Algorithmic Approach. Johns Hopkins University Press, Baltimore (1981)
Fast Evaluation of Appointment Schedules for Outpatients in Health Care S. De Vuyst, H. Bruneel, and D. Fiems SMACS Research Group, Department of Telecommunications and Information Processing, Ghent University, Sint-Pietersnieuwstraat 41, 9000 Gent, Belgium {sdv,hb,df}@telin.ugent.be
Abstract. We consider the problem of evaluating an appointment schedule for outpatients in a hospital. Given a fixed-length session during which a physician sees K patients, each patient has to be given an appointment time during this session in advance. When a patient arrives on its appointment, the consultations of the previous patients are either already finished or are still going on, which respectively means that the physician has been standing idle or that the patient has to wait, both of which are undesirable. Optimising a schedule according to performance criteria such as patient waiting times, physician idle times, session overtime, etc. usually requires a heuristic search method involving a huge number of repeated schedule evaluations. Hence, the aim of our evaluation approach is to obtain accurate predictions as fast as possible, i.e. at a very low computational cost. This is achieved by (1) using Lindley’s recursion to allow for explicit expressions and (2) choosing a discretetime (slotted) setting to make those expression easy to compute. We assume general, possibly distinct, distributions for the patient’s consultation times, which allows us to account for multiple treatment types, as well as patient no-shows. The moments of waiting and idle times are obtained. For each slot, we also calculate the moments of waiting and idle time of an additional patient, should it be appointed to that slot. As we demonstrate, a graphical representation of these quantities can be used to assist a sequential scheduling strategy, as often used in practice.
1
Introduction
1.1
Situation
Because of its social and economic interest, the question of how to schedule a hospital’s outpatients into the consultation session of a physician has received a lot of attention over the last sixty years. Many studies are motivated from a specific practical situation and aim at improving the organisational procedures in a particular (part of a) hospital [2,11,19,23]. Clearly, practical settings considerably differ in terms of medical practice, organisation, regulations, administrative demands or limitations, preferences of patients or medical staff, management issues, etc. However, very often the underlying problem is largely the same and
SMACS: Stochastic Modeling and Analysis of Communication Systems.
K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 113–131, 2011. c Springer-Verlag Berlin Heidelberg 2011
114
S. De Vuyst, H. Bruneel, and D. Fiems
can be formulated as follows. Consider the practice of a physician who consults patients during a time interval of a certain length called a session, for example a 4-hour session from 8am to 12am every week day. The physician is assisted by a nurse or secretary at the administration desk who is responsible for taking the calls of patients who wish to see the physician during the session of a particular day. The administrator must decide whether a calling patient can be admitted to that session and if so, at what time during the session the patient should arrive, i.e. what is his appointment time. All appointments are fixed before the session starts. The physician arrives at some point during the session, which is not necessarily the beginning. Given the session lengths and the number of patients, a ‘schedule’ consists of both the patient’s appointment times and the physician’s arrival time. How a session evolves depends on its schedule. Since patients are consulted one by one in their appointed order, the patients in the waiting room behave as a FIFO (First-In First-Out) queueing system with the physician as service facility. The time required to serve a single patient is the consultation time, comprising all actions by the physician devoted only to that patient such as examination, looking up test results, giving advice, writing prescriptions, updating files, discussions, etc. It is clear that prior to the session, consultation times are known stochastically only and can be assumed independent. The arrival process on the other hand is not stochastic but consists of scheduled patient arrivals at deterministic time points. Hence, evaluating a session amounts to the study of a queueing system conditioned on a certain sample path for the arrivals. In fact, queueing systems with scheduled arrivals are known as appointment systems [12]. A patient arriving to the session at its appointed time can encounter two possible situations: either the physician has finished the consultations of previous patients or he has not. In the former case the physician has been without work, wasting time, since the departure of the last patient, whereas in the latter case it is the new patient who has to wait. As such, for each appointment there is either an idle time for the physician or a waiting time for the patient. As long as there is uncertainty on the consultation times when making the schedule it is impossible to avoid both idle and waiting times, although they can be controlled to a large extent by the schedule. Note that there is an ‘obvious’ trade-off. Scheduling appointments far apart results in low waiting times but long idle times and vice versa if the appointments are close together. The same consideration can be made at the end of the session: if the physician has finished all consultations before the end of the session, there is an undertime, whereas otherwise he has to work overtime. Again, session undertime and overtime are antagonistic and to some extent controllable by the schedule. 1.2
Modelling Issues
Depending on the specific situation, there are several so-called environmental factors that can make modelling the appointment systems considerably more complex, see [5] for an elaborate discussion. Patients may show up during the session that have no appointment (‘walk-ins’) but have to be seen by the physician
Fast Appointment Scheduling
115
anyway, either immediately (emergencies), in between regular patients or at the end of the session. Conversely, some patients that have an appointment do not show up for their consultation (‘no-shows’) or cancel the appointment too late. The no-show probability in some cases is up to 30%, depending on the type of health care offered and the patient population [10,15,21]. Clearly, walk-ins and no-shows contribute significantly to respectively the waiting and idle times of the schedule and to its overall uncertainty. Additionally, patients are not always punctual, for example arriving to the session later or sooner than they are supposed to. According to [1] the difference between appointed and actual arrival time is best modelled by an asymmetric Johnson distribution. Depending on the particularities of the used waiting-room policy, unpunctuality can result in overtaking of patients so that the original order of consultations is no longer maintained. With regard to scheduling, a complicating factor is also the fact that many patients have particular constraints concerning their appointment time. It is reported that as much as 25% of the calling patients [20] ask to be given an appointment in a certain subset of the session. As to which distribution is suitable for modelling patient consultation times, several propositions have been made. Originally [4,3] Gamma distributions were used, also preferred in e.g. [7]. Other proposed distributions are Cox-type [22], lognormal [6], Weibull [2], uniform and/or exponential [12,13,14,17] and even deterministic consultations [10]. However, patients may also be considered heterogeneous, i.e. have different consultation time distributions. Unlike walk-ins and no-shows, heterogeneity can reduce schedule uncertainty if properly taken into account. For each calling patient, the administration can estimate the required consultation time distribution based on the person’s characteristics (age, medical record) and required type of medical treatment (medical scans, surgical procedures, inoculations, revalidation therapy, in-takes, discussion of test results, etc.). 1.3
Schedule Optimalisation
Constructing a schedule is targeted at striking an equitable trade-off between several performance criteria of the schedule such as waiting times of the subsequent patients, physician idle times, session overtime and undertime. Also, more subtle performance issues have been considered to be of importance, such as fairness (uniformity of patient waiting times), the number of patients seen in a session, the degree in which patient constraints can be met, etc. In general, it is not possible to construct the optimal schedule from the desired objective directly. Instead, a search method is required such as sequential quadratic programming [12], modified conjugate direction methods [22], stochastic linear programming [9] or local search methods [14]. These methods all basically work in the same way: take some initial schedule, evaluate it and based on its performance and the objective function try to improve it. Then do the same with the new schedule and so on until it is decided that no more significant improvements can be made. Unfortunately, only in some specific cases can convexity be proven, see e.g. [14]. In any case, since optimalisation requires a huge number of evaluations, it is very important to use an evaluation method that is both accurate and fast.
116
S. De Vuyst, H. Bruneel, and D. Fiems
Concerning optimalisation however, a distinction needs to made between two possible ways of deciding the schedule. In many practical situations, sequential scheduling is employed where the schedule is built gradually over time, fixing the appointment for each patient immediately when they call in, until the session is full. With advance scheduling on the other hand, the appointment times are optimised for all patients at the same time, which is a much more complex task but can lead to better schedules. Most studies impose certain limitations on the way appointments can be made and on how a session is organised, either to assure tractability of the evaluation method, reduce the search space or to make practical implementation easier. For example, often a session is be divided in blocks (possibly of different length) such that patients can only arrive at the start of a block, see e.g. [7,18,20]. Several scheduling ‘rules’ have been proposed to determine suitable appointment times for the patients, many of which are summarised in [5]. These rules differ e.g. in the prescribed number of patients in subsequent blocks, initial block size, the length of the intervals between the blocks (either fixed or variable), and so on. In [3] Bailey’s recommendation was to have the intervals be equal to the expected consultation time and let the physician start with the second patient. This is now known as ‘Bailey’s rule’ and was aimed at an equitable minimization of both patient waiting and physician idle times. More advanced rules exploit knowledge about patient heterogeneity, i.e. the fact that they have different known consultation time distributions. In [6] for example, a distinction is made between long and short consultations corresponding to ‘new’ and ‘return’ patients respectively. In [13] it is shown that it is beneficial to increase the intervals proportional to the standard deviation of each consultation time. Additionally, it is generally better to schedule consultations with low variance early in the session, see [20]. 1.4
Discrete-Time Model and Assumptions
In this paper, we propose an analytic schedule evaluation method based on the recursive Lindley relation [16] in queueing theory. Our primary aim is to obtain expressions for the moments of the schedule’s performance criteria having very low computational complexity. Key to our approach is the discrete-time setting. That is, not only the session but also all time-related quantities in the model, such as waiting and idle times, are discretised into fixed-length intervals (slots) of length Δ. A suitable choice of Δ follows from a trade-off: whereas using small slots ensures a maximal accuracy of the performance predictions, choosing large slots results in a lower computational effort. In the envisaged medical context of appointments for outpatients, a practical time granularity is probably in the order of Δ = 1 minute, as it does not make sense to give people an appointment time with greater accuracy than this. More importantly however, any quantitative description of the consultation time of a patient or of a certain treatment type will rarely require a time granularity smaller than one minute. That is, in as far as the distribution of the anticipated consultation time S is not already made available as discrete data (a histogram), its distribution function can be quantised as
Fast Appointment Scheduling
1 1 s(n) = Prob[S < (n+ )Δ] − Prob[S < (n− )Δ] , n 0 , 2 2
117
(1)
into the probability mass function (pmf) of a discrete random variable. Assuming that time is discrete simplifies the analysis considerably, since the integrals over finite intervals that follow from a continuous-time transient queueing analysis (see e.g. [7]) are replaced by finite sums. On the other hand, the discrete-time setting hardly compromises accuracy if the slot length Δ is chosen sufficiently small. In our analysis, no assumptions are made on the consultation times of the patients other than that their pmf (1) is known and that they are independent. The fact that each patient can have a different consultation pmf allows us to evaluate schedules containing heterogeneous patients, which is important when making tight schedules with low cost. It is clear that the better the consultation time of a patient can be estimated beforehand, i.e. the smaller Var[S], the better the performance of the optimal schedule will be. For example, almost nothing can be assumed about a new patient seeing the physician for the first time, so a high-variance distribution of S must be assumed. For a patient only needing a prescription for a diagnosed chronic affliction however, the consultation time is almost deterministic. In appointment scheduling, there is much to be gained from a well-considered estimation of the anticipated consultation time of each particular patient. Therefore, the administrator is challenged to use as much advance knowledge about the patient as possible in order to maximally reduce the uncertainty on S. This can for example be done based on the patient’s medical history, on time measurements of previous consultations or simply by asking the patient some questions when he calls for an appointment. We assume that all patients and the physician are punctual, arriving precisely when scheduled. Although patient lateness is excluded in our model, no-shows and even emergencies or other physician unavailabilities can be incorporated to some extent. Specifically, if a patient with consultation time pmf s(n) is likely not to show up for his appointment with probability p, his ‘effective’ consultation time has pmf p + (1 − p)s(0) , n = 0 , sno-show (n) = (2) (1 − p)s(n) , n > 0. Likewise, if there is a probability q that a consultation with pmf s(n) will be interrupted by an emergency taking a length of time with pmf u(n), then the altered pmf is semergency(n) = (1 − q)s(n) + q(s ∗ u)(n) ,
n 0,
(3)
where ∗ denotes the discrete convolution. Finally, the physician doesn’t necessarily start seeing patients at the start of the session. To anticipate no-shows or lateness of the first few patients, the physician’s arrival may be scheduled later in the session.
118
2 2.1
S. De Vuyst, H. Bruneel, and D. Fiems
Evaluation of an Appointment Schedule Model Description
Consider a consultation session of a physician spanning a time period [0, tmax ] in which K patients are given an appointment. Let τk denote the appointment time of the kth patient (0 τ1 τ2 . . . τK tmax ) and let θ (0 θ tmax ) be the arrival time of the physician. All patients are assumed to be punctual and their consultation times constitute a sequence of independent random variables, denoted by Sk , 1 k K. As already motivated, we assume time to be a discrete dimension where events can only happen at slot boundaries. Therefore, all time related measures are expressed as integer multiples of the slot length Δ. That is, the session length tmax , the physician arrival time θ and the appointment times τk are given as discrete values and the consultation times Sk have a discrete distribution with pmf sk (n) = Prob[Sk = n] which may be obtained from (1) or otherwise available. We denote by μk and σk2 respectively the mean and variance of the kth patient’s consultation time. A specific appointment schedule thus consists of the session length tmax , the physician arrival time θ, the number of patients K, their appointment times τk and the consultation time distributions sk (n). Such a schedule can be evaluated in terms various criteria, among which the patient waiting time and the physician idle time are probably the most important. The waiting time Wk of the kth patient in the schedule is the time between its appointed arrival time and the effective start of its consultation. By the idle time Ik we mean the period before the arrival of patient k in which the physician has nothing to do because the consultation of patient k − 1 is already finished. Usually, for decision-making or optimalisation it is sufficient to predict the mean and the variance of these distributions, which can be calculated very efficiently as we demonstrate. We denote the interarrival time between consecutive patients by ak = τk+1 −τk for k = 1, 2, . . . , K, where it is agreed that τK+1 = tmax indicates the end of the session. Hence, aK is the time between the last appointment and the end of the session. We can also interpret τK+1 = tmax as the arrival time of an additional virtual patient at the end of the session. This is useful, since the waiting time of this virtual patient equals the session overtime X, i.e. the excess time beyond the scheduled end of the session that the physician requires to see all K patients. Clearly, the overtime X = WK+1 is an important criterium for the performance of the schedule as well. 2.2
Analysis
If we define the auxiliary variable Qk = Wk + Sk − ak ,
(4)
for k = 1, . . . , K, then the well-known Lindley equation in queueing theory [16] relates the waiting and idle times of consecutive patients as Wk+1 = (Qk )+ ,
and Ik+1 = (−Qk )+ ,
(5)
Fast Appointment Scheduling
119
where (·)+ is a shorthand notation for max(·, 0). Note that Wk+1 and Ik+1 cannot both be positive at the same time, although Wk+1 = Ik+1 = Qk = 0 may occur when the consultation of patient k finishes exactly in the slot before the arrival of patient k+1. For further calculations, we distinguish between the case Qk = −Ik+1 0 where patient k +1 can be seen immediately and the case Qk = Wk+1 > 0 where this patient has to wait. In particular, the probability mass function wk+1 (n) = Prob[Wk+1 = n], n 0 of the (k +1)th waiting time can be related to that of the previous patient using (5). We find wk+1 (0) = wk+1 (n) =
ak a k −m
sk (m)wk (n) ,
m=0 n=0 n+a k
sk (m)wk (n−m+ak ) ,
(6) n>0 ,
m=0
where we exploited the fact that the waiting time of a patient and his consultation time are independent. These probabilities are easy to calculate due to the discrete-time modelling. The first patient is scheduled either before or after the physician’s arrival, and has deterministic waiting and idle times respectively given by (7) W1 = (τ1 − θ)+ , and I1 = (θ − τ1 )+ . Hence, the pmf w1 (n) is immediately given and the relations (6) allow us to calculate wk (n) recursively for all n and k, as far as necessary. In principle, if the consultation times are bounded, it is possible to calculate the complete probability mass function of the waiting times from which moments can be determined. Such an approach however, is computationally demanding and not applicable if consultation times have unbounded support. Nevertheless, calculation of the probabilities (6) can be partially avoided as long as only the moments of waiting and idle times are required. For example, again by (4)–(5), the mean waiting times of subsequently scheduled patients are related as E[Wk+1 ] = E[Q+ k ] = E[Qk {Qk > 0}] = E[Qk ] − E[Qk {Qk 0}] = E[Wk ] + μk − ak + ¯k ,
(8)
for k = 1, . . . , K and where ¯k is the finite sum, ¯k =
ak a k −m (ak −n−m)sk (m)wk (n) .
(9)
m=0 n=0
In a similar way, we obtain for the waiting time variances Var[Wk+1 ] = Var[Wk ] + σk2 + ¯2k − 2¯k E[Wk+1 ] − ¯k , with ¯k =
ak a k −m (ak −n−m)2sk (m)wk (n) . m=0 n=0
(10)
(11)
120
S. De Vuyst, H. Bruneel, and D. Fiems
Again, because of (7) we have that E[W1 ] = (τ1 − θ)+ and Var[W1 ] = 0 respectively, such that by (6)–(11) the mean and variance of the waiting times of the patients can be determined recursively for k = 2, . . . , K. It is now also clear that only a finite number of waiting time probabilities need to be calculated by means of (6), even though the consultation times Sk may be stochastically unbounded. Specifically, in accordance with (8)–(9), the calculation of E[X] = E[WK+1 ] requires probabilities wK (0) → wK (aK ), which in turn requires wK−1 (0) → wK−1 (aK +aK−1 ) and so on, until finally for the first patient we need w1 (0) → w1 (tmax −τ1 ). Note that because W1 is deterministic, all probabilities in the latter range are zero, except for one. For the variances of the patient waiting times, the same finite set of probabilities W = {wk (n) : 1 k K, 0 n tmax −τk } .
(12)
is used. This set W is computationally the most demanding part of the schedule’s evaluation, in terms of the required number of floating-point multiplications, given by K 1 FPM(W) = (tmax −τk +2)(tmax −τk +1) , (13) 2 k=1
in the worst case where the consultation times have infinite support. For a session of length tmax with K patients scheduled at equal distances, FPM(W) is Kt2max /6+O(t2max ). The moments of the physician idle times Ik that occur before each patient’s appointment are related to the moments of the waiting times by means of Wk+1 − Ik+1 = Qk ,
and
2 2 Wk+1 + Ik+1 = Q2k ,
(14)
a direct consequence of (5). Hence, for k = 1, . . . , K one finds E[Ik+1 ] = E[Wk+1 ] − E[Wk ] − μk + ak = ¯k ,
(15)
and, since Var[Qk ] = Var[Wk ] + σk2 due to (4), 2 Var[Ik+1 ] = E[Q2k − Wk+1 ] − (E[Wk+1 ] − E[Qk ])2
= Var[Wk ] − Var[Wk+1 ] + σk2 − 2E[Wk+1 ]E[Ik+1 ] = ¯k − ¯2 , k
(16)
which are all known quantities at this point. Recall that X = WK+1 is the session overtime of which mean and variance follows from the algorithm explained above. In the same way, the idle time IK+1 associated with the virtual patient at the end of the session can be interpreted as the session undertime, i.e. the time by which the physician finishes the session early after seeing all K patients. 2.3
Examples
In the following examples, we evaluate some particular schedules with regard to the incurred mean waiting, idle and overtime. We assume a slot length of Δ = 1
Fast Appointment Scheduling 0.08
s(n) = Prob[S = n]
0.06
E[S]
121
a
ˆ s(n) ∼ Γ(20, 50)
0.04 0.02
15
10
0
10
(in minutes)
0
20
30
n
40
50 b
E[Wk ], mean waiting time patient k E[Ik ], mean idle time patient k E[X], mean session overtime tmax = 200
5
0 10
1
2
3
4
5
6
7
8
9
10
k c
tmax = 240 5
0 10
1
2
3
4
5
6
7
8
9
10
k d
tmax = 280 5
0
1
2
3
4
5
6
7
8
9
10
k
Fig. 1. Evaluation of a schedule with K = 10 patients equidistantly spaced in a session of length tmax = 200, 240 and 280 minutes. All patients have the same Γˆ (20, 50) consultation time distribution with the pmf shown in (a). The physician starts θ = 5 minutes after the session starts.
minute. If Γ (μ, σ 2 ) denotes the (continuous) Γ -distribution with mean μ and variance σ 2 , then we refer to the corresponding discrete distribution obtained by (1) as Γˆ (μ, σ 2 ). First, we consider a session with K = 10 patients all having the same consultation time distribution Γˆ (20, 50) of which the pmf is shown in Fig. 1(a). The patients are given appointment times equidistantly spaced in the session, i.e. τk = (k − 1)a with a = tmax /K, while the physician arrives 5 minutes late in the session. The mean performance of this schedule is shown in Fig. 1(b), (c) and (d) in case the spacing a is 20, 24 and 28 minutes respectively. Note that in (b) the time given to each patient is exactly the expected time needed by the patient, i.e. ak = μk . Although one would expect this to be an acceptable strategy, it is clearly not since the waiting times of subsequently scheduled patients increase indefinitely (assuming an infinite session tmax → ∞, K → ∞ and ak = μ kept
122
S. De Vuyst, H. Bruneel, and D. Fiems
0.08
s(n)
0.06
E[S]
a
ˆ s(n) ∼ Γ(20, 100)
0.04 0.02
5
0
10
(in minutes)
0 10
0
n
40
50 b
2
3
4
s(n)
0.04
30
tmax = 240
1
0.06
20
5
6
7
8
E[S]
9
10
k c
ˆ s(n) ∼ Γ(20, 200)
0.02 0 15
0
10
20
30
n
40
50 d
tmax = 240
10
5
0
1
2
3
4
5
6
7
8
9
10
k
Fig. 2. Schedule with tmax = 240, θ = 5 and K = 10 equidistant patients. Compared to Fig. 1(c), the variance of the consultation times is increased to 100 in (a)–(b) and to 200 in (c)–(d).
constant), as already observed in [4]. For long sessions it is therefore necessary to choose a larger spacing, for example as ak = μk + hσk with some parameter h > 0 [8]. Taking the spacing a too large however, as in (d), results in very high physician idle times. In Fig. 2 we illustrate the influence of consultation time variability in another way. We consider again the schedule of Fig. 1(c) where the patients are placed every 24 minutes but now increase the variance σ of the consultation times from σ = 50 to σ = 100 and 200 in Fig. 2(a)–(b) and (c)–(d) respectively, keeping the mean consultation time at 20 minutes. Observe that a highvariance consultation time attributes more uncertainty to the schedule and deteriorates both the mean waiting times and idle times [3,5,13,20]. Moreover, the mean waiting times of subsequent patients in Fig. 2(d) increase towards the end of the session, similar as in Fig. 1(b). Here however, if the session were infinite, the waiting times would converge to a limiting value since ak < μk .
Fast Appointment Scheduling 0.06
s∗ (0) ∼ = 0.15
E[S ∗ ] E[S]
0.02
5
0 (in minutes)
10
0
10
20
E[Wk∗ ]
E[Ik ]
E[Wk ]
E[Ik∗ ]
1
0.06
2
3
30
4
s (0) = 0.15
5
6
7
8
0
10
k c
20
30
n
40
50 d
(in minutes)
5
10
9
ˆ s(n) ∼ Γ(20, 150) s (n), variance 150
0.02
10
50 b
E[S] = E[S ]
0
n
40
tmax = 240
0.04
0
a
ˆ s(n) ∼ Γ(20, 150) s∗ (n), rescaled
0.04
0
123
tmax = 240
1
2
3
4
5
6
7
8
9
10
k
Fig. 3. Schedule with tmax = 240, θ = 5 and K = 10 equidistant patients. Starting from a Γˆ (20, 150) consultation time pmf s(n), we show the effect of adjusting for a no-show probability of 15%. In (a)–(b), the probabilities s(n) are simply rescaled, while in (c)– (d) the shape and scale parameter of the Gamma distribution are adjusted to yield the same mean and variance as for s(n).
In Fig. 3 we illustrate the consequence of no-shows on the schedule’s performance, again assuming tmax = 240, θ = 5 and K = 10 equally spaced patients, i.e. every ak = 24 minutes. The consultation times are all Γˆ (20, 150) distributed. In (a) we show the effective pmf s∗ (n) obtained from rescaling s(n) as in (2) in order to account for a no-show probability p of 15%. Note that the probability mass s∗ (n) ∼ = 0.15 of a zero-length consultation is not shown completely. In (b) the schedule’s performance is shown both in the original case where all patients show up and in case the rescaled pmf s∗ (n) is used. As the mean consultation time drops from E[S] = μk = 20 to E[S ∗ ] = μ∗k = 17 minutes due to the no-shows, the waiting times are lower while the idle times are higher. In Fig. 3(c)–(d) we illustrate that the consultation time distribution may have an influence beyond its first two moments, due to the sums (9) and (11). Here, both S and S ∗ have their mean and variance equal to 20 and 150 respectively, although only S is Γˆ -distributed. The second distribution is obtained by imposing a no-show probability s∗ (0) = p = 15% and choosing a Γˆ -shape for the other mass points s∗ (n), n > 0.
124
3 3.1
S. De Vuyst, H. Bruneel, and D. Fiems
Assisted Sequential Scheduling Cost Function
The ‘quality’ of a schedule depends on the importance attributed to certain aspects of its performance. For example, it is a usual goal to keep the expected patient waiting times as low as possible, but not at the expense of an excessive physician idle time or session overtime. In most situations, to have the physician standing idle for 1 minute is deemed far less desirable than to keep a patient waiting for the same time period. In general, such differences in appreciation can be represented as a function of the performance criteria we have obtained in Section 2. For example, a suitable ‘cost’ function C associated with a particular schedule might be C = f (W , I, E[X], . . .) , (17) where W and I respectively are W =
K 1 E[Wk ] , K
I=
k=1
K 1 E[Ik ] . K k=1
Thus formalised, the ‘best’ or optimal schedule is that which minimises the cost C. Other criteria such as the number of patients K, the physician lateness θ or variances of waiting and idle times can also be taken into account, as well as specific costs related to particular (types of) patients. Clearly, the results obtained by optimalisation studies highly depends on what criteria are effectively considered in (17). For example, C depends only on W and I in [3,17,20,13], on W and the mean effective session duration τK +E[WK ] in [22,12], and on W , I, E[X] in [6,14]. 3.2
Sequential vs. Advance Scheduling
As mentioned earlier, in appointment scheduling for outpatients, two methods can be distinguished. The first method is to fix the appointment immediately when the patient first calls in. This is called sequential scheduling [18,7], because the appointments are fixed one after the other, as the patients call in. Let τ (k) and S(k) be the appointment time and consultation time of the kth calling patient respectively. If the schedule is already fixed for k patients, the decision at which time τ (k +1) to schedule the next calling patient must then be based on the schedule so far, as well as on the distribution of S(k+1). Possibly, some global prospect of the future calling patients can be taken into account as well, in case such information is available or can be estimated. The most straightforward manner of sequential scheduling is to put the first calling patient at the start of the session, the next a short time later, and so on, until the end of the session is reached. This results in 0 τ (1) τ (2) . . . τ (K) tmax ,
(18)
Fast Appointment Scheduling
125
and therefore τ (k) = τk . This is called First-come-first-appointment (FCFA) in [20]. However, one can also decide not to maintain the calling order in the schedule, i.e. τ (k) = τk , and put a new patient before a previously scheduled patient. This can be due e.g. to preference of the involved patient or because of other imposed time constraints. In any case, the problem with scheduling sequentially is that once a patient is assigned an appointment time it cannot be altered afterwards. If in hindsight it turns out that some minor adjustments would result in lower expected cost C, it is impossible to implement this. This problem can be overcome by using a two-step procedure. First the desk administrator takes in the calls from all patients, without yet giving them an exact appointment time τ (k). After enough (say K) patients have called for an appointment, the optimal schedule is determined, either by hand or by means of an automated search algorithm. Once the schedule is decided, each patient is contacted again and notified its appointment time τk in the session. This method is referred to as advance scheduling, and will usually lead to a better schedule and lower cost C because it is optimised over all decision variables simultaneously, using the best available information on the consultation times of the involved patients. Formally, given K and tmax the optimalisation amounts to a nonlinear integer programming problem with decision variables θ and τ (k), k = 1, . . . , K in the range [0, tmax ]. The objective is to determine the integer values that minimise the function (17) and are possibly subjected to some further constraints, e.g. on the range of τk imposed by the patient or on the range of θ by the physician. Note that although the decision space is finite, it may be extremely large. For example, assuming that θ = 0 and Δ = 1 minute, an exhaustive search to the optimal schedule for 20 patients on a 4 hour session still requires 24120 = 4.3·1047 schedule evaluations. Even in case the order is irrelevant and (18) can be maintained, for example if all patients the same consultation time distribution, the number have = 3.8 · 1029. Another disadvantage of advance scheduling of schedules is still 260 20 is clearly the additional administrative effort of having to contact patients twice. 3.3
Visualisation of Mean Performance
For now we restrict ourselves to the case of sequential scheduling and see how this process can be assisted as much as possible. Suppose a schedule for a particular session already exists when a new patient calls in. This patient must be added to the schedule by the administration in one of the tmax + 1 slots. In doing so it would be useful to know, for each slot, the waiting time that the patient will experience if it were to be scheduled in that slot, as well as the incurred idle time for the physician. This information can be obtained from the schedule so far as follows, assuming θ = 0 for clarity of reasoning. Consider again the schedule as defined in the previous section, but disregard patients k+1 to K. That is, consider only the consultations of the first k patients with appointment times τ1 to τk . Let Rk,i , 0 i tmax−τk , denote the remaining work for the physician i slots after τk , the last patient’s appointment. Likewise, define Jk,i as the time that the physician has been idle in that slot. We refer to this quantity as the running idle time. With the auxiliary variable
126
S. De Vuyst, H. Bruneel, and D. Fiems
Qk,i = Wk + Sk − i ,
(19)
we have Rk,i = (Qk,i )+ ,
and Jk,i = (−Qk,i )+ ,
(20)
analogous to (4)–(5). Clearly, Rk,i and Jk,i respectively correspond to the waiting time and idle time of an additional patient if it were to be scheduled in slot τk +i, which is precisely the reason why these quantities are useful in sequential scheduling. Their moments can be calculated in exactly the same way as in (8)–(11) and (14)–(16). We thus find E[Rk,i ] = E[Wk ] + μk − i + ¯k,i , Var[Rk,i ] = Var[Wk ] + σ 2 + ¯2 − ¯k,i − 2¯k,i E[Rk,i ] , k
and E[Ii,k ] = ¯k,i ,
(21)
k,i
Var[Ik,i ] = ¯k,i − ¯2k,i ,
(22)
with ¯k,i =
i i−m (i−n−m)sk (m)wk (n) ,
(23)
m=0 n=0
¯k,i =
i i−m (i−n−m)2sk (m)wk (n) .
(24)
m=0 n=0
For example, the expected remaining work and running idle time for a session of length tmax = 120 with 6 already scheduled patients is visualised in Fig. 4. This graph shows the session on the horizontal axis and where the 6 patients are scheduled. For each patient k, E[Wk ] and E[Ik ] are plotted as a bar on the positive and negative vertical axis respectively, which shows the same information as in Figs. 1–3. Additionally, the black bar shows the mean consultation time which is the average workload each patient poses on the system. The graph also gives an idea of how the schedule performs in between appointments by showing the curves of the mean remaining work and running idle time. That is, for each slot t τk we show the average amount of time E[Rk,t−τk ] that the physician still has to spend in slot t on the first k patients. Likewise, the curves on the negative vertical axis show the average amount of time E[Jk,t−τk ] since the physician completed the consultation of patient k. Clearly, as the session progresses, the remaining work decreases while the running idle time increases. Note also that the remaining work due to the first k patients at the appointment time of the following patient coincides with that patient’s waiting time and likewise for idle times, i.e. (25) Rk,ak = Wk+1 , and Jk,ak = Ik+1 , at least if τk θ. This follows directly from the fact that (19)–(20) coincides with (4)–(5) for i = ak . In the same way, for i = 0 in (19)–(20) we have Rk,0 = Wk + Sk ,
and Jk,0 = 0 ,
(26)
Fast Appointment Scheduling
127
40 W = 8.78, I = 2.59, E[X] = 17.51 mean consultation time μ3 of patient 3
30
mean remaining work E[R1,i ]
20
mean session overtime E[X]
E[R3,i ]
10
mean waiting time E[W3 ]
0 mean physician idle time E[I3 ]
10 τ1 0
mean running idle time E[J1,i ]
τ2
τ3
τ4
20
40
60
E[J3,i ]
τ5
τ6
80
100
tmax t
120
Fig. 4. Visualisation of a schedule with tmax = 120 slots, θ = 0 and K = 6 equidistant patients. For each patient k the mean remaining work E[Rk,i ] is plotted and, in the negative vertical axis, the mean running idle time E[Ik,i ]. The mean consultation, waiting and idle time of each patient is also shown, as well as the expected overtime E[X] at the end of the session. All patients have the same Γˆ (20, 150) consultation time distribution. For this session, we have W = 8.78, I = 2.59 and E[X] = 17.51.
which, after taking expected values, is also evident from the graph. Although shown in Fig. 4 for demonstration purposes, it is not necessary to calculate E[Rk,i ] of the kth patient for i ak , that is, beyond the appointment time of the next patient. Let us define the envelope of the mean remaining work curves and running idle time curves respectively as the functions R(t) = E[Rk∗ (t),t−τ ∗ (t) ] , with
J(t) = E[Jk∗ (t),t−τ ∗ (t) ] ,
k ∗ (t) = max{k : τk t} ,
τ ∗ (t) = τk∗ (t) .
(27) (28)
In the examples of Figs. 5 and 6 discussed below, the curves R(t) and J(t) on positive and negative vertical axis will be shown with a solid and dotted line respectively. Such a visual representation of the schedule’s average performance can assist the administrator if a new patient needs an appointment. For each slot t, the administrator can immediately see what the mean waiting and idle time for the new patient will be if it is appointed to that slot. If the new patient is effectively appointed to some slot t, everything from slot t onwards must be recalculated in order to visualise the new situation. 3.4
Examples
Let us consider a scenario where the patients are heterogeneous and have consultation times according to either of the four following distributions: (a) uniform between 5 and 15 minutes, (b) Poisson with a mean of 15 minutes, (c) Γˆ (20, 200)
128
S. De Vuyst, H. Bruneel, and D. Fiems
50
a
W = 13.0, I = 3.06, E[X] = 29.9
40 30 20 10 0 10
0
50
50
100
150
200
t b
W = 25.4, I = 1.04, E[X] = 35.2
40 30 20 10 0 0
θ = 30
50
100
150
200
t
Fig. 5. Visualisation of a 4-hour session with 12 patients: remaining work R(t) and running idle time J(t) envelopes. The consultation times of the patients alternate between the four mentioned distributions. In (a), the patients are spaced at 18 minutes, which is about the overall mean of their consultation times. In (b) the physician arrives half an hour late.
and (d) geometric with a mean of 25 minutes. These distributions have expected values 10, 15, 20, 25 and variances 10, 15, 200, 650 respectively. Let us assume that subsequent scheduled patients have consultation times circulating between these four distributions, i.e. S1 is distributed according to (a), S2 to (b), S3 to (c), S4 to (d), S5 to (a) again and so on. If it is not known to which type the consultation of a patient belongs to, we may assume that each type is equally likely which results in a pmf s(n) = 14 4k=1 sk (n), n 0, with mean 17.5 and variance 250. In Fig. 5 the visualisation of a 240-minute session is shown for K = 12 patients. The administrator here does not take into account the heterogeneity of the patients and only uses the overall consultation time distribution as information. Patients are given appointments 18 minutes apart, which equals E[S] . So, even if for example the first patient cannot take more than 15 minutes, it is given an interval of 18 minutes. In (b) the same schedule is shown, but now the physician arrives 30 minutes after the start of the session. Although W increases considerably this way, the mean idle time I is effectively reduced from 3.06 to 1.04 minutes. Note also that even though the physician starts 30 minutes later, the expected session overtime increased by only 5.3 minutes. In Fig. 6 on the other hand, the administrator uses knowledge about the patient’s consultation type for scheduling. In (a) Bailey’s rule is applied: two patients are scheduled in the first slot while the rest are given an interval equal to their mean consultation time, a1 = 0, ak = E[Sk ] , k = 2, . . . , K − 1. In (b), we show an appointment rule that is particularly easy to apply if the envelopes
Fast Appointment Scheduling
50
129
a
W = 17.0, I = 1.44, E[X] = 19.4
40 30 20 10 0 10 40
0
50
100
150
30
200
t
target Wmax for the mean patient waiting times at 12 minutes
W = 10.5, I = 3.56, E[X] = 32.9
b
20 10 0 10 0
50
100
150
200
t
Fig. 6. Contrary to Fig. 5 the administrator knows which one of the 4 distributions each patient has. In (a) Bailey’s rule is followed, while in (b) all patients are targeted to have an expected waiting time of less than 12 minutes.
R(t) and/or J(t) are available. Suppose that our main optimalisation goal is fairness among patients, i.e. we want the mean waiting times E[Wk ] to be more or less equal such that no patient is favoured by its position in the session. To achieve this, we can impose a target value Wmax for the mean patient waiting times of, say, 12 minutes which is indicated by the horizontal grey line. The point where this line intersects with the remaining work envelope R(t) is where the next patient will be scheduled. There is no sense in making the first patient wait however, which makes that W = 10.5 minutes instead of 12 minutes. This way of sequential scheduling could be extended by an additional target Imax for the idle times. If k patients are already scheduled, the appointment time of patient k+1 is decided by τk+1 = min{tW , tI } , with tW = min{t τk : R(t) < Wmax } ,
4
and
tI = max{t : J(t) < Imax } .
Conclusions
We have proposed an analytic approach for evaluating appointment schedules on finite sessions that allows to obtain accurate results with very low computational complexity. By imposing a discrete-time setting and using Lindley’s recursion, we show that only a limited set W of waiting time probabilities need to be calculated in order to obtain the moments of waiting and idle times of the patients appointed to the session. The fact that the evaluation can be done very
130
S. De Vuyst, H. Bruneel, and D. Fiems
fast, makes our approach an ideal candidate for use in optimalisation studies. Additionally, we propose two new metrics that can assist in scheduling the patients sequentially: the mean remaining work and mean running idle time envelopes, which characterise the average performance of the schedule in each slot of the session.
Acknowledgements The third author is a postdoctoral fellow with the Fund for Scientific Research – Flanders (FWO-Vlaanderen).
References 1. Alexopoulos, C., Goldsman, D., Fontanesi, J., Kopald, D., Wilson, J.R.: Modeling patient arrivals in community clinics. Omega 36, 33–43 (2008) 2. Babes, M., Sarma, G.: Out-patient queues at the Ibn-Rochd health centre. The Journal of the Operational Research Society 42(10), 845–855 (1991) 3. Bailey, N.T.J.: A study of queues and appointment systems in hospital out-patient departments, with special reference to waiting-times. Journal of the Royal Statistical Society. Series B (Methodological) 14(2), 185–199 (1952) 4. Bailey, N.T.J.: A note on equalising the mean waiting times of successive customers in a finite queue. Journal of the Royal Statistical Society. Series B (Methodological) 17(2), 262–263 (1955) 5. Cayirli, T., Veral, E.: Outpatient scheduling in health care: A review of literature. Production and Operations Management 12(4), 519–549 (2003) 6. Cayirli, T., Veral, E., Rosen, H.: Assessment of patient classification in appointment system design. Production and Operations Management 17(3), 338–353 (2008); Conference of the Production-and-Operations-Management-Society and the College-of-Service-Operations, New York (October 2004) 7. Chakraborty, S., Muthuraman, K., Lawley, M.: Sequential clinical scheduling with patient no-shows and general service time distributions. IIE Transactions 42(5), 354–366 (2010) 8. Charnetski, J.: Scheduling operating room surgical procedures with early and late completion penalty costs. Journal of Operations Management 5(1), 91–102 (1984) 9. Denton, B., Gupta, D.: A sequential bounding approach for optimal appointment scheduling. IIE Transactions 35, 1003–1016 (2003) 10. Green, L.V., Savin, S.: Reducing delays for medical appointments: A queueing approach. Operations Research 56(6), 1526–1538 (2008) 11. Harper, P., Gamlin, H.: Reduced outpatient waiting times with improved appointment scheduling: a simulation modelling approach. OR Spectrum 25(2), 207–222 (2003) 12. Hassin, R., Mendel, S.: Scheduling arrivals to queues: A single-server model with no-shows. Management Science 54(3), 565–572 (2008) 13. Ho, C.J., Lau, H.S.: Minimizing total-cost in scheduling outpatient appointments. Management Science 38(12), 1750–1764 (1992) 14. Kaandorp, G.C., Koole, G.: Optimal outpatient appointment scheduling. Health Care Management Science 10, 217–229 (2007)
Fast Appointment Scheduling
131
15. Lehmann, T.N.O., Aebi, A., Lehmann, D., Olivet, M.B., Stalder, H.: Missed appointments at a Swiss university outpatient clinic. Public Health 121(10), 790–799 (2007) 16. Lindley, D.: The theory of queues with a single server. Mathematical Proceedings of the Cambridge Philosophical Society 48(2), 277–289 (1952) 17. Liu, L., Liu, X.: Block appointment systems for outpatient clinics with multiple doctors. Journal of the Operational Research Society 49(12), 1254–1259 (1998) 18. Muthuraman, K., Lawley, M.: A stochastic overbooking model for outpatient clinical scheduling with no-shows. IIE Transactions 40(9), 820–837 (2008) 19. Reinus, W.R., Enyan, A., Flanagan, P., Pim, B., Sallee, D.S., Segrist, J.: A proposed scheduling model to improve use of computed tomography facilities. Journal of Medical Systems 24(2), 61–76 (2000) 20. Rohleder, T.R., Klassen, K.J.: Using client-variance information to improve dynamic appointment scheduling performance. Omega, International Journal of Management Science 28(3), 293–302 (2000) 21. Sola-Vera, J., Saez, J., Laveda, R., Girona, E., Garcia-Sepulcre, M.F., Cuesta, A., Vazquez, N., Uceda, F., Perez, E., Sillero, C.: Factors associated with non-attendance at outpatient endoscopy. Scandinavian Journal of Gastroenterology 43(2), 202–206 (2008) 22. Wang, P.P.: Optimally scheduling n customer arrival times for a single-server system. Computers & Operations Research 24(8), 703–716 (1997) 23. Zonderland, M.E., Boer, F., Boucherie, R.J., de Roode, A., van Kleef, J.W.: Redesign of a university hospital preanesthesia evaluation clinic using a queuing theory approach. Anesthesia and Analgesia 109(5), 1612–1621 (2009)
Technique of Statistical Validation of Rival Models for Fatigue Crack Growth Process and Its Identification Nicholas Nechval1, Maris Purgailis1, Uldis Rozevskis1, Juris Krasts1, and Konstantin Nechval2 1
University of Latvia, EVF Research Institute, Statistics Department, Raina Blvd 19, LV-1050 Riga, Latvia Nicholas Nechval, Maris Purgailis, Uldis Rozevskis, Juris Krasts [email protected]
2
Transport and Telecommunication Institute, Applied Mathematics Department, Lomonosov Street 1, LV-1019 Riga, Latvia [email protected]
Abstract. The development of suitable models of stochastic crack growth process is important for the reliability analysis of fatigued structures as well as the scheduling of inspection and repair/replacement maintenance. Based on modifications of the solution of the deterministic differential equation for the crack growth rate, where a stochastic nature of this rate is expressed by a random disturbance embedded in the solution of the differential equation, the simple stochastic models are presented for practical applications. Each of these models represents a stochastic version of the solution of the Paris–Erdogan law equation. The models take into account the random disturbance parameters while maintaining the simplicity and advantages of the Paris–Erdogan law equation. A technique is proposed in order to find the appropriate model for crack growth behavior from the family of rival models and test its validity in the light of experimental results. The model analysis technique can be implemented easily using deterministic crack growth analysis results and estimates of the statistics of the crack growth behavior. The solution of the deterministic differential equation associated with the stochastic model gives us the crack exceedance probability as well as the probability of random time to reach a specified crack size. Once the appropriate stochastic model is established, it can be used for the fatigue reliability prediction of structures made of the tested material. An illustrative example is given. Keywords: Fatigue crack growth process, models, validation, identification.
1 Introduction Models for fatigue crack growth process have been the subject of many papers published in the last 50 years. These span from simplified models (such as in [1]) to more advanced models (such as in [2]). Some of the models are based on the micro structure and some are based on the analysis of experimental data. Others are based on the theory of elasticity and use available experimental data for verification. Naturally it is beyond the scope of K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 132–148, 2011. © Springer-Verlag Berlin Heidelberg 2011
Technique of Statistical Validation of Rival Models
133
this paper to quote the enormous number of available works. The experimental work described in most of these papers shows that the size of the crack developed under repeated loads is of a random nature, although a repeated trend is observed. This was apparent even for the experiments carried out with tightly controlled laboratory settings under deterministic external loads. The measurement of crack size as a function of loading cycles (or time as an interchangeable parameter) has the general form shown in Fig. 1.
Fig. 1. Curves for crack size as a function of time or cycles
The curves are characterized by two features: (i) a non-linear increase in crack size with increased number of loading cycles (or time); (ii) intermingling of the curves for different "identical" specimens. Five series of experimental test results are repeatedly quoted in the literature: Noronha et al. [3] in which two sets of experiments are presented, Virkler et al. [4], Ghonem and Dore [5], and Wu and Ni [6]. From the nature of the phenomena and from the results quoted in these references and many others it can be seen that a good prediction of the behavior of the crack growth process must be given by a stochastic rather than a deterministic model. There is, therefore, a need to develop a probabilistic fracture mechanics framework for the modeling of fatigue crack growth in fatigued structures. Probabilistic or stochastic models for crack growth were suggested by many investigators in the last 50 years. These include evolutionary probabilistic models (Markov chain, Markov diffusion models), cumulative jump models (Poisson process, birth process, jump-correlated model) and differential equation models. A comprehensive summary of the state of the art, with an excellent list of references, is given in ref. [7]. Each of the models may be the most appropriate one to depict a particular set of fatigue growth data but not necessarily the others. All models can be improved to depict very accurately the growth data but, of course, it has to be at the cost of increasing computational complexity. Yang’s model [8] and the polynomial model [9] are considered more appropriate than the Markov chain model [2] by some researchers through the introduction of a differential equation which indicates that fatigue crack growth rate is a function of crack size and other parameters. Unfortunately, they are mathematically too complicated for fatigue researchers as well as design engineers. A large gap still needs to be bridged between the fatigue
134
N. Nechval et al.
experimentalists and researchers who use probabilistic methods to study the fatigue crack growth problems. The models which are mainly used in practical engineering applications are the differential equation models. The methods by which the differential equation for the behavior of a stochastic structure due to crack growth is treated and the probability of failure of the structure is calculated can be divided into three major families: (1) Use of the deterministic differential equation for the crack growth rate, while assuming that different parameters in this equation are random variables. Examples of this family are presented in [10-12]. This family is denoted by RV (Random Variables). (2) Use of a modified differential equation for the crack growth rate, where a stochastic nature of this rate is expressed by a random process. Examples of this family are presented in [13]. This family is denoted by RP (Random Process). (3) Use of a modified solution of the deterministic differential equation for the crack growth rate, where a stochastic nature of this rate is expressed by a random disturbance embedded in the solution of the differential equation. Examples of this family are presented in [11]. This family is denoted by RD (Random Disturbance). In this paper, a technique is proposed in order to find the appropriate model for crack growth behavior from the RD family of rival models and test its validity in the light of experimental results. The implications of the results are then discussed for the identification of fatigue crack growth process.
2 Formulation of Models for the Fatigue Crack Growth Process 2.1 Deterministic Models for the Fatigue Crack Growth Process With the application of fracture mechanics concepts to fatigue failure and the development of sophisticated crack detecting techniques, the crack propagation data can be obtained in terms of crack length (a) and number of cycles (N). In most cases, fatigue crack growth rate data in fatigued components are assumed to follow the Paris–Erdogan law [1]. This is given by:
da = C ( ΔK ) m , dN
(1)
where da / dN is the fatigue crack growth rate, ΔK is the stress intensity factor range, C is the Paris coefficient and m is the Paris exponent. Both C and m are generally considered to be material constants for a given microstructural condition and composition. The stress intensity factor range, ΔK, can be expressed in its usual form as:
ΔK = FΔσ πa ,
(2)
where F is a geometrical function, Δσ is the stress range, and a is the crack length. We may now substitute (2) into (1) to obtain the following expression:
da = C ( FΔσ π ) m a m / 2 . dN
(3)
Technique of Statistical Validation of Rival Models
135
Setting q = C ( FΔσ π ) m , b = m / 2 , t ≡ N , and a ≡ a (t ) ,
(4)
(1) may now be expressed as: da(t ) = q(a(t ))b dt
(5)
in which q and b are constants to be evaluated from the crack growth observations. The independent variable t can be interpreted as stress cycles, flight hours, or flights depending on the applications [14]. It is noted that the power-law form of q(a(t))b at the right hand side of (5) can be used to fit some fatigue crack growth data appropriately and is also compatible with the concept of Paris–Erdogan law. Separating variables in (5), the service time for a crack to grow from size a(t0) (or a(ti−1)) to a(ti) (where ti >ti−1≥ t0) can be found by performing the necessary integration between limits: ti
∫
t0
a (t i )
dt =
∫
a (t 0
dv qv b )
(6)
to obtain (for i=1, …, n): ti − t 0 =
[ a(t0 )]−(b −1) − [a(ti )]−( b −1) q(b − 1)
ti − t 0 =
ln[a (t0 )] − ln[a (ti )] q
(if b≠1),
(if b=1);
(7) (8)
or ti − ti −1 =
[a (ti −1 )]− (b −1) − [a (ti )]− (b −1) q (b − 1)
ti − ti −1 =
(if b≠1),
ln[a (ti −1 )] − ln[a(ti )] (if b=1). q
(9) (10)
Thus, we have the two deterministic models for the fatigue crack growth process. 2.2 Stochastic Models for the Fatigue Crack Growth Process
In this paper, we consider stochastic version of the above deterministic models (7) and (9), respectively, Model 1: a10− b − a1i − b = (b − 1)q (ti − t0 ) + U i(1)
(11)
Model 2: a1i −−1b − a1i − b = (b − 1)q(ti − ti −1 ) + U i( 2) ,
(12)
and
136
N. Nechval et al.
where a0 ≡ a(t0), ai ≡ a(ti), U i(k ) is a random disturbance, k∈{1, 2}. It will be noted that for typical aircraft metallic materials, an initial discontinuity size a(t0) (for t0=0) found through quantitative fractography is approximately between 0.02 and 0.2 mm. Let us assume that U i(1) ~N(0,[(b-1)σ (ti-t0)1/2]2) and U i( 2) ~ N(0,[(b-1)σ (ti-ti−1)1/2]2). Then the crack exceedance probability, i.e., the probability that crack size ai will exceed any given (say, maximum allowable) crack size a• can be derived and expressed either as (for Model 1): ⎛ ⎡ (a − (b −1) − (a • ) − (b −1) ) − (b − 1)q (t − t ) ⎤ ⎞ 0 i Pr(ai > a • | ti , t0 , b, q, σ ) = 1 − Φ⎜ ⎢ 0 ⎥⎟ , 1/ 2 ⎟ ⎜⎢ − − b t t ( 1 ) σ ( ) 0 i ⎣ ⎦⎥ ⎠ ⎝
(13)
where Φ(.) is the standard normal distribution function; in this case, the conditional probability density function of ai is given by
f (ai | ti , t0 , b, q,σ ) =
2⎞ ⎛ −(b−1) − ai−(b−1) ) − (b − 1)q(ti − t0 ) ⎤ ⎟ ⎜ 1 ⎡ (a0 exp − ⎥ ⎟; ⎜ 2⎢ σ [2π (ti − t0 )]1 / 2 (b − 1)σ (ti − t0 )1 / 2 ⎜ ⎢ ⎦⎥ ⎟⎠ ⎣ ⎝
ai−b
(14) or as (for Model 2): ⎛ ⎡ ( a − (b −1) − (a • ) − (b −1) ) − (b − 1)q(t − t ) ⎤ ⎞ i i −1 ⎟ Pr(ai > a • | ti , ti −1 , b, q, σ ) = 1 − Φ⎜ ⎢ i −1 ⎥ ; 1/ 2 ⎟ ⎜⎢ ( b 1 ) σ ( t t ) − − i i −1 ⎦⎥ ⎠ ⎝⎣ (15) in this case, the conditional probability density function of ai is given by 2⎞ ⎛ ⎡ −(b−1) −(b−1) ) − (b −1)q(ti − ti−1 ) ⎤ ⎟ ⎜ 1 (ai−1 − ai f (ai | ti , ti−1, b, q,σ ) = exp − ⎢ ⎥ ⎟. σ [2π (ti − ti−1 )]1/ 2 ⎜⎜ 2 ⎢⎣ (b −1)σ (ti − ti−1 )1/ 2 ⎥⎦ ⎟ ⎝ ⎠
ai−b
(16) These models allow one to characterize the random properties that vary during fatigue crack growth.
3 Conceptual Model Validation Conceptual model validation is defined as determining that the theories and assumptions underlying the model are correct and that the model representation of the problem entity is “reasonable” for the intended purpose of the model. For the above stochastic models: Model 1 and Model 2, the conceptual validation consists in the following.
Technique of Statistical Validation of Rival Models
137
3.1 Statistical Estimation of the Unknown Parameters Model 1. Let us assume that the parameters b, q and σ of the crack exceedance probability (13) are unknown. Given the data describing a single crack, say a sequence {(ai , ti )}in=1 , it is easy to construct a log-likelihood using the density given by (14) and estimate the parameters b, q and σ by maximum likelihood. The loglikelihood is
L(b, q, σ | {(ai , ti )} = −b
n
∑
2
ln ai − n ln σ −
i =1
1 n ⎛⎜ a10− b − a1i − b − (b − 1)q(ti − t0 ) ⎞⎟ . ∑ ⎟ 2 i =1 ⎜⎝ (b − 1)σ (ti − t0 )1 / 2 ⎠ (17)
Inspection shows that this differs from the standard least-squares equation only in the term –b∑lna, where the subscript i has been dropped. The likelihood estimators are obtained by solving the equations ∂L / ∂b = 0; ∂L / ∂q = 0; ∂L / ∂σ = 0.
(18)
In this case the equations have no closed solution. However, it is easy to see that the estimators for q and σ given b are the usual least-squares estimators for the coefficients in (18) conditioned on b, −1
⎞ 1 ⎛⎜ 1− b n 1− b ⎞⎟⎛⎜ n q (b) = na0 − ∑ ai (t i − t 0 ) ⎟ , ∑ ⎜ ⎜ ⎟ ⎟ b −1 ⎝ i =1 ⎠⎝ i =1 ⎠
σ 2 (b) =
[a10−b − ai1−b − q (b)(b − 1)(ti − t 0 )]2 , ∑ ti − t 0 n(b − 1) 2 i=1 1
(19)
n
(20)
and on substituting these back in the log-likelihood gives a function of b alone, n L(b) = −b ∑ ln ai − n ln[σ (b)] − n / 2.
(21)
i =1
Thus the technique is to search for the value of b that maximizes L(b) by estimating q and σ as functions of b and substituting in L(b). In this study a simple golden-section search worked very effectively. Model 2. In the same manner as for Model 1, we obtain the log-likelihood (from (16)) n
∑
1 L(b, q, σ | {( ai , ti )} = −b ln ai − n ln σ − 2 i =1
and the estimators for q and σ given b,
2
⎛ ai1−−1b − ai1− b − (b − 1)q (ti − ti −1 ) ⎞ ⎜ ⎟ ⎜ ⎟ (b − 1)σ (t i − ti −1 )1 / 2 i =1 ⎝ ⎠ (22) n
∑
138
N. Nechval et al.
a1− b − a1n− b , q (b) = 0 (b − 1)(t n − t0 )
σ 2 (b) =
1 n(b − 1) 2
(23)
[ai1−−1b − ai1− b − q (b)(b − 1)(ti − ti −1 )]2 . ti − ti −1 i =1 n
∑
(24)
Substituting these back in the log-likelihood (22), we obtain (21) as a function of b alone. Then the statistical estimates of the unknown parameters b, q and σ we find from maximization of L(b) (21). 3.2 Goodness-of-Fit Testing for the Normality Assumption Model 1. The normality assumption is
(a0− (b −1) − ai− (b −1) ) − (b − 1)q (ti − t0 ) (b − 1)σ (ti − t0 )1 / 2
~ N(0,1).
(25)
Model 2. The normality assumption is
( ai−−(1b −1) − ai− (b −1) ) − (b − 1) q (ti − ti −1 ) (b − 1)σ (ti − ti −1 )1 / 2
~ N(0,1).
(26)
Of the many quantitative goodness-of-fit techniques suitable in this case (e.g.: Kolmogorov-Smirnov, Anderson-Darling, Shapiro-Wilk, von Mises), we prefer the Anderson-Darling test because it is more sensitive to deviations in the tails of the distribution than is the older Kolmogorov-Smirnov test. The Anderson-Darling statistic (A2) is defined as A2 = −n −
1 n
n
∑ (2i − 1)[ln Φ((ui (k )) + ln(1 − Φ((un −i +1(k ))] ,
k∈{1, 2},
(27)
i =1
where (a0− (b −1) − ai−(b −1) ) − (b − 1)q (t i − t 0 ) ui (1) = (b − 1)σ (ti − t 0 )1 / 2
(28)
and (ai−−(1b −1) − ai− (b −1) ) − (b − 1)q (ti − ti −1 ) . ui (2) = (b − 1)σ (ti − ti −1 )1 / 2
(29)
The null and the alternative hypotheses are: H0: the data follow the specified distribution; HA: the data do not follow the specified distribution. The above formula needs to be modified for small samples,
Technique of Statistical Validation of Rival Models
2 Amod = A 2 (1 + 0.75 / n + 2.25 / n 2 ) ,
139
(30)
and then compared to an appropriate critical value from Table 1 [15]. 2 Table 1. Critical values for Amod
α 2
Aα
0.1
0.05
0.025
0.01
0.631
0.752
0.873
1.035
The hypothesis regarding the distributional form is rejected at the chosen 2 , is greater than the critical value Aα2 significance level α if the test statistic, Amod obtained from Table 1. The fixed values of α (0.1, 0.05 etc.) are generally used to evaluate the null hypothesis H0 at various significance levels. A value of 0.05 is typically used for most applications, however, in some critical industries, a lower α value may be applied.
4 Operational Model Validation Operational model validation is defined as determining that the model’s output behavior has sufficient accuracy for the model’s intended purpose over the domain of the model’s intended applicability. Suppose that we desire to validate a kth rival stochastic model of the fatigue crack growth process (see Fig. 2).
Fig. 2. Model validation scheme
Let xi(k) and yi be the ith observation of the response variable of the kth model and the process under study, respectively. It is assumed that all observations, xi(k), yi, i=1(1)n, are independent of each other, where n is a number of paired observations. Let zi(k)= yi−xi(k), i=1(1)n, be paired comparisons leading to a series of differences.
140
N. Nechval et al.
Thus, for testing the validity of a rival model of a real, observable stochastic process, it can be obtained and used a sample of n independent observations z(k)=(z1(k), ... , zn(k)). Each sample z(k), k∈{1, … , m}, is declared to be realization of a specific stochastic process with unknown parameters. It is assumed in this paper that zi(k) (i=1, …, n) are normal random variables. 4.1 Hypotheses for Testing the Operational Validity
In this paper, for testing the operational validity of the kth rival model of a real, observable process, we propose a statistical approach based on the generalized maximum likelihood ratio. In using statistical hypothesis testing to test the validity of a rival model under a given experimental frame and for an acceptable range of accuracy consistent with the intended application of the model, we have the following two hypotheses: H0: Model is valid for the acceptable range of accuracy under a given experimental frame; (31) H1: Model is invalid for the acceptable range of accuracy under a given experimental frame. There are two possibilities for making a wrong decision in statistical hypothesis testing. The first one, type I error, is accepting the alternative hypothesis H1 when the null hypothesis H0 is actually true, and the second one, type II error, is accepting the null hypothesis when the alternative hypothesis is actually true. In model validation, the first type of wrong decision corresponds to rejecting the validity of the model when it is actually valid, and the second type of wrong decision corresponds to accepting the validity of the model when it is actually invalid. The probability of making the first type of wrong decision will be called model builder′s risk (α) and the probability of making the second type of wrong decision will be called model user′s risk (β). In model validation, the model user’s risk is extremely important and must be kept small. However, both type I and type II errors must be carefully considered when using hypothesis testing for model validation. Thus, for fixed n, the problem is to construct a test, which consists of testing the null hypothesis H0(k): zi(k) ∼ N(0,σ 2(k)), ∀i = 1(1)n,
(32)
where σ 2(k) is a variance, versus the alternative H1(k): zi(k) ∼ N(μ(k), σ 2(k)), ∀i = 1(1)n,
(33)
where μ(k)≠0 is a mean. The parameters σ 2(k) and μ(k) are unknown. 4.2 Statistic for Testing the Operational Validity
In order to distinguish the two hypotheses (H0(k) and H1(k)), a generalized maximum likelihood ratio (GMLR) statistic is used. The GMLR principle is best described by a likelihood ratio defined on a sample space Z with a parameter set Θ, where the
Technique of Statistical Validation of Rival Models
141
probability density function of the sample data is maximized over all unknown parameters, separately for each of the two hypotheses. The maximizing parameter values are, by definition, the maximum likelihood estimators of these parameters; hence, the maximized probability functions are obtained by replacing the unknown parameters by their maximum likelihood estimators. Under H0(k), the ratio of these maxima is a σ 2(k)-free statistic. This is shown in the following. Let the complete parameter space for θ(k)=(μ(k),σ 2(k)) be Θ={(μ(k),σ 2(k)): μ(k)∈R, σ 2(k)∈R+}, where R+ is a set of variances, and let the restricted parameter space for θ, specified by the H0(k) hypothesis, be Θ0={(μ(k), σ 2(k)): μ(k)=0, σ 2(k) ∈R+}. Then one possible statistic for testing H0(k): θ(k)∈Θ0 versus H1(k): θ(k)∈Θ1, where Θ1=Θ−Θ0, is given by the generalized maximum likelihood ratio LR = max LH θ ( k )∈Θ1
1 (k )
( z (k ) | θ (k ) )
max L H
θ ( k )∈Θ 0
0 (k )
(z (k ) | θ (k ) ) .
(34)
Under H0(k), the joint likelihood for z(k) is given by
LH
( z ( k ) | θ ( k )) 0 (k )
⎛ 1 = (2π ) − n/ 2 (σ 2 ( k )) − n / 2 exp⎜ − ⎜ 2 ⎝
n
[ zi ( k )]2 2 i =1 σ ( k )
∑
⎞ ⎟. ⎟ ⎠
(35)
Under H1(k), the joint likelihood for Z(k) is given by LH
⎛ 1 ( z (k ) | θ (k )) = (2π ) − n/ 2 (σ 2 (k )) − n / 2 exp⎜ − 1 (k ) ⎜ 2 ⎝
[ zi (k ) − μ (k )]2 ⎞⎟ ⎟. σ 2 (k ) i =1 ⎠ n
∑
(36)
It can be shown that
max LH 0 ( k ) (z (k ) | θ (k ) ) = (2π ) − n / 2 [σ 02 (k )]− n / 2 exp(−n / 2)
(37)
(z (k ) | θ (k )) = (2π ) − n / 2 [σ 12 (k )]− n / 2 exp(−n / 2),
(38)
θ ( k )∈Θ 0
and max LH
θ ( k )∈Θ1
1 (k )
where n
σ 02 (k ) = ∑ zi2 (k ) / n ,
(39)
i =1
n
σ 12 (k ) = ∑ [ zi (k ) − μ (k )]2 / n
(40)
i =1
and
n
μ ( k ) = ∑ z i (k ) / n i =1
(41)
142
N. Nechval et al.
are the well-known maximum likelihood estimators of the unknown parameters σ 2(k) and μ(k) under the hypotheses H0(k) and H1(k), respectively. A substitution of (37) and (38) into (34) yields LR = [σ 02 (k ) / σ 12 (k )]n / 2 .
(42)
Taking the (n/2)th root, this likelihood ratio is evidently equivalent to n LR • = σ 02 ( k ) / σ 12 ( k ) = 1 + n[ z ( k )]2 / ∑ [ zi (k ) − z ( k )]2 , where z (k ) = μ (k ) .
(43)
i =1
Clearly (44) is equivalent finally to the statistic n
vn (k ) = LR • − 1 = n[ z (k )]2 /s 2 (k ), where s 2 (k ) = ∑ [ zi (k ) − z (k )]2 .
(44)
i =1
It is known that ( z( k ), s 2 (k )) is a complete sufficient statistic for the parameter θ(k)=(μ(k),σ 2(k)). Thus, the problem has been reduced to consideration of the sufficient statistic ( z( k ), s 2 (k )) . It can be shown that under H0, vn(k) is a σ 2(k)-free statistic which has the property that its distribution does not depend on the actual variance σ 2(k). This is given by the following theorem. Theorem 1. (PDF of the statistic vn(k)). Under H1(k), the statistic vn(k) is subject to a noncentral F-distribution with 1 and n−1 degrees of freedom, the probability density function (PDF) of which is f H (k ) (vn (k ) | n, q (k )) = e 2
1
−
q2 ( k ) −1 ⎤ 2 ⎡Β⎛ ⎜ 1 , n −1 ⎞⎟
⎢⎣ ⎝ 2
vn (k )
−1 2
⎛ n 1 q 2 (k ) vn (k ) ⎞ ⎟, ⎜ 2 1 + vn (k ) ⎟⎠ ⎝
F ; ; n / 2 1 1⎜ 2 2
2 ⎠⎥⎦ [1 + vn (k )]
0 < vn(k) < ∞.
(45)
where 1F1(b;c;x) is the confluent hypergeometric function, q2(k)=nμ2(k)/σ 2(k) is a noncentrality parameter. Under H0(k), when q2(k)=0, (45) reduces to a standard Fdistribution with 1 and n−1 degrees of freedom, −1
−1 vn (k ) 2 , 0 < vn(k) < ∞. f H0 (k ) (vn (k ) | n) = ⎡Β⎛⎜ 1 , n −1 ⎞⎟⎤ ⎢⎣ ⎝ 2 2 ⎠⎥⎦ [1 + v (k )]n / 2 n
(46)
Proof. It is known that, under the hypothesis H1(k), the PDF of the statistic ( z (k ), s 2 ( k )) is given by f H1( k ) ( z (k ), s 2 (k ) | μ (k ),σ 2 (k )) = f H1(k ) ( z (k ) | μ (k ),σ 2 (k )) f H1(k ) (s 2 (k ) | σ 2 (k ))
Technique of Statistical Validation of Rival Models
143
n −1
−
n
=
2π σ
e
n[ z ( k ) − μ ( k )] 2 2σ 2 ( k )
⎡ 1 ⎤ 2 s 2 (k ) ⎢ 2 ⎥ n −1 −1 − 2 σ k 2 ( ) ⎦ ⎣ [ s 2 (k )] 2 e 2σ ( k ) , ⎛ n −1⎞ Γ⎜ ⎟ ⎝ 2 ⎠
− ∞ < z ( k ) < ∞, 0 < s 2 ( k ) < ∞.
(47)
It can be shown that the PDF of w(k) = nz 2 (k ) / σ 2 (k ) is
f H1 ( k ) ( w(k ) | q (k )) = e 2
−
q 2 (k ) ∞ 2
r
− 1 ⎛⎜ q 2 (k ) ⎞⎟ [ w(k )]−1 / 2 + r e ⎜ 2 ⎟ 21 / 2 + r Γ(1 / 2 + r ) r = 0 r !⎝ ⎠
∑
w( k ) 2
, 0 < w(k) < ∞.
(48) It follows from (47) and (48), if we use the invariant embedding technique [16], that f H (k ) (vn (k ) | n, q (k )) = e 2
1
−
q2 ( k ) ∞ 2
1 ⎛⎜ q 2 (k ) ⎞⎟ ⎜ ⎟ r=0 r !⎝ 2 ⎠
∑
r
r− 1
−1 vn (k ) 2 ⎡Β⎛⎜ 1 + r, n −1 ⎞⎟⎤ , ⎢⎣ ⎝ 2 ⎥ 2 ⎠⎦ [1 + vn (k )]n / 2+r
0 < vn(k) < ∞.
(49)
which reduces to (45). This ends the proof.
4.3 Test for the Operational Validity The test of H0(k) versus H1(k), based on vn(k), is given by
⎧≤ h(k ), then H 0 (k ), vn (k )⎨ ⎩ > h(k ), then H1 (k ),
(50)
where h(k)>0 is a threshold of the test which is determined for a prescribed level of significance α(k) as h(k ) = F1, n −1;1−α ( k ) ,
(51)
F1, n −1;1−α ( k ) is the (1-α(k))-quantile of the F-distribution with 1 and n-1 degrees of freedom. When the parameter θ(k)=(μ(k),σ 2(k)) is unknown, it is well known that no the uniformly most powerful (UMP) test exists for testing H0(k) versus H1(k). However, it can be shown that the test (50) is uniformly most powerful invariant (UMPI). It will be noted that the null distribution of vn(k) is F-distribution with 1 and n−1 degrees of freedom for such distributions of z(k) as the Cauchy distribution, t-distribution [17].
144
N. Nechval et al.
5 Fatigue Crack Growth Process Identification When there are the m specified rival models, the problem is to identify the observable fatigue crack growth process with one of these models. If there is the possibility that the observable process cannot be identified with one of the m specified rival models, it is desirable to recognize this case too. If (m−1) rival models are eliminated by the above test, then the remaining model (say, kth) is the one with which the observable fatigue crack growth process may be identified. If all rival models are eliminated from further consideration, we decide that the observable process cannot be identified with any of the m specified rival models. If the set of rival models not yet eliminated has more than one unit, then we declare that the observable stochastic process may be identified with rival model k* if n
k ∗ = arg max R 2 ( k ) = 1 − k∈D
∑
n
[ yi − xi ( k )]2
i =1
n
∑
=1− [ yi − y ]
2
i =1
where y =
∑i =1 yi / n, n
∑ zi2 (k ) i =1
n
∑
(52)
,
[ yi − y ] 2
i =1
D is the set of rival models not yet eliminated by the above
model validation test.
6 Example Consider the data of fatigue crack growth process in upper longeron of RNLAF F-16 aircraft (Table 2, where ti is the flight hours, ai is the crack size (in mm)). Table 2. The data of fatigue crack growth process in upper longeron of RNLAF F-16 aircraft i 1 2 3
ti 500 1000 1500
ai 0.20 0.25 0.30
i 4 5 6
ti 0.32 0.35 0.40
ai 2000 2500 3000
i 7 8 9
ti 0.50 0.65 1.00
ai 3500 4000 4500
i 10 11 12
ti 1.60 2.60 4.00
ai 5000 5150 5300
It is assumed that a0=0.18 for t0=0.
6.1 Validation of Models 1 and 2 for the Fatigue Crack Growth Process Conceptual Model Validation. Using the data of Table 2, we have: Model 1. It follows from (19), (20) and (21)), b = 1.642, q = 0.000708389,
σ = 0.003608.
(53)
Technique of Statistical Validation of Rival Models
145
It follows from (27), (28), (30) and (53), 2 Amod = 0.407463 < Aα2 = 0.05 = 0.752.
(54)
Thus, there is not evidence to rule out the normality assumption (25). Model 2. It follows from (23), (24) and (21), b = 1.807,
q = 0.000856541,
σ = 0.007397.
(55)
It follows from (27), (29), (30) and (55), 2 Amod = 0.314829 < Aα2 = 0.05 = 0.752.
(56)
Thus, the normality assumption (26) is not rejected.
Operational Model Validation. Using (11) and (53), we have the results of the fatigue crack growth process prediction by means of Model 1: ai = [a10− b − (b − 1)q (ti − t0 )]1 /(1− b ) , i=1(1)n,
(57)
which are given in Table 3. Table 3. The results of the fatigue crack growth process prediction by means of Model 1 i 1 2 3
ai 0.20 0.25 0.30
ai 0.203 0.232 0.269
i 4 5 6
ai 0.32 0.35 0.40
ai 0.315 0.377 0.462
i 7 8 9
ai 0.50 0.65 1.00
ai 0.582 0.765 1.065
i 10 11 12
ai 1.60 2.60 4.00
ai 1.622 1.889 2.236
Let zi (1) = ai − ai , i = 1(1)n, where ai≡yi, ai ≡ xi (1).
(58)
Based on (44) and the data of Table 3, we find (for n=12, α=0.05) vn (1) = 0.11823 < F1, n −1;1−α = 4.84.
(59)
Using (12) and (55), we have the results of the fatigue crack growth process prediction by means of Model 2: ai = [ a1i −−1b − (b − 1) q (ti − ti −1 )]1 /(1− b ) , i=1(1)n,
which are given in Table 4.
(60)
146
N. Nechval et al.
Table 4. The results of the fatigue crack growth process prediction by means of Model 2 i 1 2 3
ai 0.20 0.25 0.30
ai 0.201 0.226 0.290
i 4 5 6
ai 0.32 0.35 0.40
ai 0.357 0.384 0.427
i 7 8 9
ai 0.50 0.65 1.00
ai 0.500 0.657 0.919
i 10 11 12
ai 1.60 2.60 4.00
ai 1.691 1.961 3.561
Let zi (2) = ai − ai , i = 1(1)n, where ai≡yi, ai ≡ xi (2).
(61)
Based on (44) and the data of Table 4, we find (for n=12, α=0.05) vn (2) = 0.153347 < F1, n −1;1−α = 4.84.
(62)
It follows from (59) and (62) that the rival models (Model 1 and Model 2) pass the operational validity test (50).
6.2 Identification of the Fatigue Crack Growth Process Using the data of Tables 3 and 4, we find from (52): R 2 (1) = 0.76 < R 2 (2) = 0.96 .
(63)
It follows from (63) that the fatigue crack growth process may be identified with Model 2.
7 Planning Inspections in Service of Fatigued Structures Now Model 2 can be used for planning in-service inspections of fatigued structures. In this case a sequence of inspections is determined as follows.
τ j = arg [Pr(a j ≤ a • | τ j ,τ j −1 , b , q , σ ) = 1 − α ], j=1, 2, 3, … ,
(64)
where τj is the time of the jth inspection, ⎛ ⎡ (a − (b −1) − (a • ) − (b −1) ) − (b − 1)q (τ − τ ) ⎤ ⎞ ⎜ ⎢ j −1 j j −1 ⎟ ⎥ . (65) Pr(a j ≤ a | τ j ,τ j −1 , b , q , σ ) = Φ⎜ 1/ 2 ⎢ ⎥ ⎟⎟ (b − 1)σ (τ j − τ j −1 ) ⎜ ⎦⎠ ⎝⎣ •
It will be noted that the jth inspection is assigned if a j −1 < a • .
Technique of Statistical Validation of Rival Models
147
8 Conclusion This paper addresses the analysis aspects of stochastic crack propagation process. The technique can easily be implemented for practical applications In addition to the statistical dispersion of the crack growth rate, the statistical dispersion of the initial flaw size is very significant and it should be accounted for in the reliability analysis of structural or mechanical components. Given the distribution of the initial flaw size, methodologies to account for both the crack growth variability and the initial flaw size variability have been available in the literature. However, the technology for establishing the initial flaw size distribution is still a subject of research.
Acknowledgments. This research was supported in part by Grant No. 06.1936, Grant No. 07.2036, Grant No. 09.1014, and Grant No. 09.1544 from the Latvian Council of Science and the National Institute of Mathematics and Informatics of Latvia.
References 1. Paris, P.C., Erdogan, F.: A Critical Analysis of Crack Propagation Laws. J. Bas. Engineering (ASME) 85, 528–534 (1963) 2. Bogdanoff, J.L., Kozin, F.: Probabilistic Models of Cumulative Damage. Wiley, New York (1985) 3. Noronha, P.J., et al.: Fastener Hole Quality, I and II. Technical Report AFFDL-TR-78-206, Wright-Patterson AFB, Ohio, USA (1979) 4. Virkler, D.A., Hillberry, B.M., Goel, P.K.: The Statistical Modeling Nature of Fatigue Crack Propagation. J. Engng Mater. Technol (ASME) 101, 148–153 (1979) 5. Ghonem, H., Dore, S.: Experimental Study of the Constant Probability Crack Growth Curves under Constant Amplitude Loading. Engng. Fracture Mech. 27, 1–25 (1987) 6. Wu, W.F., Ni, C.C.: A Study of Stochastic Fatigue Crack Growth Modeling through Experimental Data. Probabilistic Engineering Mechanics 18, 107–118 (2003) 7. Sobczyk, K., Spencer, B.F.: Random Fatigue from Data to Theory. Academic Press, New York (1992) 8. Yang, J.N., Manning, S.D.: A Simple Second Order Approximation for Stochastic Crack Growth Analysis. Engng. Fracture Mech. 53, 677–686 (1996) 9. Wu, W.F., Ni, C.C., Liou, H.Y.: Random Outcome and Stochastic Analysis of Some Fatigue Crack Growth Data. Chin. J. Mech. 17, 61–68 (2001) 10. Madsen, H.O., Krenk, S., Lind, N.C.: Methods of Structural Safety. Prentice-Hall, New York (1986) 11. Nechval, N., Nechval, K., Berzinsh, G., Purgailis, M., Rozevskis, U.: Stochastic Fatigue Models for Efficient Planning Inspections in Service of Aircraft Structures. In: Al-Begain, K., Heindl, A., Telek, M. (eds.) ASMTA 2008. LNCS, vol. 5055, pp. 114–127. Springer, Heidelberg (2008) 12. Nechval, K., Nechval, N., Berzinsh, G., Purgailis, M., Rozevskis, U., Strelchonok, V.: Optimal Adaptive Inspection Planning Process in Service of Fatigued Aircraft Structures. In: Al-Begain, K., Fiems, D., Horváth, G. (eds.) ASMTA 2009. LNCS, vol. 5513, pp. 354–369. Springer, Heidelberg (2009) 13. Lin, Y.K., Yang, J.N.: A Stochastic Theory of Fatigue Crack Propagation. AIAA Journal 23, 117–124 (1984)
148
N. Nechval et al.
14. Nechval, N.A., Nechval, K.N., Purgailis, M., Strelchonok, V.F.: Planning Inspections in the Case of Damage Tolerance Approach to Service of Fatigued Aircraft Structures. International Journal of Performability Engineering 7, 279–290 (2011) 15. D’Agostino, R.B., Stephens, M.A.: Goodness-Of-Fit Techniques. Marcel-Dekker, New York (1986) 16. Nechval, N., Purgailis, M., Berzins, G., Cikste, K., Krasts, J., Nechval, K.: Invariant Embedding Technique and Its Applications for Improvement or Optimization of Statistical Decisions. In: Al-Begain, K., Fiems, D., Knottenbelt, W.J. (eds.) ASMTA 2010. LNCS, vol. 6148, pp. 306–320. Springer, Heidelberg (2010) 17. Nechval, N.A., Nechval, K.N., Srelchonok, V.F., Vasermanis, E.K.: Adaptive CFAR Tests for Detection and Recognition of Targets Signals in Radar Clutter. In: Berger-Vachon, C., Gil Lafuente, A.M. (eds.) The 2004 Conferences Best Of, pp. 62–80. AMSE Periodicals, Barcelona (2004)
Suitability of the M/G/∞ Process for Modeling Scalable H.264 Video Traffic Maria-Estrella Sousa-Vieira Department of Telematics Engineering University of Vigo, Spain {estela}@det.uvigo.es
Abstract. Video represents a larger and larger portion of the traffic in Internet. H.264/AVC and its scalability extension have recently become some of the most widely accepted video coding standards. Consequently, adequate models for this traffic are very important for the performance evaluation of networks architectures and protocols. Particularly, the efficient and on-line generation of synthetic sample paths is fundamental for simulation studies. In this work, we check the suitability of the M/G/∞ process for modeling the spatial and quality scalability extensions of the H.264 standard. Keywords: H.264 video traffic modeling; Scalability; M/G/∞ process; Whittle estimator.
1
Introduction
Improvements in network infrastructures, storage capacity and computing power, along with advances in video coding technology, are enabling an increasing popularity of multimedia applications. Modern video transmission systems are typically characterized by a wide range of connection qualities and receiving devices with different characteristics: displays, processing power, ... Scalability, that allows to remove parts of a video stream in order to adapt it to preferences of users, characteristics of terminals and changing network conditions, is a good solution for modern video transmissions. H.264/AVC and the SVC extension [1] have recently become some of the most widely accepted video coding standards, because they have demonstrated significantly improved coding efficiency, substantially enhanced error robustness and increased flexibility and scope of applicability relative to prior video coding standards, such as H.263 and MPEG2. Traffic modeling plays an important role in the performance evaluation of network architectures and protocols. In last decade, several traffic studies have convincingly show the existence of persistent correlations in several kinds of traffic, as VBR video [2–5] and that the impact of the correlation on the performance metrics may be drastic, and several works have been conducted in modeling VBR video traffic based on different stochastic processes [6–12] that display different K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 149–158, 2011. c Springer-Verlag Berlin Heidelberg 2011
150
M.-E. Sousa-Vieira
forms of correlation. We focus on the M/G/∞-type processes [13, 7, 14] for its theoretical simplicity, its flexibility to exhibit both Short-Range Dependence (SRD) and Long-Range Dependence (LRD) in a parsimonious way and its advantages for simulation studies, such as the possibility of on-line generation and the lower computational cost [15]. In order to apply a model to the synthetic generation of traces with a correlation structure similar to that of real sequences, a fundamental problem is the estimation of the parameters of the model. Between the methods proposed in the literature [16–19], those based on the Whittle estimator are especially interesting because they permit to fit the whole spectral density and to obtain confidence intervals of the estimated parameters. Moreover, in [20] we have presented a method based on the prediction error of the Whittle estimator to choose, between several models for compressed VBR video traffic based on the M/G/∞ process, the one that gives rise to a better adjustment of the spectral density, and therefore of the correlation structure, of the traffic to model. In this work we check the suitability of the M/G/∞ process for modeling the spatial (different spatial resolutions) and quality (different fidelity levels) scalability extensions of the H.264 standard. The remainder of the paper is organized as follows. We begin reviewing the main concepts related to the M/G/∞ process in Section 2 and those related to the Whittle estimator in Section 3. In Section 4 we explain the M/G/∞based models that we consider in this work and in Section 5 we apply then to the modeling of H.264/SVC video traffic at the GoP level. Finally, concluding remarks are summarized in Section 6.
2
M/G/∞ Process
The M/G/∞ process [21] is a stationary version of the occupancy process of an M/G/∞ queueing system. In this queueing system, customers arrive according to a Poisson process, occupy a server for a random time with a generic distribution X with finite mean, and leave the system. Though the system operates in continuous time, it is easier to simulate it in discrete-time, so this will be the convention henceforth [14]. The number of busy ∞ servers at time t ∈ ZZ+ is Yt = i=1 At,i , where At,i is the number of arrivals at time t − i which remain active at time t, i.e., the number of active customers with age i. For any fixed t, {At,i , i = 1, . . . } are a sequence of independent and identically distributed (iid) Poisson variables with parameter λIP(X ≥ i), where λ is the rate of the arrival process. The expectation and variance of the number of servers occupied at time t is IE(Yt ) = Var(Yt ) = λ
∞
IP(X ≥ i) = λIE(X).
i=1
The discrete-time process Yt , t = 0, 1, . . . is time-reversible and wide-sense stationary, with autocovariance function
Suitability of the M/G/∞ Process for Modeling Scalable H.264 Video Traffic
γ(h) = Cov(Yt+h , Yt ) = λ
∞
IP(X ≥ i),
151
h = 0, 1, . . .
i=h+1
The function γ(h) determines completely the expected service time IE(X) =
γ(0) λ
and the distribution of X, the service time, because IP(X = i) =
γ(i − 1) − 2γ(i) + γ(i + 1) , λ
i = 1, 2, . . . .
(1)
By (1), the autocovariance is a non-negative convex function. Alternatively, any real-valued sequence γ(h) can be the autocovariance function of a discrete-time M/G/∞ occupancy process if and only if it is decreasing, non-negative and integer-convex [7]. In such a case, limh→∞ γ(h) = 0 and the probability mass function of X is given by (1). If A0,0 (i.e., the initial number of customers in the system) follows a Poisson distribution with mean λIE(X), and their service times have the same distribu of the random variable X tion as the residual life X = i = IP(X ≥ i) , IP X IE(X) then {Yt , t = 0, 1, . . . } is strict-sense stationary, ergodic, and enjoys the following properties: 1. The marginal distribution of Yt is Poissonian for all t, with mean value μ = IE(Yt ) = λIE(X). > h ∀h ≥ 0. 2. The autocovariance function is γ(h) = γ(0)IP X If the autocovariance function is summable the process exhibits SRD. Conversely, if the autocovariance function is not summable, the process exhibits LRD. In particular, the M/G/∞ process exhibits LRD when X has infinite variance, as in the case of some heavy-tailed distributions. The latter are the discrete probability distribution functions satisfying IP(X > k) ∼ k −α asymptotically as k → ∞.
3
Whittle Estimator
Let fθ (λ) be the spectral density function of a zero-mean stationary Gaussian stochastic process, X, where θ = (θ1 , . . . , θM ) is a vector of unknown parameters that is to be estimated from observations. Let N −1
I
X
N
=
1 Xi e−jλi 2 2πN i=0
152
M.-E. Sousa-Vieira
be the periodogram of a sample of size N of the process X. The approximate Whittle estimator [16] is the vector θ = (θˆ1 , . . . , θˆM ) minimizing, for a given sample X
N
of size N of X, the statistic
π π I N (λ) 1 X Q N (θ) dλ + log fθ (λ)dλ . X 2π −π fθ (λ) −π
(2)
If θo is the true value of θ, then lim Pr θˆ − θo < = 1,
N →∞
for any > 0, namely, θˆ converges in probability √ to θ o (is a weakly consistent estimator). It is also asymptotically normal, since N (θˆ − θ o ) converges in distribution to ζ, as N → ∞, where ζ is a zero-mean Gaussian vector with matrix of covariances known. Thus, from this asymptotic normality, confidence intervals of the estimated values can be computed. A simplification of (2) arises by choosing a special scale parameter θ1 , such that fθ (λ) = θ1 fθ ∗ (λ) = θ1 fη∗ (λ)
and
π
−π
log fθ∗ (λ)dλ =
π
−π
log fη∗ (λ)dλ = 0,
where η = (θ1 , . . . , θM ) and θ∗ = (1, η). Therefore π 1 σ2 θ1 = exp log fθ (λ)dλ = , 2π −π 2π where σ2 is the optimal one-step-ahead prediction error, that is equal to the variance ∞of the innovations in the AR(∞) representation of the process [22], Xi = j=1 βj Xi−j + i . Using this normalization, equation (2) simplifies to Q
X
(θ∗ ) = Q∗ N
X
(η) = N
π
−π
I
X
N
(λ)
fθ∗ (λ)
π
dλ = −π
I
N
(λ)
X fη∗ (λ)
dλ
which is usually evaluated numerically via integral quadrature.
2 = Q N ( Additionally [22] σ η ). X
2 as a measure of the suitability of a model, since smaller values of We use σ ∗
N ( σ2 (or Q η )) mean better adjustment to the actual correlation of the sample. X
4
M/G/∞-Based Models
In this work we consider as distribution for the service time the discrete-time distribution S, proposed in [14]. Its main characteristic is that of being a heavytailed distribution with two parameters, α and m, a feature that allows to model
Suitability of the M/G/∞ Process for Modeling Scalable H.264 Video Traffic
153
simultaneously the short-term correlation behavior (by means of the one-lag autocorrelation coefficient r(1)) and the long-term correlation behavior (by means of the H [23] parameter) of the occupancy process. Specifically, the autocorrelation function of the resulting M/S/∞ process is ⎧ ⎪ ⎨1 − α − 1 k ∀k ∈ (0, m] α−1 r(k) = 1 mmα ⎪ ⎩ ∀k ≥ m, α k with α = 3 − 2H, ⎧ 1 1 ⎪ ⎨ (αr(1)) α−1 ∀r(1) ∈ 0, α m= ⎪ α−1 ⎩ ∀r(1) ∈ α1 , 1 . α − αr(1) ∞ If α ∈ (1, 2) then H ∈ (0.5, 1), and k=0 r(k) = ∞. Hence, in this case this correlation structure gives rise to an LRD process. The spectral density, needed to use the Whittle estimator, is given by [19] mα−1 1 Δ fX (λ) = f {m,α} (λ) = Var [X] f (λ) + α cos(λ) − α h 2π m 1 α(m − k) + k 1 m α−1 + cos(λk) − ∀λ ∈ [−π, π], π mα α k k=1
where fh is the spectral density of a FGN [22] process with h = (1−α) 2 , scaled by the variance. In order to improve the adjustment of the short-term correlation of the previous process, in [24] we have proposed to add an autoregressive filter. Specifically, we focus on the particular case of an AR(1) filter. If Y is the M/S/∞ original process, the new one is obtained as Xn = α1 Xn−1 + Yn . The mean values and covariances are related by E [X] = γ X (k) =
γ Y (k) +
∞
i=1
E [Y ] , 1 − α1
γ Y (k + i)αi1 + 1 − α21
∞
i=1
γ Y (k − i)αi1
The spectral density results f X (λ) =
f Y (λ) |1 − α1 ejλ |2
∀λ ∈ [−π, π].
We denote the resulting process as M/S/∞-AR.
.
154
5
M.-E. Sousa-Vieira
Modeling H.264/SVC Video Traffic at the GoP Level
We consider, as an example, the following empirical video traces of the Group of Pictures (GoP) sizes available at [25]. – Spatial scalability: • T-1: “Star Wars • T-2: “Star Wars – Quality scalability: • T-3: “Star Wars • T-4: “Star Wars • T-5: “Star Wars
IV (layer QCIF)”. IV (layer CIF)”. IV (base layer)”. IV (first enhanced layer)”. IV (second enhanced layer)”.
In order to adjust simultaneously the marginal distribution and the autocorrelation, as the marginal distribution in all cases is approximately Lognormal, we apply a change of distribution. In each case, A denotes the process we want to generate and C the M/G/∞ process from which we start off, that should have a high enough mean value so as the Poissonian marginal distribution can 2 be considered approximately Gaussian (we select σC = μC = 104 ). Moreover, we consider the intermediate process B = log(A), from which we estimate the parameters. If A has Lognormal marginal distribution, then B = log(A) has Gaussian marginal distribution, with mean, variance and autocorrelation given by [26]
2 μ2A σA 2 μB = log 2 , σ = log 1 + , B 2 μ2A μA + σA 2 1 rA (k)σA rB (k) = 2 log 1 + . σB μ2A The estimations of the parameters of the M/S/∞ and the M/S/∞-AR processes, computed via the Whittle estimator, are as follows: – T-1: = 0.921689 and H = 0.911314. • M/S/∞: r(1) = 0.899481. • M/S/∞-AR: α
1 = 0.029285, r(1) = 0.91253 and H – T-2: = 0.915812 and H = 0.904005. • M/S/∞: r(1) = 0.874671. • M/S/∞-AR: α
1 = 0.078925, r(1) = 0.892912 and H – T-3: = 0.939631 and H = 0.934316. • M/S/∞: r(1) = 0.945877 and H = 0.941741. • M/S/∞-AR: α
1 = −0.017192, r(1) – T-4: = 0.931953 and H = 0.921401. • M/S/∞: r(1) = 0.893379. • M/S/∞-AR: α
1 = 0.057633, r(1) = 0.911896 and H – T-5: = 0.901042 and H = 0.88203. • M/S/∞: r(1) = 0.83778. • M/S/∞-AR: α
1 = 0.108674, r(1) = 0.870226 and H
Suitability of the M/G/∞ Process for Modeling Scalable H.264 Video Traffic
155
Table 1. Estimations of the prediction error with each model T-1 T-2 T-3 T-4 T-5 1.0007 1.0054 1.0002 1.003 1.0104
0.9
0.9
Empirical Synthetic (M/S/∞) Synthetic (M/S/∞-AR)
0.8
0.7
0.6
0.6
0.5
0.5
0.4
0.4
0.3
0.3
0.2
0.2
0.1
0.1 0
0 −0.1
Empirical Synthetic (M/S/∞) Synthetic (M/S/∞-AR)
0.8
0.7
0
20
40
60
80
100
−0.1
0
20
40
60
80
100
k
k
Fig. 1. Spatial scalability. Adjustment of the autocorrelation. QCIF layer (left) and CIF layer (right). 0.14
Empirical Synthetic (M/S/∞) Synthetic (M/S/∞-AR)
0.12
0.14
0.1
0.1
0.08
0.08
0.06
0.06
0.04
0.04
0.02
0.02
0
0
200000 400000 600000 800000
1e+06 1.2e+06 1.4e+06 1.6e+06 1.8e+06
Empirical Synthetic (M/S/∞) Synthetic (M/S/∞-AR)
0.12
0
0
500000
1e+06
1.5e+06
2e+06
2.5e+06
3e+06
3.5e+06
Fig. 2. Spatial scalability. Adjustment of the marginal distribution. QCIF layer (left) and CIF layer (right).
In Table 1 we show the relationship between the estimations of the prediction error
2 (M/S/∞) σ
2 σ (M/S/∞ − AR)
The results show that, in all cases, increasing the number of parameters leads to smaller prediction errors. Once we have generated a sample of the process C, to obtain Lognormal marginal distribution with the mean value and variance of the empirical traces, we apply the inverse transformation C − μC B = T (C) = σ
A = exp (B), B +μ B σC 2 being σ B the estimation of the variance of B computed with the Whittle estimator, that is, considering the autocorrelation structure.
156
M.-E. Sousa-Vieira 0.9
0.9
Empirical Synthetic (M/S/∞) Synthetic (M/S/∞-AR)
0.8 0.7
0.7
0.6
0.6
0.5
0.5
0.4
0.4
0.3
0.3
0.2
0.2
0.1
0.1
0 −0.1
Empirical Synthetic (M/S/∞) Synthetic (M/S/∞-AR)
0.8
0 0
20
40
60
80
100
−0.1
0
20
40
60
k
80
100
k
0.9
Empirical Synthetic (M/S/∞) Synthetic (M/S/∞-AR)
0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 −0.1
0
20
40
60
80
100
k
Fig. 3. Quality scalability. Adjustment of the autocorrelation. Base layer (top), first enhanced layer (bottom left), second enhanced layer (bottom right).
0.16
0.16
Empirical Synthetic (M/S/∞) Synthetic (M/S/∞-AR)
0.14 0.12
0.12
0.1
0.1
0.08
0.08
0.06
0.06
0.04
0.04
0.02
0.02
0
Empirical Synthetic (M/S/∞) Synthetic (M/S/∞-AR)
0.14
0
2000
4000
6000
8000 0.12
10000
12000
14000
16000
0
0
10000 20000 30000 40000 50000 60000 70000 80000 90000 100000
Empirical Synthetic (M/S/∞) Synthetic (M/S/∞-AR)
0.1
0.08
0.06
0.04
0.02
0
0
100000
200000
300000
400000
500000
600000
Fig. 4. Quality scalability. Adjustment of the marginal distribution. Base layer (top), first enhanced layer (bottom left), second enhanced layer (bottom right).
In Figs. 1, 2, 3, and 4 we represent the autocorrelation function and the marginal distribution of synthetic traces of the M/S/∞ and the M/S/∞-AR processes. We can observe a good math with the empirical traces in both cases.
Suitability of the M/G/∞ Process for Modeling Scalable H.264 Video Traffic
6
157
Conclusions and Further Work
In this paper, we have checked the suitability of the M/G/∞ process for modeling the spatial and quality scalability extensions of the H.264 standard. The proposed generators enjoy several interesting features: highly efficient, online generation and the possibility of capturing the whole correlation structure in a parsimonious way. As further work we are going to include these traffic models in simulators of different systems, in order to use the synthetic traces for performance evaluation of scalable video transmission.
References 1. Schwarz, H., Marpe, D., Wiegand, T.: Overview of the scalable video coding extension of the H.264/AVC standard. IEEE Transactions on Circuits and Systems for Video Technology 17(9), 1103–1120 (2007) 2. Leland, W.E., Taqqu, M.S., Willinger, W., Wilson, D.V.: On the self-similar nature of Ethernet traffic (extended version). IEEE/ACM Transactions on Networking 2(1), 1–15 (1994) 3. Beran, J., Sherman, R., Taqqu, M.S., Willinger, W.: Long-range dependence in variable bit rate video traffic. IEEE Transactions on Communications 43(2-4), 1566–1579 (1995) 4. Paxson, V., Floyd, S.: Wide-area traffic: The failure of Poisson modeling. IEEE/ACM Transactions on Networking 3(3), 226–244 (1995) 5. Crovella, M.E., Bestavros, A.: Self-similarity in world wide web traffic: Evidence and possible causes. IEEE/ACM Transactions on Networking 5(6), 835–846 (1997) 6. Garrett, M.W., Willinger, W.: Analysis, modeling and generation of self-similar VBR video traffic. In: Proc. ACM SIGCOMM 1994, London, UK, pp. 269–280 (1994) 7. Krunz, M., Makowski, A.: Modeling video traffic using M/G/∞ input processes: A compromise between markovian and LRD models. IEEE Journal on Selected Areas in Communications 16(5), 733–748 (1998) 8. Lombardo, A., Morabito, G., Schembra, G.: An accurate and treatable Markov model of MPEG video traffic. In: Proc. IEEE INFOCOM 1998, San Francisco, CA, USA, pp. 217–224 (1998) 9. Ma, S., Ji, C.: Modeling video traffic using wavelets. IEEE Communications Letters 2(4), 100–103 (1998) 10. Melamed, B., Pendarakis, D.E.: Modeling full-length VBR video using Markovrenewal-modulated TES models. IEEE Journal on Selected Areas in Communications 16(5), 600–611 (1998) 11. Frey, M., Nguyen-Quang, S.: A Gamma-based framework for modeling variable bit rate MPEG video sources: The GoP GBAR model. IEEE/ACM Transactions on Networking 8(6), 710–719 (2000) 12. Sarkar, U.K., Ramakrishnan, S., Sarkar, D.: Modeling full-length video using Markov-modulated Gamma-based framework. IEEE/ACM Transactions on Networking 11(4), 638–649 (2003) 13. Cox, D.R.: Long-range dependence: A review. In: David, H.A., David, H.T. (eds.) Statistics: An Appraisal, pp. 55–74. Iowa State University Press (1984)
158
M.-E. Sousa-Vieira
14. Su´ arez, A., L´ opez, J.C., L´ opez, C., Fern´ andez, M., Rodr´ıguez, R., Sousa, M.E.: A new heavy-tailed discrete distribution for LRD M/G/∞ sample generation. Performance Evaluation 47(2/3), 197–219 (2002) 15. Sousa, M.E., Su´ arez, A., Fern´ andez, M., L´ opez, C., Rodr´ıguez, R.F.: A highly efficient M/G/∞ generator of self-similar traces. In: 2006 Winter Simulation Conference, Monterey, CA, USA, pp. 2146–2153 (2006) 16. Whittle, P.: Estimation and information in stationary time series. Arkiv Matematick 2(23), 423–434 (1953) 17. Abry, P., Veitch, D.: Wavelet analysis of long-range dependent traffic. IEEE Transactions on Information Theory 44(1), 2–15 (1998) 18. Taqqu, M.S., Teverovsky, V.: On estimating the intensity of long-range dependence in finite and infinite variance time series. In: Adler, R., Feldman, R., Taqqu, M.S. (eds.) A Practical Guide to Heavy Tails, pp. 177–217. Birkhauser, Basel (1998) 19. Sousa, M.E., Su´ arez, A., L´ opez, J.C., L´ opez, C., Fern´ andez, M., Rodr´ıguez, R.F.: Application of the Whittle estimator to the modeling of traffic based on the M/G/∞ process. IEEE Communications Letters 11(10), 817–819 (2007) 20. Sousa-Vieira, M.-E., Su´ arez-Gonz´ alez, A.: Using the whittle estimator for the selection of an autocorrelation function family. In: Al-Begain, K., Heindl, A., Telek, M. (eds.) ASMTA 2008. LNCS, vol. 5055, pp. 16–30. Springer, Heidelberg (2008) 21. Cox, D.R., Isham, V.: Point Processes. Chapman and Hall, Boca Raton (1980) 22. Beran, J.: Statistics for Long-Memory Processes. Chapman and Hall, Boca Raton (1994) 23. Hurst, H.E.: Long-term storage capacity of reservoirs. Transactions of the American Society of Civil Engineers 116, 770–799 (1951) 24. Sousa, M.E., Su´ arez, A., Rodr´ıguez, R.F., L´ opez, C.: Flexible adjustment of the short-term correlation of LRD M/G/∞-based processes. Electronic Notes in Theoretical Computer Science (2010) 25. [Online], http://trace.eas.asu.edu 26. Crouse, M.S., Baraniuk, R.G.: Fast, exact synthesis of Gaussian and non-Gaussian long-range dependent processes. Submitted to IEEE Transactions on Information Theory (1999)
Reconstructing Model Parameters in Partially-Observable Discrete Stochastic Systems Robert Buchholz, Claudia Krull, and Graham Horton Otto-von-Guericke University Magdeburg, PO Box 4120, 39016 Magdeburg, Germany {robert,claudia,graham}@isg.cs.uni-magdeburg.de
Abstract. The analysis of partially-observable discrete stochastic systems reconstructs the unobserved behavior of real-world systems. An example for such a system is a production facility where indistinguishable items are produced by two machines in stochastically distributed time intervals and are then tested by a single quality tester. Here, the source of each defective item can be reconstructed later based solely on the time-stamped test protocol. While existing algorithms can reconstruct various characteristics of the unobserved behavior, a fully specified discrete stochastic model needs to exist. So far, model parameters themselves cannot be reconstructed. In this paper, we present two new approaches that enable the reconstruction of some unknown parameter values in the model specification, namely constant probabilities. Both approaches are shown to work correctly and with acceptable computational effort. They are a first step towards general model parameter inference for partially-observable discrete stochastic systems. Keywords: partially-observable discrete stochastic system, Hidden nonMarkovian Model, incomplete model, parameter inference.
1
Introduction
Many real-world systems can be regarded as partially-observable discrete stochastic (PODS) systems: their stochastic internal behavior can be modeled as a discrete stochastic model such as a non-Markovian stochastic Petri net [1,3]. And this internal behavior is of interest, but not directly observable; it can only be inferred through externally observable signals that are linked to the internal processes. Analysis of these systems is the process of inferring the unobserved behavior of the real system using a time-stamped protocol of its signal emissions and the discrete stochastic model. It allows for additional insights into the inner workings of the real system. A simple example of such a system is a small section of a production facility with two machines that produce indistinguishable items, and a quality tester to test items coming from both machines (see Figure 1). At the quality tester, the K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 159–174, 2011. c Springer-Verlag Berlin Heidelberg 2011
160
R. Buchholz, C. Krull, and G. Horton
source of each item is no longer determinable (and thus unobserved), but the test protocol containing the time-stamped individual test results is a trace of the corresponding externally observable signals. Here, reconstructing the source of defective items can be of interest for purposes of quality assurance.
Fig. 1. Schematic representation of the partially-observable Tester system
So far, existing analysis algorithms only attempt to reconstruct the specific system behavior in time intervals for which signal protocols exist [7,11]. The model specification itself, which describes all possible behaviors has to exist beforehand. For the “Tester” system in Figure 1, one would like to determine the individual probabilities of the two machines to produce defective items, but these parameters are part of the model specification and therefore cannot be reconstructed using the existing approaches. This severely limits the applicability of the analysis of PODS systems, since it assumes that the unobservable system must have been be completely observable after all at some point in time, in order to derive the specification. In this paper, we present two approaches that enable the reconstruction of some parameters of the model specification: We reconstruct the most likely values for unknown constant probabilities in incomplete model specifications with the help of a signal protocol. The first approach is an iterative algorithm that relies on an arbitrary initial estimate for unknown parameter values and iteratively improves that estimate. The second approach is based on computationally expensive symbolic computations in order to determine the most likely values directly. The remaining paper is structured as follows: Section 2 classifies this work with respect to existing contributions. Section 3 introduces the current state-ofthe-art in the analysis of PODS systems. Sections 4 and 5 describe the two new approaches. These are then evaluated in Section 6. The paper is concluded in Section 7.
2
Related Work
To our knowledge, the inference of model parameters for discrete stochastic systems from time-stamped stochastic signal emissions that represent partial
Reconstructing Model Parameters
161
observations of the real system has not been attempted before. However, similar problems have been solved before successfully. Deriving the parameters of a linear dynamical system description from time series is a widely used tool in econometrics [2]. Here, a time series consists of vectors of continuous-valued quantities sampled at discrete time intervals, where each sample describes the complete system state. More recent advances in that area were made by Malyarenko et al. [14]. These analyses assume, however, that the observations are not the result of a completely stochastic process. Rather, they are assumed to be based on a combination of deterministic processes and interference from noise. The parameters to be determined are thus the coefficients for the influence of each component. Our focus on the other hand, is to derive parameters of a truly stochastic system with a discrete number of system states. Additionally, our samples are consequences of internal system state changes, which may occur at any real-valued point in time. The inference of model parameters for truly stochastic discrete processes has been performed by many researchers: Hidden Markov Models are routinely used in speech recognition and other fields to learn all parameters of a hidden model from observed data alone [15]. However, in HMMs, all model parameters are constant probabilities and the models are discrete in time, limiting the expressiveness of the models. Thus, HMMs are not directly applicable to most real systems. For some application fields, specialized analysis algorithms have been developed: Gibson et al. derived parameter values of a compartmental epidemiological model from partial observations of the number of specimens in some of the compartments [9]. Boys et al. [5] and Wang et al. [16] applied different algorithms to the problem of finding the rates at which chemical and biochemical reactions occur in stochastic settings where the number of chemical reactants is so low that the effects of randomness become important. In both cases, the observed data consisted of time series of the number of molecules for each type of reactant. All of these approaches, however, impose the same two limitations: the stochastic model itself has to be Markovian, restricting the classes of discrete stochastic systems that can be modeled and analyzed. And the observations from the real system are sampled at discrete points in time. Thus, the approaches are only applicable to systems where (partial) observations of the system state can be made regularly “on demand” at regular intervals. We, on the other hand, focus on discrete stochastic systems whose state changes can follow arbitrary probability distributions. And our approach relies only on “incidental” observations of signals that the real system emits on some of its state changes. Thus, our approach works even if the observations are made irregularly and if they are only stochastically linked to the system state changes (i.e. a signal can have multiple possible causes, and a state change can cause one of many different signals to be emitted). Consequently, our approach is computationally more expensive and thus cannot analyze models as big as the other approaches.
162
3
R. Buchholz, C. Krull, and G. Horton
Background
In this section, we present background information relevant to the understanding of the new algorithms. We introduce Hidden non-Markovian Models (HnMMs) as a way of modelling PODS systems, and the Event-Driven Proxel algorithm as a means to analyze these models. 3.1
PODS Models
Hidden non-Markovian Models (HnMMs) were introduced as a paradigm to model arbitrary PODS systems [12]. They can be represented compactly by extending non-Markovian stochastic Petri nets [1,3]: In non-Markovian SPNs, the system is modeled through places (hollow circles) that contain a number of markings (small black circles), whose distribution represent the current system state. The system state can only change through the firing of transitions (hollow rectangles), which destroy markings in places leading to the transition through arcs (arrows) and create markings in places lead to by the transition. To represent HnMMs, this specification is extended by adding probabilities for the transitions to emit certain externally-observable symbols when they fire. The representation of the Tester system from Figure 1 as an HnMM is given in Figure 2: The system has only a single state, so the only place always contains a single token. The two machines produce items in N (150, 25) and N (120, 20) distributed time intervals, respectively. Every production of an item emits a symbol “Ok” or “Defective” (as determined by the system’s quality tester). Machine 0 produces defectives with probability p0 , Machine 1 with p1 . In our application scenario, these two probabilities are unknown and thus the model specification is incomplete. This model is slightly simplified since item production is the only possible event and each production event yields the item’s test predicate right away. This simplification in the model can be made when the time span between item production and testing is approximately constant. Then, each time of production can trivially be derived from the time of testing (by subtracting that constant time span from the test time stamps) and be recorded in the trace along with test results. If those symbol emission probabilities were known, existing analysis algorithms could reconstruct the unobserved behavior for a system specified in this manner. The most efficient known algorithm for this task is detailed in the next section. 3.2
Analyzing PODS Systems
Several algorithms exist for the analysis of different classes of PODS systems. In this paper, we will only detail the analysis algorithm for the class Eall [12], to which the Tester model belongs. The algorithmic modifications presented in this paper to derive parts of the system specification can, however, be applied to all other classes of PODS systems and their analysis algorithms as well.
Reconstructing Model Parameters
163
Fig. 2. The Tester system modeled as a Hidden non-Markovian Model
For models of class Eall , all internal state changes result in an externally observable symbol emission. In the HnMM representation, this means that all transitions emit symbols in all cases. Yet, since the type of the symbol is allowed to vary stochastically, and multiple transitions are allowed to emit the same symbol, the system state cannot be inferred unambiguously from the emitted symbol. The consequence of this limitation is that all points in time where the system changes its state are known to the outside observer. Hence, it is certain that no event occurred between the emission of two symbols. This restriction allows Eall models to be analyzed using the efficient event-driven analysis algorithm described in the next section. The Event-Driven Analysis Algorithm. The event-driven analysis algorithm for HnMMs [6] is derived from the state space-based Proxel simulation method [10,13]. It is a simplified version of the former algorithm, based on the observation that for Eall models no events occur in between two symbol emissions and thus possible system behaviors need only be studied at the times of symbol emissions. The algorithm therefore divides the time domain into time steps corresponding to the time between two signal emissions. For each time step, it follows all possible single system state changes (i.e. those that can occur exactly at the end of the time step and are consistent with the trace) in parallel and computes the likelihood for each of them. The analysis result is then the set of all states that the system can be in after it has emitted the last signal recorded in the trace, along with the probability of being in each state. In effect, the algorithm dynamically builds and solves the underlying inhomogeneous Markov chain for each time step, where the set of Markov chain states is the combination of the set of reachable system states from the HnMM with supplementary variables that store the age of non-Markovian transitions in each state. For a given point in time, the possible system evolutions are stored as so-called Proxels, tuples of type (m, τ, p). Here, m is the marking of the system state in
164
R. Buchholz, C. Krull, and G. Horton
the HnMM’s underlying Petri net. The vector τ contains the supplementary variables, the ages of all relevant transitions (i.e. the duration for which each of these transitions is already active); p is a measure of probability for the markingage combination. The analysis starts by creating Proxels for the known initial system state (or states) at t = 0. Then, successor Proxels are created iteratively for each time step, one for each possible single state transition of each Proxel. Thus, these new Proxels represent all states that are reachable from Proxels of the previous emission time. The probability of a Proxel representing a state change through transition i is hereby computed as the product of: – the probability of the predecessor Proxel. – the probability that no event happened in between the two symbol emissions. This is computed by numerically solving an ordinary differential equation based on the hazard rate of all active transitions over the time interval between both symbol emissions [10]. – the hazard rate μi (τi +Δt) of transition i, which is the likelihood of transition i to fire in exactly than instant. Here, Δt is the time between the previous and current symbol emissions. – the probability that the transition in question emits the observed symbol, as recorded in the HnMM specification. The algorithm so far would result in an exponential growth in the number of Proxels over time, since each Proxel of a given time step causes the creation of multiple Proxels (one for each possible state transition) at the next time step. This effect is countered by Proxel-merging: If two Proxels with identical marking and age vector (m, τ, p1 ) and (m, τ, p2 ) exist for the same time step, they are merged to form a single Proxel (m, τ, p1 + p2 ). Proxel merging mitigates the exponential growth of the number of Proxels and for most models even creates an upper bound for the number of Proxels per time step. The algorithm in pseudocode is detailed in Algorithm 1. Encoding Additional Information. The algorithm as detailed above computes the probability measures for all reachable states, but does not retain any information on the history of how a state was reached. Thus, the set of Proxels output by the algorithm only contains information on which states the system could be in after emitting the last element of the protocol, and with what probability. In order to be able to reconstruct other characteristics of the unobserved behavior, the Proxel definition needs to be extended with further supplementary variables that store information on those characteristics. This can for example be the number of past occurrences of a particular event. In the case of the Tester model, one would encode the number of times that machine 0 has produced defective items so far. This way, the set of Proxels at the final time step contains detailed information about how often the relevant event may have occurred with what probability. This information can then be used to compute a likelihood histogram, the expected value or the most likely value for the quantity in question.
Reconstructing Model Parameters
165
Algorithm 1. Pseudocode for the event-driven Proxel solver. Data: initialProxels, trace Output: nextStepProxels currentProxels = initialProxels; prevEmissionTime = 0; foreach element ∈ trace do nextStepProxels.clear(); Δt = element.emissionTime - prevEmissionTime; prevEmissionTime = element.emissionTime; foreach proxel ∈ currentProxels do stayProb = computeInactivityProbability(proxel , Δt); foreach trans ∈ proxel.state.transitions do pSucc = proxel.createSuccessor(trans, Δt); pSucc.p = proxel.p * stayProb * μt (p.τ + Δt) * trans.emissionProbability(element.symbol); nextStepProxels.addOrMerge(pSucc); currentProxels = nextStepProxels; return nextStepProxels
The downside of this approach is that the number of reachable Proxel markings increases by a constant factor depending on the range of the new supplementary variable. Thus, computation time and memory consumption increase by at least the same factor. While this often has a heavy impact (the computation time for the Tester model increases about 50-fold), it does not in principle affect the feasibility of the analysis. With this modification, the algorithm is able to reconstruct the likely system behavior during the time interval for which the trace was recorded. However, for reasons detailed in the next section, it does not allow for the reconstruction of model parameter values. Obstacles for the Reconstruction of Model Parameters. By encoding additional information using supplementary variables, one could theoretically also reconstruct parts of the system specification. In the example of the Tester model, the unknown defect probability of each machine is simply the number of produced defective items divided by the total number of produced items. The latter can be estimated from the expected value of the probability distributions associated with the production process. And the former could be derived from a model analysis for which the number of produced defective items from one of the machines is encoded into each Proxel as a supplementary variable1 . However, the parameters that are to be computed by this algorithm are also required as inputs to it: The unknown defect probabilities are the symbol emission probabilities of the model. Thus, the algorithm could only be used to confirm 1
The number of produced defective items needs to be determined only for one of the two machines. Since the total number of defects is known from the signal trace, the number of defects produced by the other machine can easily be derived from the number of the first one.
166
R. Buchholz, C. Krull, and G. Horton
a known set of parameters, but not to compute them in the first place. The main contribution of this work are therefore two new algorithms that resolve this contradiction. These are detailed in the following sections.
4
Iterative Analysis Algorithm
The iterative analysis approach was developed based on conclusions drawn from the na¨ıve approach of simply guessing the unknown values and assuming that the guess will not impact the accuracy of the analysis. This na¨ıve approach was evaluated using the Tester system, where the symbol emission probabilities of both machines to produce defective or working items are unknown. For the Tester, the “real” system is actually a simulation model. Therefore, the usually unobservable quantities can be observed here, and the quality of the reconstructed parameter values can be assessed through comparison with the actual system parameter values. Without additional information, a suitable guess for the defect rates of the two machines is that both are equal and together account for all defects actually occurred, i.e. p0 = p1 = 0.07. Using these estimates, the reconstructed defect probabilities are 0.081 and 0.060, respectively, while the actual defect probabilities are 0.100 and 0.046. The data shows that the initial assumption was wrong and that there is a big discrepancy between the reconstructed parameter values and the actual ones. However, it also shows that in this case the result of the reconstruction is closer to the (usually unknown) actual system behavior than the initial guess. This observation that an event-driven analysis “refines” estimates of unknown parameter values lead to the following iterative analysis algorithm: initially, one guesses arbitrary initial values for the unknown parameters. Then, the most recently estimated set of parameter values is iteratively used to perform an event-driven Proxel analysis in order to obtain more accurate estimates for the parameters. The iteration process terminates, if the difference in the parameter values between two iterations falls below a given threshold. This is shown in Algorithm 2. Algorithm 2. Iterative Algorithm for Parameter Reconstruction Data: model, parameterEstimate, trace, threshold Output: parameterEstimate repeat oldEstimate = parameterEstimate; initialProxels = model.getInitialProxels(parameterEstimate); finalStepProxels = eventDrivenAnalysis(initialProxels, trace); parameterEstimate = extractParameters(finalStepProxels); until |parameterEstimate - oldEstimate| < threshold ; return computedParameters
Figure 3 shows the analysis result for the defect probability of Machine 0 of the first 14 iterations for the Tester model. With every new iteration, the results
Reconstructing Model Parameters
167
Fig. 3. Computed expected defect probability of Machine 0 using iterative analysis. Iteration 0 is the initial estimate. The dotted line represents the actual system behavior.
further approach the actual system behavior. And the results converge quickly to a value close to the actual system behavior. The difference between the value of convergence and the actual system behavior is tested and discussed further in the “Experiments” and “Conclusion” sections. The size of the difference between the reconstructed parameter value of two iteration steps (and thus the rate of convergence) seems to correspond to the slope of the likelihood polynomial for that parameter (cf. figures 3 and 4). We therefore assume that this algorithm explores the parameter space in the same way that the gradient descent algorithm does. In this case, it will reliably find a parameter set that is a local likelihood maximum. It may, however, not necessarily find the global likelihood maximum (i.e. the most likely parameter set). All experiments conducted support this hypothesis, but no formal proof of this behavior exists as of yet.
5
Symbolic Polynomial Analysis
The iterative analysis is a simple algorithm that usually finds accurate estimates for unknown model parameter values, but does not give any guarantees about time-to-convergence and optimality of the values found. In those cases where all unknown probabilities can be expressed as polynomials in a single common variable, this problem can be solved more reliably by direct computation. The direct computation approach follows the paradigm of maximum likelihood estimation (MLE): Determine a mathematical expression that represents the likelihood of the model to explain the observations made, i.e. the symbol emissions as recorded in the trace, dependent on the unknown parameter. Then, find the global maximum of said expression to determine the most likely parameter value. In the case of PODS systems, the observations recorded in the trace are usually not statistically independent (e.g. the time at which a machine produces an item depends on the time at which it finished production of the previous item). Thus, the usual MLE approach of computing a likelihood expression by either multiplying the probabilities for the occurrences of the individual observations or adding their log-likelihoods is not applicable. But the normal event-driven
168
R. Buchholz, C. Krull, and G. Horton
analysis algorithm readily serves as an alternative: Since the probability of a single Proxel of the last time step of an analysis is a measure for the likelihood of the system to be in a single state after having emitted the trace, the sum of the probabilities of all Proxels for that time step is a measure for the likelihood of the system to be in any state at all after having emitted that trace, and therefore a measure of likelihood for the trace to have been emitted by that model. Thus, for a given value of an unknown model parameter a, the event-driven analysis computes a measure of likelihood for the model to have emitted the trace, if the value of the unknown parameter was a. If no value is given for the unknown parameter and the computations are performed symbolically by keeping a as a symbolic variable, then the event-driven analysis computes a mathematical expression - dependent on the unknown parameters - of the likelihood for the model to have emitted the trace - which is the first step in an MLE algorithm. To achieve this, we propose the following approach: First, express all unknown parameters by polynomials in a single variable. This is necessary in order to make the following computations practically feasible. Since this is not always possible, the approach is not applicable to all models. Then, perform an event-driven Proxel analysis of the trace with the incomplete model, but perform all computations of Proxel probabilities not numerically, but with symbolic polynomials. This allows for the computations to be performed even while some parameter values are missing. Consequently, the Proxel probabilities will not be numbers, but symbolic polynomials as well. Since the polynomials are limited to a single variable, the length of the Proxel probability polynomials increases only by a constant amount with each time step (since a probability polynomial may be multiplied by the constant size polynomial of an unknown model parameter; merging Proxels does not increase the degree of the polynomial at all), making the algorithm computationally feasible. After the algorithm has terminated, sum up the polynomials of all Proxel probabilities of the final time step in order to obtain the likelihood polynomial (cf. Figure 4 for the likelihood polynomial of the incomplete Tester model). The final step of the MLE is then to determine the position of the maximum of this polynomial in the valid range (the range of values for the single free variable for which all unknown probabilities that were expressed as polynomials of it take on values in the interval [0; 1]). This can be done either through numerical rootfinding of the symbolic first derivative of that polynomial, or by evaluating the polynomial using random values for the free variable and accepting the position of the sample with the highest function value as a close-enough estimate for the maximum. In both cases, evaluating the probability polynomials for the unknown parameters at the position determined by this step then returns their most likely values and thereby reconstructs the missing model parameters. For implementers of this algorithm, it is important to consider numerical accuracy: Since the algorithm deals with polynomials containing powers of a variable to 1000 and more, the computations are numerically unstable. We found
169
Reconstructing Model Parameters
Fig. 4. Graph of the trace generation likelihood polynomial for the Tester model. The value on the horizontal axis for which the polynomial reaches its maximum is the most likely defect rate for Machine 0.
that a floating-point accuracy of at least 256 bits for all polynomial coefficients and all polynomial evaluations is required for reliable results. A advantageous side effect of the symbolic computation approach is that it depends only on the likelihood polynomial for the sum of all Proxels. Thus, in contrast to the iterative analysis presented before, this approach does not need to encode history into Proxel as supplementary variables. This reduction of complexity partially offsets the increased complexity introduced by the symbolic computations and usage of the BigNum library GMP[8] for increased floating point accuracy. For an evaluation of computation times for both approaches, see the experiments in the next section.
6
Experiments
In this section, both algorithms are tested in order to determine their accuracy and computation times under varying trace length. Additionally, it is tested whether the algorithms can cope with ambiguous models. The tests are conducted on the Tester model with traces of about 750 symbols (the equivalent of 50, 000s of system behavior), generated using the discrete event simulator AnyLogic [4]. Using synthetic traces has the advantage that the actual defect probabilities (which are to be reconstructed using the two algorithms) can be recorded as well. Thus, the analysis result can be compared to the otherwise unobservable behavior of the “real” system. In order to be analyzed by the polynomial approach, the four unknown parameters of the Tester model (the probabilities for each machine to produce defective or working pieces, respectively) need to be expressed as polynomials in a single variable. This is easily possible, since the “working” probability of each machine can easiliy be expressed by the corresponding “defective” probability. And the defective probability of one machine can easily be related to that of the other one, since both together have to exactly account for the actual fraction of produced defective items as recorded in the trace.
170
6.1
R. Buchholz, C. Krull, and G. Horton
Computational Accuracy
!"#$
!" ##"$
To determine the accuracy of the approach, we created multiple signal traces from the Tester system, but from different system instances with different, randomly chosen defect probabilities for the two machines. The traces were then analyzed using the iterative and the polynomial analysis algorithms. The results for the individual traces are shown in Figure 5. For each of the ten model instances, the actual value for the system parameter “defect probability of machine 0” are given in addition to the values reconstructed by the iterative and polynomial approaches. The results for the polynomial and iterative analysis are almost identical, giving confidence that they indeed answer the same question. And both results always differ only slightly from the actual system behavior. The difference between both reconstructions and the actual system behavior is likely to be unavoidable: Both algorithms only reconstruct the parameters values for which the system most likely caused the trace, but the actual system behavior is not necessarily identical to the most likely explanation.
Fig. 5. Simulation results for the analysis Fig. 6. Increase of computation time unof ten traces with different defect rates in der increasing trace length for the polynothe real system mial and iterative analysis algorithms
6.2
Computation Time
The computation time of the algorithms is relevant to assess their practical applicability, especially with longer traces. For this experiment, we generated a trace covering 500, 000s (about 5 days) of simulated time containing about 7, 500 symbols; ten times as many as the traces for the other experiments. The computation time used was then recorded every analyzed 10, 000s for both algorithms. Figure 6 shows the raw computation times, which need to be interpreted with care: For the polynomial algorithm, a single analysis run is always sufficient to reconstruct the system behavior. The iterative approach on the other hand requires repetitive analyses until its results converge. To give an indication of how the computation times compare, we plotted the results for a single iteration as well as for 20 iterations – a reasonable number of iterations till convergence. The computation time of the iterative approach increases linearly, that of the polynomial approach on the other hand increases polynomially with a low initial slope. This is due to the symbolic polynomials increasing in length over time
Reconstructing Model Parameters
171
and thus making their computations more costly. Overall, the magnitude of the computation time is similar for both algorithms. Which algorithm is faster for the analysis of a specific trace and model depends on the trace length and the number of iteration steps required for convergence. With the polynomial approach having to multiply and store polynomials using high precision floating point numbers that the CPU does not natively support, one would expect the polynomial approach to be slower than the iterative one by orders of magnitude even for short traces. But the polynomial algorithm does not have to encode history information into the system states (cf. Section 3.2), which leads to a far lower number of Proxels required for the analysis and partially compensates for the increased computational effort required for each Proxel. 6.3
Analysis of Ambiguous Systems
Some systems have multiple equally likely explanations for their internal behavior. For example, if the two machines in the Tester system had identical production behavior (i.e. identical probability distribution and distribution parameters), they could not be distinguished. An algorithm suitable for practical applications should fail gracefully in these cases. To test algorithm behavior on this class of models, we created a trace for a modified Tester model where both production durations were N (120, 20) distributed, but had different defect probabilities. The trace was then analyzed by both new algorithms. Figure 7 shows the progression of the iterative analysis. Since the initial guess for the defect probabilities is almost (due to floating point inaccuracies) identical to the local minimum of the likelihood polynomial (cf. Figure 8), the result barely changes between the first few iterations. The iterative algorithm, which uses the difference between the results of two iterations as a termination criterion, would ordinarily terminate right away and would return this locally most unlikely parameter value as the most defect probability. If forced to perform further iterations, the results diverge only after 60 iterations to one of the two local maxima, depending on on which side of the likelihood minimum the initial estimate was located. In effect, the algorithm randomly proclaims one of the two different but equally likely outcomes to be the most likely system behavior, and ignores the second one. The polynomial approach reliably finds both maxima (cf. Figure 8). So, it correctly determines that one machine has caused about twice as many defects as the other one, and correctly states that it is not possible to distinguish the two machines. Thus, the iterative analysis is unreliable in the general case since it may find the global maximum, or just a random local maximum, or may even be stuck in a local minimum of the likelihood. It is only reliable when the likelihood polynomial is guaranteed to only contain a single maximum and no minima. The polynomial approach, on the other hand, always finds the most likely value(s) for the unknown parameter irrespective of the shape of the likelihood polynomial.
172
R. Buchholz, C. Krull, and G. Horton
Fig. 7. Progression of the iterative Fig. 8. Likelihood polynomial for a trace analysis of a trace from an ambiguous from an ambiguous Tester model model
7
Conclusion and Outlook
In this paper, we have presented two approaches that enable the reconstruction of parts of the system specification of partially-observable discrete stochastic systems from an incomplete model and a trace of external observations of its behavior. It should be noted that the task of both algorithms is only to reconstruct parameters of the system that most likely has created the trace. In the same way that a star athlete may be most likely to win a sports competition, but is not guaranteed to win it, the reconstructed most likely explanation is not necessarily the actual cause. The iterative algorithm is a simple modification to the existing algorithms and is usually able to correctly determine the most likely parameter values in about 20 iterations. However, being a local optimization algorithm, it does not necessarily find the actual most likely system behavior, but only a value that is more likely to represent the actual system behavior than neighboring values on both sides. Additionally, its behavior is undefined if the initial estimate for the unknown parameter is less likely to represent the actual system behavior than neighboring values on both sides. The polynomial algorithm is a more complex modification to the existing algorithms, using symbolic computations on polynomials to cope with incomplete specifications. It is thus computationally more expensive than the iterative approach, but in turn is guaranteed to reconstruct the most likely real system behavior. In practice, the iterative algorithm may be preferred in real-time application scenarios due to its simplicity and speed, especially for systems where local optimization algorithms are guaranteed to also find the global optimum (i.e. those with no local minima and only a single local maximum), and where more accurate initial estimates may be available (e.g. by using the results of the trace of the previous day as an estimate for the next day) and thus fewer iterations are required. The polynomial algorithm is better suited to analyze the likelihood of different system configurations off-line and as a benchmark of accuracy for other approaches.
Reconstructing Model Parameters
7.1
173
Future Work
So far, the algorithms presented can only be used to reconstruct constant probability values in the model specification; probability distributions and their parameters always have to be known. In the future, we plan on investigating the possibility of approximating the influence of distribution parameters through polynomials and thereby enabling the reconstruction of the most likely probability distribution parameters. This would constitute a major step in the direction of model training for partially-observable discrete stochastic systems.
References 1. van der Aalst, W.M.P.: Analysis of discrete-time stochastic petri nets. Statistica Neerlandica 54(2), 237–255 (2000) 2. Aoki, M.: State space modeling of time series. Springer-Verlag New York, Inc., New York (1986) 3. Bobbio, A., Puliafito, A., Telek, M., Trivedi, K.S.: Recent developments in nonmarkovian stochastic petri nets. Journal of Systems Circuits and Computers 8(1), 119–158 (1998) 4. Borshchev, A., Filippov, A.: From system dynamics and discrete event to practical agent based modeling: Reasons, techniques, tools. In: Proceedings of 22nd International Conference of the System Dynamics Society, Oxford, England (July 2004) 5. Boys, R.J., Wilkinson, D.J., Kirkwood, T.B.: Bayesian inference for a discretely observed stochastic kinetic model. Statistics and Computing 18, 125–135 (2008) 6. Buchholz, R., Krull, C., Horton, G.: Efficient event-driven proxel simulation of a subclass of hidden non-markovian models. In: 7th EUROSIM Congress on Modelling and Simulation (2010) 7. Buchholz, R., Krull, C., Horton, G., Strigl, T.: Using hidden non-markovian models to reconstruct system behavior in partially-observable systems. In: 3rd International ICST Conference on Simulation Tools and Techniques (2010) 8. FSF. The gnu multiprecision library (gmp), http://gmplib.org 9. Gibson, G.J., Renshaw, E.: Estimating parameters in stochastic compartmental models using markov chain methods. Mathematical Medicine and Biology 15(1), 19–40 (1998) 10. Horton, G.: A new paradigm for the numerical simulation of stochastic petri nets with general firing times. In: European Simulation Symposium. SCS European Publishing House, Dresden (2002) 11. Krull, C., Buchholz, R., Horton, G.: Matching hidden non-markovian models: Diagnosing illnesses based on recorded symptoms. In: The 24th annual European Simulation and Modelling Conference (October 2010) 12. Krull, C., Horton, G.: Hidden non-markovian models: Formalization and solution approaches. In: Proceedings of 6th Vienna International Conference on Mathematical Modelling, Vienna, Austria (February 2009) 13. Lazarova-Molnar, S.: The Proxel-Based Method: Formalisation, Analysis and Applications. Ph.D. thesis, Otto-von-Guericke University Magdeburg (2005)
174
R. Buchholz, C. Krull, and G. Horton
14. Malyarenko, A., Vasiliev, V.: On guaranteed parameter estimation of discrete-time stochastic systems. In: Second International Conference on Innovative Computing, Information and Control ICICIC 2007, p. 140 (September 2007) 15. Rabiner, L.R.: A tutorial on hidden markov models and selected applications in speech recognition. Proceedings of the IEEE 77(2), 257–286 (1989) 16. Wang, Y., Christley, S., Mjolsness, E., Xie, X.: Parameter inference for discretely observed stochastic kinetic models using stochastic gradient descent. BMC Systems Biology 4(1), 99 (2010)
Performance Evaluation of a Kitting Process Eline De Cuypere and Dieter Fiems Department of Telecommunications and Information Processing, Ghent University, St-Pietersnieuwstraat 41, B-9000, Belgium {eline.decuypere,dieter.fiems}@telin.ugent.be
Abstract. Nowadays, customers request more variation in a company’s product assortment leading to an increased amount of parts moving around on the shop floor. To cope with this tendency, a kitting process can be implemented. As it gathers the necessary parts into a container prior to assembly, kitting enables a more cost-efficient and qualitative production. However, the performance of this preparation technique in an assembly process has merely been investigated. Therefore, we study a kitting process with two parts as a continuous-time Markovian queueing model. Using sparse matrix techniques to solve this model, we assess the impact of kitting interruptions, bursty part arrivals and the kitting time distribution on the behaviour of the part buffers.
1
Introduction
Nowadays manufacturing systems are often composed of multiple in-house fabrication units [11]. The semi-finished products stemming from these units are the input materials of other fabrication units or for assembly lines. Hence, efficient transport of materials between the different stages of the production process is key for overall production cost minimisation. Kitting is a particular strategy for supplying materials to an assembly line. Instead of delivering parts in containers of equal parts, kitting collects the necessary parts for a given end product into a specific container, referred to as kit, prior to arriving at an assembly unit [1,2,11,13,14,16]. Kitting mitigates storage space requirements at the assembly station since no part inventories need to be kept there. Moreover, parts are placed in proper positions in the container such that assembly time reductions can be realized. Additional benefits include reduced learning time of the workers at the assembly stations and increased quality of the product. Although kitting is a non-value added activity, its application can reduce the overall materials handling time [14]. Indeed activities such as selecting and gripping parts are performed more efficiently. Furthermore, the whole operator walking time is drastically reduced or even eliminated since kits of components are brought as a whole to the assembly station [8]. The advantages mentioned above do not come for free since the kitting operation itself incurs additional costs such as the time and effort for planning the allocation of the parts into kits and the kit preparation itself. Moreover, the introduction of a kitting operation in a production process involves a major K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 175–188, 2011. c Springer-Verlag Berlin Heidelberg 2011
176
E. De Cuypere and D. Fiems
investment and the effect on efficiency are uncertain. Therefore, it is important to analyse the performance of kitting in a production environment prior to its actual introduction. This is the subject of the present paper. In literature, most authors consider a kitting process as a queueing system with stochastic part arrivals and kit assembly. Hopp and Simon [7] develop a model for a kitting process with exponentially distributed processing times for kits and Poisson arrivals. They find accurate bounds for the required capacity of the buffer for kitting processes with two basic components. Explicitly accounting for finite buffer capacities, Som et. al [16] further refine the results of Hopp and Simon. Of course real buffers always have a finite capacity, the capacity being constraint by the storage room. However, if the capacity is large enough, we can have a good approximation of a process with a finite capacity on the basis of a model with unlimited capacity. This means that there is always enough space for upcoming parts which simplifies the analysis. Unfortunately, the assumption of an infinite buffer is not valid for kitting processes. If the capacity is assumed to be infinite, then the model will degrade to an unstable stochastic model. This was demonstrated in [9] where waiting lines with paired customers were studied. We can consider this analysis as an abstraction of a kitting process with two types of parts. Furthermore, in the article "Assembly-like queues", Harrison [6] confirms that it is necessary to impose a restriction on the size of the buffer to ensure stability in the operations of a kitting process. Under this assumption, the probability to have a certain long-term stock position is equal and independent of the current stock position. In this work, we focus on a kitting process modulated by a Markovian environment. The introduction of this environment allows us to study kitting under more realistic stochastic assumptions: kitting interruptions, bursty part arrivals and phase-type distributed kitting times, etc. Section 2 describes the kitting process at hand. In section 3, Chapman-Kolmogorov equations are derived and their numerical solution is discussed. In particular, the use of iterative methods for solving sparse matrix equations is examined. To illustrate our approach, section 4 considers a number of numerical examples. Finally, conclusions are presented in section 5.
2
Model Description
In this paper, we study a two-queue kitting process, as depicted in Figure 1. Each queue has a finite capacity — let C denote the capacity of buffer , = 1, 2 — and models the inventory of parts of a single type. New parts arrive at the buffers and, if both buffers are non-empty, a kit is assembled by collecting a part from each buffer. Hence, departures from the buffers are synchronised, the buffers are paired. Operation of part buffers therefore differs considerably from other queueing systems. Arrivals at both buffers are modelled by a Markovian stochastic process and kit assembly is not instantaneous. For ease of modelling, it is assumed that there
Performance Evaluation of a Kitting Process
L1
177
C1 M
L2
C2
Fig. 1. Kitting process: the queues or inventories are on the left, and the triangularly shaped kitting process is on the right
is a modulating Markov chain, arrival and service rates depending on the state of this chain. To be more precise, the kitting process is modelled as a continuoustime Markov chain with state space C1 × C2 × K, whereby C = {0, . . . , C } for = 1, 2 and with K = {1, 2, . . . , K} being the state space of the modulating chain. At any time, the state of the kitting process is described by the triplet (m, n, i), m and n being the number of parts in the first and second buffer respectively, and i being the state of the modulating chain. We now describe the state transitions. – The state of the modulating chain can change when there are neither arrivals nor departures. Let αij denote the transition rate from state i to state j (i, j ∈ K, i = j) and let A denote the corresponding generator matrix. – The state of the modulating chain may remain the same or may change when () there is an arrival. Let λij denote the (marked) transition rate from state i to state j when there is an arrival at buffer , = 1, 2. Moreover, let L denote the corresponding generator matrix. Note that marked transitions from state i to state i are allowed. – Analogously, the state of the modulating chain may remain the same or may change when there is a departure (in each buffer). Let μij and M denote the corresponding transition rate and generator matrix respectively. Summarising, arrivals at and departures from the buffers are described by the matrices A, L1 , L2 and M. So far, no diagonal elements of A have been defined. To simplify notation, it will be further assumed that the diagonal elements are chosen such that the row sums of A + L1 + L2 + M are zero. The computational method employed here does not require any homogeneity of the generator matrices. When required by the applications at hand, intensities may depend on the buffer content. In this case, we introduce superscripts to make this dependence explicit. For example, M(m,n) denotes the generator matrix of state transitions with departure when there are m parts in buffer 1 and n parts in buffer 2. Remark 1. By non-homogeneity it is perfectly possible that the Markov chain of the kitting process is not irreducible. In this case, we limit the chain to the irreducible class of the state that both buffers are empty and the modulating chain is in state 1.
178
E. De Cuypere and D. Fiems
Before proceeding, we introduce a number of specific application scenarios of the kitting model at hand. Example 1. In the most basic setting, parts arrive at the buffers in accordance with an independent Poisson processes with rate λ1 and λ2 and kitting times are exponentially distributed with parameter μ. In this case, there is no need to have a modulating Markov chain, the state is completely described by the number of parts in each buffer, (m, n). We have, M = μ , L1 = λ1 , L2 = λ2 , A = −λ1 − λ2 − μ . Example 2. To account for burstiness in the arrival process of the parts at the different buffers, the modulating chain allows to mitigate Poissonian arrival assumptions: We can replace the Poisson processes by a two-class Markovian arrival processes. Multi-class Markovian arrival processes allow for intricate correlation and can be efficiently characterised from trace data [4,5]. As we have two types of arrivals, the Markovian arrival process is described by the generator matrix Λ1 of transitions with arrivals at buffer 1, the generator matrix Λ2 with arrivals at buffer 2 and the generator matrix Λ0 without arrivals. As usual, the diagonal elements of Λ0 are negative and ensure that the row sums of Λ0 + Λ1 + Λ2 are zero. Retaining exponentially distributed kitting times, we have, L1 = Λ1 ,
L2 = Λ2 ,
A = Λ0 − μI ,
M = μI .
Here I denotes the identity matrix. Example 3. As for the arrival processes, the model at hand is sufficiently flexible to include phase-type distributed kitting times. The phase-type distribution is completely characterised by an initial probability vector τ and the matrix T which corresponds to non-absorbing transitions [10]. Denote e a unit row vector of appropriate length. We assume that all vectors are row vectors. The prime is used as the transpose operator, i.e. e is the unit column vector. Let t = −Te be the column vector with the rates to the absorbing state and let f be a vector with zero-elements except the first one. Assuming Poisson arrivals in both queues (with rate λ1 and λ2 , respectively), we get the following matrices, (m,n) = λ1 I 1 − 1{m=0,n>0} + λ1 e τ 1{m=0,n>0} L1 (m,n) L2 = λ2 I 1 − 1{m>0,n=0} + λ2 e τ 1{m>0,n=0} A(m,n) = T1{m>0,n>0} − λ1 I − λ2 I M(m,n) = t τ 1{m>1,n>1} + t f (1 − 1{m>1,n>1} ) Here, it is assumed that the background state equals 1 if one of the buffers is empty. When service starts again, the background state is chosen in accordance with the probability vector τ .
3
Analysis
Having established the modelling assumptions and settled our notation, we now focus on the analysis of the kitting process.
Performance Evaluation of a Kitting Process
3.1
179
Balance Equations
The aim is to define a set of equations for the steady state probability vector for the Markov chain [Q1 (t), Q2 (t), S(t)], Q (t) being the number of parts in buffer at time t and S(t) being the state of the background chain at time t.
···
··· (1)
··· (1)
λii
(1)
λii (2)
λii (2)
λii
λii
(2)
···
λii
(2)
m−1, n−1, i
μii
(1)
λii
λii
(2)
m, n−1, i
μii
(1)
λii
μii
(2)
···
m−1, n, i
(1)
λii
λii
(1)
(1)
λii
(2)
λii
m, n+1, i
λii
···
(1)
λii
μii
(2)
···
···
λii
μii
(2)
m, n, i
λii
μii
λii
m−1, n+1, i
(2)
m+1, n−1, i
m+1, n, i (2)
(1)
···
λii
···
(2)
λii
λii
m+1, n+1, i λii
(1)
λii ···
(1)
λii ···
Fig. 2. Fragment of the transition rate diagram for state (m, n, i)
Let πi (m, n) = limt→∞ Pr[Q1 (t) = m, Q2 (t) = n, S(t) = i] be the steady state probability to be in state [m, n, i] and let π(m, n) be the vector with elements πi (m, n), for i ∈ K. Figure 2 shows a fragment of the transition rate diagram of the kitting model in state (m, n, i). As mentioned above, two independent () input streams arrive at the buffers with intensity λij and are processed into kits with intensity μij . Upon completion of a kit, the queue content of both buffers is decreased by 1. Note that we only show the transitions whereby the modulating Markov process remains in state i. Moreover, possible dependence of the transition rates on the buffer sizes is not indicated. Based on the transition rate diagram and considering different queueing states, we now derive the balance equations of the studied kitting process.
180
E. De Cuypere and D. Fiems
– First, consider the case where both buffers store one or more parts and the values are below that of the capacity, 0 < n < C1 and 0 < m < C2 . We have, ⎛ ⎞ K K K (1) (2) λij (m, n) + λij (m, n) + μij (m, n) + αij (m, n)⎠ πi (m, n) ⎝ j=1
=
K j=1
+
j=1
j=1,j=i
(1)
πj (m − 1, n)λji (m − 1, n) +
K
K j=1
(2)
πj (m, n − 1)λji (m, n − 1)
πj (m + 1, n + 1)μji (m + 1, n + 1)
j=1 K
+
πj (m + 1, n + 1)αji (m, n) ,
j=1,j=i
or equivalently, (m−1,n)
π(m − 1, n)L1
(m,n−1)
+ π(m, n − 1)L2
+ π(m + 1, n + 1)M(m+1,n+1) + π(m, n)A(m,n) = 0 . – If buffer 1 is empty and buffer 2 neither empty nor full (m = 0 and 0 < n < C2 ), we have, ⎛ ⎞ K K K (1) (2) πi (0, n) ⎝ λij (0, n) + λij (0, n) + αij (0, n)⎠ j=1
=
K j=1
j=1 (2)
j=1,j=i
πj (0, n − 1)λji (0, n − 1) +
K
πj (1, n + 1)μji (1, n + 1)
j=1
+
K
πj (0, n)αji (0, n) ,
j=1,j=i
or equivalently, (0,n−1)
π(0, n − 1)L2
+ π(1, n + 1)M(1,n+1) + π(0, n)(A + diag(M(0,n) e ) = 0 .
– Similarly, if buffer 2 is empty and buffer 1 neither empty nor full (n = 0 and 0 < m < C1 ), we have, (m−1,0)
π(m − 1, 0)L1
+ π(m + 1, 1)M(m+1,1) + π(m, 0)(A + diag(M(m,0) e ) = 0 .
– If both buffers are empty (m = 0 and n = 0), we have, π(1, 1)M(1,1) + π(0, 0)(A(0,0) + diag(M(0,0) e )) = 0 .
Performance Evaluation of a Kitting Process
181
– If buffer 1 is empty and buffer 2 is full (m = 0 and n = C2 ), we get, (0,C2 −1)
π(0, C2 − 1)L2
(0,C2 )
+ π(0, C2 )(A(0,C2 ) + diag(M(0,C2 ) e + L2
e )) = 0 .
– Similarly, if buffer 1 is full and buffer 2 is empty (m = C1 and n = 0), we have, (C1 −1,0)
π(C1 − 1, 0)L1
(C1 ,0)
+ π(C1 , 0)(A(C1 ,0) + diag(M(C1 ,0) e + L1
e )) = 0 .
– Finally, if both buffers are full (m = C1 and n = C2 ), we find, (C1 −1,C2 )
π(C1 − 1, C2 )L1
(C1 ,C2 −1)
+ π(C1 − 1, C2 )L2
(C1 ,C2 )
+ π(C1 , C2 )(A(C1 ,C2 ) + diag(L1
(C1 ,C2 )
e + L2
e )) = 0 .
Remark 2. Recall that the diagonal elements of the matrix A are chosen such that the row sums of A + L1 + L2 + M are zero. For the boundary cases, the diagonal values of the matrix A may therefore take into account impossible transitions like an arrival when the buffer is full or a departure when one of the buffers is empty. Obviously, since no homogeneity of the generator matrices is required, we can adapt the input matrices for the boundary cases. Nevertheless, it is more convenient to make this explicit in the balance equations. This explains the presence of the diagonal matrices in the equations above. 3.2
Performance Measures
Given the steady-state vectors π(m, n), we now can obtain a number of interesting performance measures for the kitting system. For ease of notation, let π(m, n) = π(m, n)e denote the probability tohave m parts in buffer 1 (1) (2) and (n) = n π(m, n) and π n parts in buffer 2. Moreover let π (m) = π(m, n) denote the marginal probability vectors. Finally, the probability m mass functions of the buffer contents equal π (1) (m) = π (1) (m)e and π (2) (n) = π (2) (n)e . The following performance measures are of interest – The mean buffer 1 and 2 content E Q1 and E Q2 respectively, E Q1 =
C1
π (1) (m)m ,
m
E Q2 =
C2
π (2) (n)n .
n
– The variance of the buffer 1 and 2 content Var Q1 and Var Q2 respectively, Var Q1 =
C1 m
π
(1)
2
2
(m)m − (E Q1 ) ,
Var Q2 =
C2
π (2) (n)n2 − (E Q2 )2 .
n
– The effective load of the system ρeff is the amount of time that kitting is ongoing. As kitting is only ongoing when none of the buffers are empty, we have, ρeff = 1 − π (1) (0) − π(2) (0) + π(0, 0) .
182
E. De Cuypere and D. Fiems
– Let the throughput η be defined as the number of kits departing from the system per time unit. Taking into account all possible states from which we can have a departure, we find, η=
C1 C2
π(m, n)M(m,n) e
m=1 n=1
– The blocking probability — b1 for buffer 1 and b2 for buffer 2 — is the probability that production prior to the part buffers is blocked. This is the case if the corresponding buffer is full. Hence, we have the following expressions for the blocking probabilities, b1 = π (1) (C1 ) ,
b2 = π (2) (C2 )
Note that for Poisson arrivals, the blocking probability corresponds to the loss probability (the fraction of the customers that cannot enter the system) as defined for classical finite-capacity systems. Moreover, as the departure rates from the queues are equal by definition, the loss probabilities — and therefore also the blocking probabilities under Poisson assumptions — are equal if the arrival rates at the buffers are equal. 3.3
Methodology: The Sparse Matrix Techniques
Queueing models for kitting processes are rather complicated. Indeed, the modelled kitting process has a multidimensional state space. Even for relative moderate buffer capacity, the multidimensionality leads to huge state spaces; this is the so-called state-space explosion problem. For many queueing systems, infinite-buffer assumptions may mitigate this problem. Given some buffer system with finite capacity, more efficient numerical routines can be constructed for the corresponding queueing system with infinite capacity. Unfortunately, as mentioned above, the infinite-buffer capacity assumption is not applicable for kitting processes and therefore cannot simplify the analysis. Recall that the infinite-capacity model is always unstable. For all input parameters except trivial ones (no arrivals), some or all of the queues grow unbounded with positive probability. Consequently, the multidimensionality of the state space and the inapplicability of the infinite-buffer assumption yield Markov chains with a finite but very large state space. However, the number of possible state transitions from any specific state is limited. This means that most of the entries in the generator matrix are zero; the matrix is sparse. In contrast to matrix-analytic methods, sparse matrix techniques have hardly been used in queueing theory. As illustrated by the numerical examples, using sparse matrices and their associated specialised algorithms results in manageable memory consumption and processing times, compared to standard algorithms. The method used here to solve the sparse matrix equation is the projection method GMRES (Generalized Minimum Residual). Details can be found in [17]
Performance Evaluation of a Kitting Process
183
(p.197–205) and [3,12,15]. Since the residual norm is minimized at every step of the method, it is clear that it is non increasing. However, the work and storage requirement per iteration increases linearly with the iteration count. Hence, the cost of n iterations grows O(n2 ) which is a major drawback of GMRES. This limitation is usually overcome by restarting the algorithm. After a chosen number of iterations m, the accumulated data are cleared and the intermediate results are used as the initial data for the next m iterations [15]. To ensure fast convergence, it is also key to properly choose the initial vector that is passed on to the algorithm. We rely on MATLAB’s build in GMRES algorithm which assumes a zero initial vector by default. However, calculation speed improves by assuming an uniform initial vector, even if this assumption is incorrect. Calculation speed can be further improved as, in practice, performance measures are not calculated for an isolated set of parameters. E.g., when a plot is created, a parameter is varied over a range of values. In this case, a previously calculated steady-state vector for some set of parameters can be used as a first estimate of the steady-state vector for a new “perturbed” set of parameters. Using previously calculated steady-state vectors is trivial if the state spaces of the parameter sets are equal. In this case, the previously calculated steady-state vector can be passed on unmodified. If the state space changes, the steadystate vector must be rescaled to the new state space. In general, adding zeroprobability states if the state space increases or removing states if the state space decreases, turns out to be ineffective. This is easily explained by a simple example. Assume that we increase the queue capacity of one of the part buffers. Typically, even for moderate load, a considerable amount of probability mass can be found for queue size equal to capacity. Increasing the queue size and assigning zero probability to the new states is not a good estimate for the new steadystate vector. Also for the system with higher capacity, a considerable amount of probability mass can be found when the queue size equals the capacity (while zero probabilities were assigned).
4
Numerical Results
With the balance equations at hand, we now illustrate our numerical approach by means of some examples. 4.1
Bursty Part Arrivals
As a first example, we quantify the impact of production inefficiency on the performance of a kitting process. To this end, we compare part buffers with Poisson arrivals to corresponding kitting systems with interrupted Poisson arrivals, the arrival interruptions account for inefficiency in the production process. Kit assembly times are assumed to be exponentially distributed with service rate equal to one, this value being independent of the number of parts in the different buffers. This is a kitting process with Markovian arrivals as described in example 2 in section 2.
184
E. De Cuypere and D. Fiems
The interrupted Poisson process considered here is a two-state Markovian process. In the active state, new parts arrive in accordance with a Poisson process with rate λ whereas no new parts arrive in the inactive state. Let α and β denote the rate from the active to the inactive state and vice versa, respectively. We then use the following parameters to specify the interrupted Poisson process. σ=
β , α+β
κ=
1 1 + , α β
ρ = λσ .
Note that σ is the fraction of time that the interrupted Poisson process is active, the absolute time parameter κ is the average duration of an active and an inactive period, and ρ is the arrival load of the parts. Mean number of parts in buffer 1 60 Poisson for both parts
C1=C2=60
IPP for both parts
40
C1=C2=40
20
C1=C2=20
0
1
ρ =ρ 1
2
2
Fig. 3. When the queues are not fully loaded, burstiness in the production process has a negative impact on the performance
Figure 3 shows the mean number of parts in buffer 1 versus the arrival load, for various values of the buffer capacities C1 and C2 for Poisson arrivals (for both buffers) as well as for interrupted Poisson arrivals (again for both buffers). The arrival load is set to ρ = 0.8 for all curves. In addition, we set σ = 0.4 and κ = 10 for the interrupted Poisson processes. Clearly, the mean buffer content increases as the arrival load increases as expected. Moreover, if more buffer capacity is available, it will also be used: the mean buffer content increases for increasing values of C1 = C2 . Comparing interrupted Poisson and Poisson processes, burstiness in the production process has a negative impact on performance — more buffering is required — if the queues are not fully loaded (ρ < 1). As for ordinary queues, the opposite can be observed for overloaded buffers.
Performance Evaluation of a Kitting Process
185
By numerical examples, we could quantify expected buffer behaviour - e.g. more production yields higher buffer content, higher buffer capacity mitigates blocking of the production, etc. However, less trivial behaviour can be observed as well. Figure 4 depicts the blocking probability versus the buffer capacity C1 = C2 . Note that for a capacity equal to 100, the size of the state space equals 10201 for a kitting process with Poisson arrivals and 20402 for a process with interrupted Poisson arrivals. We compare performance of kitting with Poisson arrivals to kitting with interrupted Poisson arrivals at one buffer and at both buffers. As in the preceding figure, the interrupted Poisson process are characterised by σ = 0.4 and κ = 10. As expected, the blocking probability decreases for increasing values of the buffer capacities. Moreover, to reduce the blocking probability, more buffer capacity is required for the case of two interrupted Poisson processes than for the case of two Poisson processes. In addition, a non-trivial result was obtained: interruptions in the production of a part more negatively affect buffer performance of the other part. Indeed, the buffer of the other part will be full and empty more often.
Blocking probability for buffer 1 0.25 Poisson for both parts IPP for buffer 1 0.2
IPP for buffer 2 IPP for both buffers
0.15
0.1
0.05
0 10
50
100
C1=C2
Fig. 4. Interruptions in the production of a part more negatively affect buffer performance of the other part
4.2
Phase-Type Distributed Kitting Times
The second numerical example quantifies the impact of the distribution of the kitting times on kitting performance. In particular, we here study Erlang-distributed kitting times. Limiting ourselves to Poisson arrivals in both queues, this numerical example fits example 3 of section 2.
186
E. De Cuypere and D. Fiems
Mean number of parts in buffer 1 20 2
σ =1 2
σ =1/4 2
σ =1/8
Kitting model 10
M/PH/1 queue
0 0.6
0.9
1.2
ρ1 = ρ2
Fig. 5. In a situation of overload, the mean number of parts in buffer 1 is higher when more than one phase is considered
Blocking probability
0
10
Kitting model
−3
10
M/PH/1/n queue
σ2=1 σ2=1/4 σ2=1/8
−7
10
0.6
0.9
ρ =ρ 1
1.2
2
Fig. 6. In a situation of overload, the blocking probability is higher when more than one phase is considered
Performance Evaluation of a Kitting Process
187
Figures 5 and 6 depict the mean number of parts in buffer 1 and the blocking probability in buffer 1 for the kitting process and, as a reference point, for the M/PH/1/N queue as well. In both figures, the arrival load is varied and different values of the variance of the kitting time distribution are assumed as indicated. The mean kitting time is equal to 1 for all curves and the capacity of both buffers is equal to 20. The size of the state space of an Erlang-8 distributed kitting process is then equal to 3528. In underload (ρ < 1), kitting performs worse than the M/PH/1/N queue: the mean buffer content and the blocking probability have a higher value. This follows from the fact that kitting is held when one of the buffers is empty. By increasing the load, it is obvious that the buffer content converges to the capacity and the blocking probability to one. It is most interesting to observe that the shape of the service time distribution only has a small effect on these performance measures. Indeed, there is no significant performance difference when σ2 equals 1/4 and when it equals 1/8.
5
Conclusion
In this paper, we investigate buffers of two parts in a Markovian setting. As our numerical results show, the interplay between the different queues leads to complex performance behaviour. Interruptions in the production of a part more negatively affect buffer performance of the other part. Indeed, the buffer of the other part will be full and empty more often. Furthermore, in a situation of overload, the mean average of parts is higher when we consider variation in service time than when not. As most of the entries in the generator matrix have a value equal to zero, we apply sparse matrix techniques. To determine the unknowns of the system, we used the method GMRES (Generalized Minimum Residual). The solution is not exact but performs well in terms of solution speed and accuracy. Furthermore, the current numerical methodology does not impose any restrictions on the various involved intensities and hence allow for many extensions. Therefore, we can establish that the sparse matrix techniques are a valuable queueing theoretic numerical approach to estimate the performance of the kitting process. Some future work includes multiple queue kitting models, batch-service and batch-arrival queues, arrival processes adapted to the queue size considering delivery and ordering cost, etc.
References 1. Bozer, Y., McGinnis, L.: Kitting versus line stocking: A conceptual framework and a descriptive model. International Journal of Production Economics 28, 1–19 (1992) 2. Bryznér, H., Johansson, M.: Design and performance of kitting and order picking systems. International Journal of Production Economics 41, 115–125 (1995) 3. Buchholz, P.: Structured analysis approaches for large Markov chains. Applied Numerical Mathematics 31(4), 375–404 (1999)
188
E. De Cuypere and D. Fiems
4. Buchholz, P., Kemper, P., Kriege, J.: Multi-class Markovian arrival processes and their parameter fitting. Performance Evaluation 67, 1092–1106 (2010) 5. Fiems, D., Steyaert, B., Bruneel, H.: A genetic approach to Markovian characterisation of H.264 scalable video. Multimedia Tools and Applications, 1–22 (2011), http://dx.doi.org/10.1007/s11042-010-0713-x 6. Harrison, J.: Assembly-like queues. Journal Of Applied Probability 10(2), 354–367 (1973) 7. Hopp, W.J., Simon, J.T.: Bounds and heuristics for assembly-like queues. Queueing Systems 4, 137–156 (1989) 8. Johansson, B., Johansson, M.: High automated Kitting system for small parts: a case study from the Volvo uddevalla plant. In: Proceedings of the 23rd International Symposium on Automotive Technology and Automation, Vienna, Austria, pp. 75–82 (1990) 9. Latouche, G.: Queues with paired customers. Journal of Applied Probability 18, 684–696 (1981) 10. Latouche, G., Ramaswami, V.: Introduction to Matrix Analytic Methods in Stochastic Modeling (1999) 11. Medbo, L.: Assembly work execution and materials kit functionality in parallel flow assembly systems. International Journal of Industrial Ergonomics 31, 263–281 (2003) 12. Philippe, B., Saad, Y., Stewart, W.: Numerical methods in Markov chain modeling. Operations Research 40(6), 1156–1179 (1992) 13. Ramachandran, S., Delen, D.: Performance analysis of a Kitting process in stochastic assembly systems. Computers & Operations Research 32(3), 449–463 (2005) 14. Ramakrishnan, R., Krishnamurthy, A.: Analytical approximations for Kitting systems with multiple inputs. Asia-Paific Journal of Operations Research 25(2), 187–216 (2008) 15. Saad, Y., Schultz, M.: GMRES: A generalized minimal residual algorithm for solving non symmetric linear systems. SIAM Journal on Scientific and Statistical Computing 7, 586–869 (1986) 16. Som, P., Wilhelm, W., Disney, R.: Kitting process in a stochastic assembly system. Queueing Systems 17, 471–490 (1994) 17. Stewart, W.: Introduction to the numerical solution of Markov chains. Princeton University Press, Princeton (1994)
Perfect Sampling of Phase-Type Servers Using Bounding Envelopes Bruno Gaujal1 , Ga¨el Gorgo2,3, and Jean-Marc Vincent3 1
INRIA Rhˆ ones-Alpes 2 Bull 3 Universit´e Joseph Fourrier MESCAL Project, Laboratoire d’Informatique de Grenoble, 51, avenue Jean Kuntzmann, 38330 Montbonnot, France {Bruno.Gaujal,Gael.Gorgo,Jean-Marc.Vincent}@imag.fr Abstract. In queueing models, phase-type servers are very useful since they can be used to approximate any service distributions of real-life telecommunication networks. However, the corresponding Markov chains are in most cases very large and hard to solve without the help of an efficient simulation model. A simulation framework, based on perfect sampling, had already been developed to address the evaluation of large queueing models. Perfect sampling enables us to compute unbiased samples of the stationary distribution based on a backward coupling of the Markov chain trajectories, starting from all possible states. We use an optimized algorithm which consists in computing a set of extremal envelopes which bound all trajectories to obtain the coupling. When the chain is monotone, the envelopes are directly obtained by the trajectories coming from the extremal states. Otherwise, envelopes are upper and lower bounds over the whole set of trajectories. In this article we prove that phase-type systems are structurally non monotone even with the simplest phase-type distributions like Erlang, hyper-exponential or Coxian-type distributions. Then we provide a generic method for the computation of the upper and lower envelopes for general finite phase-type services in queueing networks. This allows the perfect sampling of such systems and its efficiency is illustrated through several examples. Keywords: Markov chains, perfect simulation, phase-type distributions.
1
Introduction
Using queueing models of real-life networks for dimensioning and performance evaluation can be dated back to the pioneering work of Erlang. The famed Erlang formulas have been used for assessing the performance of telecommunication network since them. The simplest formulas are based on the assumption that the incoming traffic is Poisson and the service distribution is exponential. While the Poisson assumption for the incoming traffic can be justified by the fact that incoming traffic is often the superposition of a large number of independent processes, the exponential distribution of service only comes from the fact that it leads to simple mathematical models. K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 189–203, 2011. c Springer-Verlag Berlin Heidelberg 2011
190
B. Gaujal, G. Gorgo, and J.-M. Vincent
Phase-type distribution for services is a class of distributions that is both easy to manipulate from a mathematical point of view because it is directly amenable to a Markov chain model and of great generality since this family is dense among all distribution over R+ . Of course, when a network designer wants to analyse a given distribution of service (say γ), far from an exponential, the number of phases required for a phase-type distribution to approach γ increases. The number of states in the corresponding Markov model also increases, making it harder and harder to solve. In this paper, we investigate how perfect simulation can be used to generate samples from the stationary distribution of a Markov chain that models a network of queues whose service distributions are phase-type. This problem contains two difficulties. The first one comes from the fact that the service events are not monotone in this case. This prevents us from using the classical extreme point simulation algorithm. Instead, we show how envelope simulations, introduced in [1], can be used in this framework. The second difficulty comes from the fact that envelopes may take an considerable amount of time to couple under a certain range of parameters. We have modified the Markov chain (while keeping the same stationary distribution) to make envelopes couple fast in all cases. Perfect sampling with envelopes for non-monotone chains is presented in Section 2. The model of phase-type server, as well as the construction of the new chain is defined in Section 3. Here we show that a queueing network containing phase-type services is not monotone. We then give the construction of the envelopes that enables us to apply the algorithm previously presented. In section 4, we prove that queueing networks containing phase-type servers do couple under the presented model. Section 5 displays some numerical evidence to study the link between the topology of the graph of phases and the coupling time of the perfect simulation. The influence of the arrival rates as well as of the service rates is also discussed and tested numerically.
2 2.1
Simulation Method Perfect Sampling
Let {X n }n∈N be an irreducible and aperiodic discrete time Markov chain with a finite state space X and a transition matrix P = (pi,j ). Let π denote the steady state distribution of the chain: π = πP . The evolution of the Markov chain always be described by a stochastic recurrence sequence X n+1 = n can n+1 , with {en }n∈N an independent and identically distributed sequence Φ X ,e of events belonging to a set of events E. The transition function Φ : X × E → X verifies the property that P (Φ(i, e) = j) = pi,j for every pair of states (i, j) ∈ X × X and a random event e ∈ E. Given an initial state x0 ∈ X and a sequence of events {en }n∈N∗ , the sequence of states {xn }n∈N resulting from the stochastic recurrence sequence is called a trajectory of the Markov chain. Let Φn : X × E n → X denote the function whose output is the state of the chain after n iterations and starting in state x ∈ X . That is: def Φn x, e1→n = Φ . . . Φ Φ x, e1 , e2 , . . . , en .
Perfect Sampling of Phase-Type Servers Using Bounding Envelopes
191
def This can beextended to sets of states: for A ⊂ X , Φn A, e1→n = n notation Φ x, e1→n , x ∈ A . In the following, |A| denotes the cardinality of set A. Theorem 1 ([5]). There exists ∈ N such that lim Φn X , e−n+1→0 = almost surely. n→∞
The system couples if = 1. In that case, the value of Φn (X , e−n+1→0 ) is steady state distributed. From theorem 1, perfect sampling consists in simulating the MC starting with all states in X . While the end state of trajectories at time 0 is not unique (i.e. while trajectories are not coupled), simulation is started from a further time in the past. Coupling is obtain with any time period greater than the coupling time τ ∗ , def τ ∗ = min n : Φn (X , e−n+1→0 ) = 1 . The main drawback is that computing the trajectories with all possible initial states is often too costly in practice, because of state-space explosion. Several approaches have been used to overcome this problem. The main one has been presented in [5]. When the state space X is partially ordered by an order and when the function Φ(·, e) is monotone for all e, that is ∀(x, y) ∈ X
x y ⇒ Φ(x, e) Φ(y, e),
then the Markov chain is monotone. Then, one only needs to compute trajectories issued from extremal states (maximal and minimal states). When coupling of the extrema occurs, all the trajectories couple by a sandwiching of the extremal trajectories, because of monotonicity. Monotone perfect sampling is an efficient method to estimate precisely the stationary distribution of a Markov chain. However, as soon as there is one nonmonotone case, it becomes unusable. In the next subsection we introduced a new algorithm, initially proposed in [1], which enables the steady-state estimation of a wide class of non-monotone systems. 2.2
Bounding Envelopes
In the following, the state space X is endowed with a partial order, denoted . With no loss of generality, this partial ordered set can be included into a larger set X , where the order becomes a complete lattice (i.e. where sup and inf exist). This is typically the case by setting X to be the Dedekind-MacNeille completion of X (i.e. the smallest lattice containing X ), see [2]. We consider a new transition function Γ , called the envelope, defined on the Cartesian product of the completed state space: Γ : X × X × E → X × X,
192
B. Gaujal, G. Gorgo, and J.-M. Vincent
for all m, M in X and e in E, def
def
Γ1 (M, m, e) = Φ(M, m, e) = def
def
Γ2 (M, m, e) = Φ(M, m, e) = def
sup
Φ(x, e),
inf
Φ(x, e).
mxM,x∈X mxM,x∈X
def
Let us call T = sup X (resp . B = inf X ) the top (resp. bottom) element of X . The process def (M n , mn ) = Γ n (T, B, e1→n ) is a Markov chain over the state space X ×X . However, the upper envelope alone is not a Markov chain (it depends on the lower envelope), neither is the lower one. Theorem 2 ([1]). Assume that (M n , mn ) hits the diagonal D (i.e. states of the form (x, x)) in finite time: def n −n+1→0 τe = min n : Γ (T, B, e )∈D , then τe is a backward coupling time of the initial Markov chain X n . The state defined by Γ τe (T, B, e−τe +1→0 ) has the steady-state distribution of the Markov chain. Algorithm 1. Envelope Perfect Sampling Algorithm Data: Φ , e−n n∈N Γ the pre-computed envelope function Result: A state x∗ ∈ X generated according to the stationary distribution of the system begin n = 0; M := T ; m := B; repeat for i = −2n + 1 downto 0 do (M, m) := Γ (M, m, e−i ); n := n + 1; until |[m, M ] ∩ X | = 1 ; x∗ := [m, M ] ∩ X ; return x∗ ; end
The trajectories of m, M as constructed in Algorithm 1 are the envelopes of the chain. All states of the chain stay in S = {x ∈ X , m x M }. Therefore, as soon as m = M (after τe steps), the chain has coupled at state m = M that is an unbiased sample of π. The gain, compared to the classical perfect sampling algorithm, is that the complexity does not depend on the size of the state space. However, the coupling time of envelopes τe might be larger than the coupling time τ ∗ for the initial
Perfect Sampling of Phase-Type Servers Using Bounding Envelopes
193
chain. Therefore, the efficiency of envelopes depends on the comparison of τe with τ ∗ . In the framework of queuing networks, this comparison is often in favor of envelopes (see [1]). For example, batch arrivals, negative customers, fork and join nodes all produce events that are non-monotone but for which envelopes are easy to compute and have a short coupling time. In the next section, we design the envelopes of generalized phase-type servers.
3
Phase-Type Server
A phase-type distribution, as defined in [4], is described by a Continuous Time Markov Chain H with an absorbing state (called F ), where a state of the MC represents the current phase of the server: A client begins its service in an initial phase randomly chosen according to an initial distribution α. Then it goes through the states of H (called phases) until it reaches the absorbing state, finishing its service. The transition parameters of H are given as follows: The time spent in each phase i is exponentially distributed with parameter τi . The transitions of the MC are given by a transition matrix P where Pij is the probability to move from phase i to phase j so that the total time of an execution of the MC (the time to reach the absorbing state) follows the defined phase-type distribution. An example is displayed in Figure 1(a). P68 .α1 P38 .α2 P38 .α1
τ1
τ3 α1
α2
τ1
1 τ2
2
P13
3
P14
τ4
P24
4
P25
τ5
5
1
P38
τ2
τ6 P46 P74 P37
6 τ7
P68
8
2
3
P14
τ4
P24
4
P25
τ5
P78
7
τ3
P13
5
τ6 P46 P74 P37
6 τ7
7
P78 .α1 P78 .α2 P68 .α2
(a) Phase-type distribution
(b) Phase-type server
Fig. 1. Phase-type server example
From this definition, we construct another continuous time Markov chain that models the succession of services. We first define an intermediate chain, where the absorbing state F is connected to all initial states using the initial distribution α: the server moves from phase F to an initial phase to treat the next client. This Markov chain has a drawback: the server will spend some time (exponentially distributed) in state F before starting a new service. However,
194
B. Gaujal, G. Gorgo, and J.-M. Vincent 1
2
3
(a) Phase-type server Server state
Server state 2
3
2
3
2
2
Input queue state
Input queue state
1
1
λ
1
λ.α1 λ.α2
Rest state
λ 1
λ.α1 λ.α2 0
Rest state
(b) SRS phase-type system
(c) MRS phase-type system
Fig. 2. Phase-type tandem example
in most queueing models, service of the next customer starts immediately after the end of the previous one. Therefore, to obtain the CTMC describing the succession of services, the state F is removed and all the predecessors of F inherit its transitions. This CTMC is called the phase-type server in the following. The construction of the phase-type server is given in Figure 1(b) for the running example. A phase-type tandem queue is composed of an input queue q of capacity C and an output queue q of capacity C where service times of the server in the input queue (server of q) follows a phase-type distribution. We represent the evolution of the system by a continuous time Markov chain {(Xq , Xϕ , Xq )n }n∈N , where Xq ∈ Xq = {0, . . . , C} is the number of clients in the input queue, Xϕ ∈ Xϕ = {1, . . . , F } is the phase into which the current client is treated and Xq ∈ Xq = {0, . . . , C } is the number of clients in the output queue. The state space X is the Cartesian product of all components;X = Xq × Xϕ × Xq . When a service occurs in the first server, the client which is served moves from the input queue to the output queue, so the state of the three components is modified simultaneously, so that the three components are synchronized. However, to construct the global Markov chain for the whole system, one problem remains. Indeed, the state of the first server when the first queue is empty (i.e. when Xq = 0) is not defined. The example displayed in Figure 2 (a phase-type server of 3 phases with an input queue of capacity 2) will be used in the following to illustrate how this synchronization problem can be solved.
Perfect Sampling of Phase-Type Servers Using Bounding Envelopes
195
A first solution is to aggregate all phases when Xq = 0 into one unique rest state for the server, this model will be called Single Rest State (SRS, Figure 2(b)) in the following. When a customer arrives while the server is in its rest state, the server chooses a new phase according to the initial distribution α. Another alternative is to keep the same phase-type server dynamics when Xq = 0. This will be called the Multiple Rest State (MRS, Figure 2(c)) model. Here, the idle server changes its phase as if it were serving a customer. To keep the same probabilistic behavior as with the SRS solution, as soon as a customer arrives, the server chooses a new initial phase according to the initial distribution α, independently of its current phase. Although the SRS solution may look more natural, we will use the MRS model because the runtime of EPSA is exponentially smaller than with the first solution when the arrival rate is smaller than the service rate (see Section 4.1 for further discussions on this). A complete description of the phase-type tandem is obtained by synchronizing the services of the phase-type server with the arrivals in the output queue. If the output queue is full, we assume that the client is rejected and lost by the system (overflow policy). To describe the server dynamics, we associate to each transition of the Phasetype server an event. In Figure 2, dashed arrows represent the end of service of a client, as well as a phase transition from a final phase to an initial phase. If the transition from phase i to phase j is an end of service, the corresponding event is denoted sij , otherwise it is denoted eij . The rates of events eij and sij are given by 1 1 μeij = .Pij , μsij = .αj . τi τi We give the transition function of these two classes of events: (xq , j, xq ) if xϕ = i Φ(x, eij ) = x otherwise. ⎧ ⎪ ⎨(xq , j, xq ) if xϕ = i and xq = 0 Φ(x, sij ) = (xq − 1, j, max(xq + 1, C ) if xϕ = i ⎪ ⎩ x otherwise. As for arrivals (with rate λ ), when the input queue is empty, the server must be reset to an initial phase according to α and that must be included into the transition function of arrival events. Thus, there is one arrival event ai for each initial phase i (αi > 0) with rate λai = λ.αi . The transition function of an arrival event ai is: (max(xq + 1, C), i, xq ) if xq = 0 Φ(x, ai ) = (max(xq + 1, C), xϕ , xq ) otherwise Finally, to model the services of clients in the output queue, we define a service event d with rate μ and transition function Φ(x, d) = (xq , xϕ , min(xq − 1, 0)).
196
3.1
B. Gaujal, G. Gorgo, and J.-M. Vincent
Non Monotonicity of a Phase-Type Server
We propose to show that phase-type tandems are not monotone on an example: a 2 phase Coxian service. The system consists of an M/Cox2 /1 queue sequentially composed with an M/M/1 queue (Figure 3). The state space of the system is X = {0, . . . , C} × {1, 2} × {0, . . . , C }. Cox Server λ
C 1
μ12
2
μ21
C
μ
μ11
Fig. 3. Tandem queueing network with Coxian service
With the construction defined in the previous section, the events of the phasetype tandem are: arrival in phase 1 denoted by a1 , phase 1 end of service denoted by e12 , phase 1 end of service with skip of the second phase denoted by s11 , phase 2 end of service denoted by s21 , departure from the output queue denoted by d. Proposition 1. Let be a partial order defined on X by: x y iff xq ≤ yq , xϕ ϕ yϕ and xq ≤ yq , x, y ∈ X , with ϕ a partial order on Xϕ = {1, 2}. Then there is no order ϕ such that the tandem network with Cox-2 service be monotone. Proof. In the following, the notation x y means that the states x and y are not comparable. If 1 ≺ϕ 2, we have Φ((1, 1, 4), s11 ) = (0, 1, 5) (6, 2, 4) = Φ((6, 2, 4), s11 ) while (1, 1, 4) ≺ (6, 2, 4). If 2 ≺ϕ 1, we have Φ((5, 2, 3), s11 ) = (5, 2, 3) (4, 1, 9) = Φ((5, 1, 8), s11 ) while (5, 2, 3) ≺ (5, 1, 8). If 1 ϕ 2, we have Φ((0, 2, 6), a1 ) = (1, 1, 6) (2, 2, 7) = Φ((1, 2, 7), a1 ) while (0, 2, 6) ≺ (1, 2, 7). For every choice of ϕ , there exists a counterexample that shows that the system is not monotone. 3.2
Envelopes for Phase-Type Service Events
The phase transition, service and arrival events we have defined are nonmonotone even for a very simple phase-type distribution. The aim of this section is to define the envelope functions of these events. We define an order on X which is the product order of totally ordered components (input queue, phase, output queue). The order on Xq and Xq is the natural order on integer. On the other hand, we define an order ϕ on Xϕ that will ensure the coupling of the envelopes (proved in section 4) as follows. We choose an arbitrary vertex of the phase-type server graph, that we call imax and
Perfect Sampling of Phase-Type Servers Using Bounding Envelopes
197
we construct the order ϕ from a covering in-tree of the graph where imax is the root of the in-tree. For example, on the graph of Figure 1(b), we choose phase 6 to be the root and the in-tree represented by bold arrows on the Figure. This tree describes the Hass diagram of a partial order. The order ϕ is an arbitrary linear extension of this previous partial order. For example, from the graph of Figure 1(b), we can choose the order : 1 ≺ϕ 3 ≺ϕ 2 ≺ϕ 5 ≺ϕ 7 ≺ϕ 4 ≺ϕ 6. As mentioned before, the product order on X is: x, y ∈ X , x y if xq ≤ yq , xϕ ϕ yϕ and xq ≤ yq . Then, we can define the envelope of events eij (moving from phase i to phase j) and sij (end of service of a client in phase i and moving to phase j). Note that we always suppose that mϕ ϕ i ϕ Mϕ . Otherwise, all states m x M are unchanged by Φ(x, eij ), so the envelope is also unchanged. We define the envelope function of an event eij by: If mϕ = Mϕ , then Φ(M, m, eij ) = Φ(M, eij ), Φ(M, m, eij ) = Φ(m, eij ). If mϕ ≺ϕ Mϕ , the marginal envelope functions on the phase component Φϕ and Φϕ are ⎧ ⎪ ⎨Mϕ − 1 if i = Mϕ and j ≺ϕ i Φϕ (M, m, eij ) = j if j ϕ Mϕ ⎪ ⎩ Mϕ otherwise. ⎧ ⎪ ⎨mϕ + 1 if i = mϕ and j ϕ i Φϕ (M, m, eij ) = j if j ≺ϕ mϕ ⎪ ⎩ mϕ otherwise.
(1)
(2)
Since an event eij is just a phase transition, the marginal envelope function on q and q components always keep the value of the upper envelope M and the lower envelope m. For an event sij , the envelopes on the phase component are the same as for an event eij . The marginal envelope functions on q and q components of an event sij are: If mϕ ≺ϕ Mϕ then Φq (M, m, sij ) = Mq ,
(3)
Φq (M, m, sij ) = mq − 1 if mq > 0 and
(4)
Φq (M, m, sij ) = Mq + 1 if Mq > 0 and Mq < C ,
(5)
Φq (M, m, sij ) = mq .
(6)
198
B. Gaujal, G. Gorgo, and J.-M. Vincent
In the same way, the envelope of an event ai , an arrival in the input queue with beginning in the initial phase i if xq = 0, is given by: i if Mq = 0 or (mq = 0 and Mϕ ≺ϕ i) Φϕ (M, m, ai ) = (7) Mϕ otherwise. Φϕ (M, m, ai ) = i if Mq = 0 or (mq = 0 and i ≺ϕ mϕ ) (8) mϕ otherwise. Φq (M, m, ai ) = Mq + 1 if Mq < Cq , Φq (M, m, ai ) = mq + 1 if mq < Cq .
(9) (10)
Notice that the cost of computing envelopes is in O(1) here. However, this is not sufficient to ensure the efficiency of the method because envelopes may never couple or have a large coupling time. In the next section, we show that envelopes always couple under the proposed model. In section 5, the mean coupling time is studied for several phase-type examples by numerical experiments.
4
Coupling of Phase-Type Systems Envelopes
This section is dedicated to the analysis of the coupling time of the envelopes for networks of phase type servers The main features can actually be seen in the simplest network: two queues in tandem with a phase-type server on the first queue. This case is considered first. The general case is considered in the second subsection. 4.1
The Tandem Case
Theorem 3. The envelopes of any phase-type tandem couple almost surely. Proof. To prove that the upper and lower envelopes meet almost surely, one needs to show that there exists at least one sequence of events e1 . . . en , called a n synchronizing word, such that Φ (M, m, e1→n ) = Φn (M, m, e1→n ) for all initial couple (M, m) ∈ X × X . We denote by a an arrival in queue q, by d an end of service in queue q and by tij a phase transition from phase i to phase j with or without a service. Let G = (Xϕ , E) be the phase-type server graph, with E the set of transitions. Let Xϕ = {1, . . . , g} be the set of re-numbered phases according to ϕ , that is ∀i, j ∈ Xϕ , i < j ⇐⇒ i ≺ϕ j. Then, the following event sequence is a synchronizing word:
(a)C (d)C t1j1 a d t2j2 a d . . . tiji a d . . . t(g−1)g a d where ji ∈ Xϕ is a phase such that (i, ji ) ∈ E and i ≺ϕ ji , for all i ∈ Xϕ .
Perfect Sampling of Phase-Type Servers Using Bounding Envelopes
199
In fact, it is clear that, by a sequence of C arrivals in the input queue and C services in the output queue, any couple (M, m) will reach a state where the input queue is full and the output queue is empty. In the sequence of phase transitions t1j1 t2j2 . . . t(g−1)g , each transition tiji may either increase mϕ by one or have no effect on mϕ . For each tiji , Mϕ may also increase taking the value ji (if ji > Mϕ ) or stay unchanged. Once Mϕ would reach phase g, it will never change anymore and mϕ will also join this state by the remaining events. So, while Mϕ and mϕ may couple before reaching phase g, coupling will be done in this phase, in the worst case. Sequences of events ad has been added to compensate the effect of possible services associated to transitions tij . To prove that such synchronizing word exists, we have to show that the event sequence t1j1 t2j2 . . . t(g−1)g is possible. It relies on the existence of a phase transition tij , with i ≺ϕ j, in all phase i except in the maximal phase g. This is true by construction of the order ≺ϕ , built on the covering in-tree with the maximum as root. Indeed, each phase i is connected by a forward transition to a greater phase, whatever the choseen linear extension. A suitable order ϕ can always be constructed if G is strongly connected, and a Phase-type server graph is strongly connected by definition. The previous discussion concerns the Multiple Rest State (MRS) model. If the Single Rest State (SRS) model was used instead, then the envelopes would not be as efficient. Indeed, let (mS (e1 . . . en ), M S (e1 . . . en )) denote the envelopes of the SRS model after the occurrence of events e1 , . . . en , while 1 n 1 n (m(e . . . e ), M (e . . . e )) are the envelopes of the MRS model, as described earlier. It is direct to show by induction that the sets all possible states (with positive queue size) inside the envelopes satisfy I S = {(xq , ϕ), xq > 0|mS (xq , ϕ) M S } ⊃ {(xq , ϕ), xq > 0|m (x,q , ϕ) M } = I for all n. This means that the computations of the envelopes is not as tight as in the MRS case. This phenomenon is particularly accute when m is the empty set (when mq = 0) and when the phases are equal in the MRS case. In that case, mS = (0, .), M S = (k, ϕ) and m = (0, ϕ), M = (k, ϕ), and I S = {(, f ), f ϕ, ≤ k} while I = {(, ϕ), ≤ k}. In the SRS case, one can show that the envelopes will eventually couple, as in the MRS case. However, coupling will be much longer than in the MRS case. In particular, if the event sϕmin does not exist (i.e. a service event in the minimal phase according to ϕ ) then the envelopes for SRS cannot meet in state (0, .) so that coupling will be exponentially slower than in the MRS case for lightly loaded queues, making the envelope method inapplicable in practice for the SRS model. This shows the importance of the model construction for simulation purposes. Here, both SRS and MRS models have the same stochastic behavior, however their simulations by envelopes have widely different efficiencies.
200
B. Gaujal, G. Gorgo, and J.-M. Vincent
4.2
Extension to Networks of Queues
If phase-type servers are connected by an arbitrary network, the approach presented in the previous section can be extended in a rather straightforward manner. Let us consider a network N of queues Q1 , . . . , Qk , of capacities C1 , . . . , Ck each of them with a phase-type server with graphs of phase transitions G1 , . . . , Gk . The queues are connected through a routing matrix R of size (0, 1, . . . , k) × (0, 1, . . . , k) where queue Q0 is a dummy queue representing the outside world. n The matrix R is such that the network has no sink (∀i, ∃n s.t. Ri,0 > 0) and n no starvation (for all ∀j, ∃n s.t. R0,j > 0). The state of system X is included in X := {(x1 , ϕ1 , . . . , xk , ϕk )s.t.∀i, 0 ≤ xi ≤ Ci , ϕi ∈ Gi }. In words, xi is the number of packets in queue i and ϕi is the phase of the server of queue i. The space X is ordered using the same approach as in the two queue case: Each phase-type graph Gi is ordered along a spanning tree and (x1 , ϕ1 , . . . , xk , ϕk ) (x1 , ϕ1 , . . . , xk , ϕk ) if for all i, xi ≤ xi and ϕi ϕ ϕi . The network N with routing matrix R is a Markov chain on X . The definition of the envelopes is the same as in the two-queue case: The envelopes are defined on each component xi and on each phase ϕi using Formulas from (1) to (10). As for the perfect simulation algorithm, the fact that the coupling time is almost surely finite, with a finite expectation is a direct consequence of the two queue case proved in Theorem 3. Theorem 4. Under the foregoing assumptions on the network N , The envelope perfect simulation algorithm terminates almost surely and the expected coupling time of the envelopes is finite. Proof. The proof is based on the construction of a synchronizing sequence for the envelopes. The existence of such a sequence implies the fact that envelopes couple almost surely and that the expected coupling time is finite, using the Lemma of Borel-Cantelli. Let us call ui the sequence of events that make queue i couple (in isolation). This sequence is given in Theorem 3. Here is the way to construct a global coupling sequence from the sequences ui . Since R has no starvation and no sink, it is possible to extract from R an acyclic connection graph A of N starting in input queues Qi (queues with exogenous arrivals, i.e. such that R0i > 0) and ending in output queues Qj (i.e. such that Rj0 > 0). The queues are now consider along the topological order induced by A. The input queues Qi are considered first. The sequence of events ui is used so that the components (ui , ϕi ) of both envelopes couple (using the proof of Theorem 3). From that point on, those components will remain coupled. Once the envelopes have coupled in the input queues, we consider one queue following them in A, say Qj . The individual coupling sequence uj is used to couple the envelopes on (xj , ϕj ) by replacing each arrival in Qj by an arrival and a service in one input queue of Qj . By doing this until all queues have been considered, all the components in the envelopes have coupled.
Perfect Sampling of Phase-Type Servers Using Bounding Envelopes
5
201
Experimental Results
In this section, we have gathered several experimental results providing evidence of the efficiency of the envelope perfect sampling as well as some insight on the parameters that most influence the simulation time of such systems. Figure 4 displays the average coupling time of one queue with capacity 20. This is done for several phase-type distributions of service in the queue: exponential service time (Fig. 5(a)), hyper-exponential service time with three phases (Fig. 5(d)), Erlang service with three phases (Fig. 5(b)), cox distribution with three phases (Fig. 5(c)), self designed phase time service as given in the Figure 5(e). For all distributions, the mean service rate is set to 1. The average is taken over a large number of simulations in order for the confidence interval to be smaller than 5 % on the reported values. The average coupling time is given as a function of λ/(λ + μ), where λ is the arrival rate in the queue and μ is the service rate in the queue. The parameters in all 5 cases have been chosen so that μ is always equal to 1. We let λ vary from 0 to 20 so that x = λ/(λ + μ) ranges from 0 to ≈ 0.95. When x is small, the first queue is lightly loaded and coupling in the queue happens at point 0 (empty queue) with a very high probability. When x is around 1/2, then the arrival rate and the service rate are almost the same in the queue so that coupling can happen equally likely with an empty queue or with a full queue. Finally, when x approaches 1, the load gets larger and larger, going to infinity. In this case, coupling happens with a full first queue with high probability. The first comment that can be made concerning Figure 4 is that the coupling time remains rather low in all cases, never exceeding 3000 time steps which means that sampling time (for 1000 independent samples) is never above one second. The second comment concerns the qualitative behavior of the coupling time as a function of the load. In all cases, the shape is almost symmetrical w.r.t. 1/2. This can be explained by the fact that empty or occupied seats in the queue play 3000
exp hyperexp−3 erlang−3 cox−3 self designed
coupling time
2500 2000 1500 1000 500 0
0
0.1
0.2
0.3
0.4
0.5
λ λ+μ
0.6
0.7
0.8
0.9
1
Fig. 4. Coupling time of EPSA in tandem queues, under several distributions of the service in the first queue, when the input rate λ varies
202
B. Gaujal, G. Gorgo, and J.-M. Vincent μ1 = μ=1 λ
λ
(a) server
μ1 = 3 1
λ
μ3 = 3
μ2 = 3
3
2
4 3
μ2 = 1
μ3 = 2
2
3
1
μ1
=
2 3
μ2 = 1
M/M/1 (b) Erlangian server with 3 (c) Coxian server with 3 phases phases μ1 =
3 2
1
α1 =
1 2
α2 =
λ α3 =
1 4
μ2 =
1 4
3 4
λ
2
μ3 = 3
μ12 = 4
3 4
1
2
μ23 = 2 μ13 = 2
μ24 = 4 μ12 = 4 μ32 = 2
3
4
μ34 = 2
(d) hyper-exponential server (e) Self-designed server example with 3 phases Fig. 5. Five phase-type service distributions
almost identical roles so that full and empty queues behave the same when λ and μ are exchanged in a single queue. The fact that the symmetry is not perfect comes from the difference between Poisson arrivals and phase type services (a way to see this is to notice that coupling time is perfectly symmetrical in the exponential case). Another easy conclusion is that the coupling time increases sharply around λ = μ is almost all cases. This can be proved exactly in the exponential case (see [3]). This is due to the fact that when λ = μ the average drift in the queue is null so that the number of customers in the queue hardly reaches the extreme values C or 0 where coupling takes place. Let us focus on the lightly loaded case (λ/(λ + μ) close to 0), that is the most usual case in practise. One can see that the coupling time compare in the same way as that the average number of events needed for a customer to leave the system. Since coupling happens at 0 with high probability here, such a correlation is be expected. The shift to the left of the pick for the hyper-exponential case can be explained by the following fact. Even if reaching a state with a full or with an empty queue are equally likely when λ = μ, coupling is not symmetrical: Coupling is easier when the queue is full than when the queue is empty because of the phase changes due to arrivals. Therefore, coupling is actually slightly longer when the empty queue is easier to reach (i.e. with λ smaller than μ). To further illustrate this behavior, Figure 6 displays the coupling time of an hyper-exponential queue with the following service distribution: service has rate 3/2 with probability 1/2 and rate 3/4 with probability 1/2 (so that the overall average service time is equal to 1). This service is modeled with 2 (resp 3 and 4) phases in the figure. The more phases, the more difficult coupling is at state 0 so that the pick further moves to the left.
Perfect Sampling of Phase-Type Servers Using Bounding Envelopes
100000
203
2 servers 3 servers 4 servers
coupling time
10000
1000
100
10
0
0.1
0.2
0.3
0.4
0.5
λ λ+μ
0.6
0.7
0.8
0.9
1
Fig. 6. Shift of the coupling time pick with a fixed hyper-exponential service, when the number of phases increases
6
Conclusion
In this paper, we have shown that perfect sampling can be efficient to obtain samples of the stationary distribution of queuing networks with arbitrary phasetype servers. This efficiency comes from two ingredients: The construction of tight envelopes that can be computed in linear time and a modeling trick that makes the server change phases even when idle without changing the probabilistic law of the system. On the other hand, the sampling time is very sensitive to the number of phases per service, as shown in the experimental part. One possible direction for future work would be to design new events for phase type service to fight this phenomenon.
References 1. Buˇsi´c, A., Gaujal, B., Vincent, J.-M.: Perfect simulation and non-monotone markovian systems. In: ValueTools 2008, pp. 1–10 (2008) 2. Davey, B.-A., Priestley, H.-A.: Introduction to lattices and orders. Cambridge University Press, Cambridge (1991) 3. Dopper, J., Gaujal, B., Vincent, J.-M.: Bounds for the coupling time in queueing networks perfect simulation. In: Numerical Solutions for Markov Chains (NSMC 2006), Charleston, pp. 117–136 (2006) 4. Neuts, M.F.: Matrix-geometric solutions in stochastic models: an algorithmic approach. Johns Hopkins University Press (1981) 5. Propp, J.-G., Wilson, D.-B.: Exact sampling with coupled markov chains and applications to statistical mechanics. Random Structures and Algorithms 9(1-2), 223–252 (1996)
Monotone Queuing Networks and Time Parallel Simulation Jean-Michel Fourneau and Franck Quessette PRiSM, Universit´e de Versailles-Saint-Quentin, CNRS UMR 8144, UniverSud, Versailles, France
Abstract. We show how we can make more efficient the time parallel simulation of some queueing networks. We had previously introduced some improvements of two classical time parallel simulation approaches: the precomputation of states at specific time instants and the fix-up computations. We have proved that we can obtain more parallelism using monotonicity on input sequences or on the initial states of the simulation parts and obtain quickly a bound of the sample-path. Here we apply the fixed up computations approach to the time parallel simulation of queueing networks with general service times and complex routing disciplines. This approach is based on the theory of monotone models of simulation. We establish that our models are monotone and we show how we obtain proved upper or lower bounds of the sample-path of the simulation and bounds of some estimates as well.
1
Introduction
Simulators are often the only available tools because many modelling assumptions make analytical and numerical modelling techniques quite difficult to apply. But these assumptions also put some burden on simulators and simulations must be very long to obtain a clear estimate of the delays. It is therefore very compelling to use the large number of cores available for parallel simulation. Time Parallel Simulation (TPS in the following) is a powerful technique which divides the time interval into segments which are computed independently in parallel. To prove this independence of the parallel computations, one must verify first that the model exhibits strong stochastic properties (see [12] chap. 6 and references therein). More precisely this technique partitions the simulation time horizon [0, T ) into K consecutive time intervals which are simulated independently. Each processor is assigned to build one sample-path of the system for one of these time intervals. But the last instant of one time segment is the first instant of the next segment and the states of the sample-path at this particular instants cannot be computed in general without building the sample-path. The efficiency of TPS depends on our ability to guess the states of the system at the beginning of the simulation intervals or to efficiently correct the guessed states to finally obtain a consistent sample-path in a small number of trials. Such a technique relies on strong stochastic assumptions (see for instance [2]). Several solutions have already been published: regeneration and efficient forecasting of K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 204–218, 2011. c Springer-Verlag Berlin Heidelberg 2011
Monotone Queuing Networks and Time Parallel Simulation
205
some points of the sample-path [13], parallel prefix computation [17], a guessed initial state followed up by some fix-up computations when the first state has a weak influence on the sample-path [20]. Another approach consists in relaxing these assumptions to obtain an approximation of the results [3,23]. For a general review of parallel simulation techniques (both time parallel and space decomposition approaches), the reader is referred to [12]. Let us first begin with some details about the classical approach presented by Nicol et al. in [20] using fixed up computations. We then explain in the next section how we have improved this technique in [8,9]. In a first step, the time interval [0, T ) is divided into K equal sub-intervals [ti , ti+1 ). A point in the sample-path is a state and a time instant. Let X(t) be the state at time t during the exact simulation obtained for instance by a sequential algorithm. The aim is to build X(t) from t in [0, T ) through an iterative distributed algorithm. For the sake of simplicity, we assume in this section that for all i, logical process LPi simulates the i-th time interval. We denote as Yji (t) the state of the system at time t obtained during the j-th iteration of logical process LPi . At the beginning of the first run, the initial states (denoted as Y1i (ti ) for the initial state of simulation at LPi ) are chosen at random. Parallel independent simulations are then performed. The finishing states of each simulation (i.e. Y1i (ti+1 ) are computed at the end of the simulation of the time intervals. They are compared to the initial state we have previously used in the next LP (i.e. Y1i+1 (ti+1 )). The equality of both states is a necessary condition for consistency of the path. Otherwise one must conduct a new set of parallel simulations for the inconsistent parts using Y1i (ti+1 ) as starting point (i.e. Y2i+1 (ti+1 )) of the next run on logical process LPi+1 . These new runs are performed with the same sequence of random inputs I(t). The simulations are ran until all the parts are consistent. It is proved that the number of rounds before the whole simulation is consistent is smaller than the number of LP . It is clear that at the end of the first round (or run), the simulation performed at LP1 is consistent as the first part receives a correct initialisation. Similarly by induction on i, at the end of round i, LPi is consistent. It is the worst case we may obtain and the time to perform the simulation in parallel is equivalent to the time in sequential. But due to the coupling phenomenon, the number of rounds may be, in practice, much smaller than the number of parts, as we will see in the following. Furthermore the approaches we develop in [9,8] further decrease the number of rounds, increasing the efficiency of the TPS. The efficiency of the approach is related to the number of rounds to obtain a consistent path for all logical processes. Let us now define the coupling and how performing the simulation with the same input sequence I(t) may speed up the computations. Suppose that we have stored the previous sample-paths computed by LPi . Suppose now that for some t, we find that the new point Yki (t) is equal to a formerly computed point Ymi (t). As the input sequence is the same for both runs, both sample-paths have now merged: Ymi (u) = Yki (u) ∀u ≥ t.
206
J.-M. Fourneau and F. Quessette
Thus, it is not necessary to build the new sample-path. Such a phenomenon is defined as the coupling of sample-paths. Note that it is not proved that the sample-paths couple and this is not necessary for the proof of the TPS that coupling happens. Clearly coupling allows to speed up the computations performed by some LP and also reduces the number of rounds before the whole simulation becomes consistent. Indeed if two sample-paths have coupled for time interval i, at run k at LPi , thus logical process LPi+1 has already computed a samplepath consistent with LPi during the past rounds (i.e. between rounds u and k). Therefore the next inspection will found that parts i and i + 1 are consistent. Intuitively coupling means that the state reached at the end of the time interval is not that dependent of the initial state of the simulation.
A
B
time
P1
P2
P3
P4
P5
Fig. 1. TPS, coupling and fixing the sample-path
Consider an example of TPS with one fix-up step in Figure 1. During the first step, 5 parts of the simulations are ran in parallel. Part 3 and Part 4 are consistent as the initial point of LP4 is the final point of LP3 due to a correct guess. Other parts are not consistent and the simulations are ran again with a correct initialisation (A instead of B for the second run of part 2 for instance) and the same random inputs to obtain new sample-paths. In Fig. 1 the new runs are represented in dotted lines (also in red) and we see that all the simulations couple during the first fix-up step. The former sample-paths are compared to the new ones and as soon that the simulations couple, they are stopped as simulations after coupling will follow the same paths. If the simulations do not couple, we keep the new sample-path in memory. For the sake of completeness, we give now an abstract presentation of the distributed simulation algorithms. We assume that the logical processes LPi (i = 1..K) perform simulations and exchange information with a Master Process which must check the consistency of the partial sample-paths. Thus we assume that the simulation effort is distributed among K + 1 processes. The whole approach is summarised in the following parallel algorithm for LPi (K ≥ i > 1) and the Master Process. The first logical process in charge of the simulation
Monotone Queuing Networks and Time Parallel Simulation
207
of the first time interval slightly differs for this general pseudo-code: Y11 (t1 ) is initialised with the initial state of the whole simulation (i.e.X(t1 )). ————————- Algorithm LPi ——————————————————— 1. k ← 0. Read in shared memory the input sequence I(t) for all t in [ti , ti+1 [. 2. Y1i (ti ) ← Random. 3. Loop (a) k++. (b) Perform run k of Simulation with Coupling on the time interval [ti , ti+1 [ to build Yki (t) using input sequence I(t). (c) Send to the Master: the state Yki (ti+1 ). (d) Receive from the Master: Consistent(i) and a new initial state U . i (ti ) ← U . (e) If not Consistent(i) then Yk+1 4. Until Consistent(i). 5. ∀t ∈ [ti , ti+1 [, X(t) ← Yki (t) and write X(t) in shared memory. ————————– Algorithm Master —————————————————— 1. For all i Consistent(i) ←False. 2. Consistent(0) ← True. LastConsistent ← 0 ; k ← 0. 3. Loop (a) k++. (b) For all i, if not Consistent(i) Receive from LPi the state Yki (ti+1 ). (c) Y10 (t1 ) ← Y11 (t1 ). (d) i ← LastConsistent. (e) Loop i. i++. ii. If (Yki (ti ) = Yki−1 (ti )) and Consistent(i-1) then Consistent(i) ← True. (f) Until (not Consistent(i)) or (i > K). (g) LastConsistent ← i − 1. (h) For all i send to LPi Consistent(i) and the state Yki−1 (ti ). 4. Until LastConsistent = K. ——————————————————————————————————We have proposed in [9,8] to improve the efficiency of TPS using monotonicity of the simulation models. This property will be formally defined in the next section. The key idea consists in considering the simulation model as a black box, with a set of parameters and one input sequence, which computes one output sequence. Here the parameters (or hidden variables) are the initial state of the simulation (typically a vector of integers). We define some orderings on the sequences and the parameters. A model is monotone when it preserves the ordering. More precisely, we define input sequence monotonicity (inseq monotonicity in the following) when the simulation model preserves the ordering of the input sequence [9] and hv-monotonicity or monotonicity related to hidden variable when it preserves the ordering on the parameters [8]. Both methods increase the
208
J.-M. Fourneau and F. Quessette
efficiency of TPS but we obtain an upper or a lower bound of the output sequence due to the monotonicity assumption rather than the exact sample-path. Then we compute a reward on the output sequence. The ordering on the output sequences are defined in such a way that typical rewards such as the moments or the tail of the distributions are consistently ordered when the sequences are ordered. In performance evaluation or reliability studies, we must prove in general that the systems we analyze satisfy some quality of service requirements. Thus it is sufficient to prove that the upper bound (or lower bound, depending on the measure of interest) of the output sequence satisfies the constraint. The rest of the paper is as follows. In section 2, we define the comparison of sequences, the inseq-monotonicity and the hv-monotonicity and how we take advantage of these properties of the models to speed up the TPS and obtain a bound. In Section 3 we present several networks of queues we want to analyse and we prove that most of them are hv-monotone. We also show that a well-known network of queues is not hv-monotone.
2
A Brief Introduction to Monotonicity in Simulation
A simulation model is defined as an operator on a set of parameters (typically the initial state) and an input sequence (typically arrivals and service requirements) and produces an output sequence. Let M be a simulation model. We denote by M(a, I) the output of model M when the parameter set is a and the input sequence I. As usual an operator is monotone if its application on two comparable variables provides two outputs which are also comparable. We first give the definition of comparison of sequences then we introduce the hv-monotonicity and inseq-monotonicity properties with some examples. We show how both concepts of monotonicity may help to improve the efficiency of TPS. Various orders are possible to compare the sequences. For the sake of simplicity we assume here that we use point comparison because it is consistent with cumulative rewards. Remark that many rewards such as moments and tails of distribution are non negative as supposed in Property 1. Definition 1. Let I1 and I2 two sequences with length n. I(m) is the m-th element of sequence I. I1 p I2 if and only if I1 (t) ≤ I2 (t) for all index t ≤ n. Property 1. Assume that the rewards are computed with function r. If the rewards are non negative, then: I1 p I2 =⇒ r(I1 ) = r(t)I1 (t) ≤ r(I2 ) = r(t)I2 (t). t
t
As a simulation model is seen as an operator acting on a set of parameters and an input sequence to produce an output sequence, we can define two properties. Definition 2 (inseq-monotone Model). Let M be a simulation model, M is inseq-monotone with respect to orderings α and β if for all parameter sets a and input sequences I and J, I α J implies M(a, I) β M(a, J).
Monotone Queuing Networks and Time Parallel Simulation
209
Definition 3 (hv-monotone Model). Let M be a simulation model, M is hv-monotone with respect to orderings α and β if for all parameter sets a and b, a α b implies M(a, I) β M(b, I) for all input sequences I. Both monotonicity concepts are somehow related to the stochastic monotonicity used to compare random variables and stochastic processes [10,22], and the realizable monotonicity used in perfect simulation [21]. Note also that hvmonotonicity is very similar to the ordering of paths introduced in [1]. For precise information on the relations between these various notions of monotonicity, one can refer to [9,18]. The input sequence-monotonicity has been introduced in [9] to improve the efficiency of TPS based on precomputation of states at specific time instants introduced by Fujimoto and his co-authors in [13]. We proposed to modify the input sequence when we fail to find a sufficient number of correct starting points. We apply some algorithms on the original input sequence to obtain an upper and a lower input sequences. The algorithm also makes the new sequences more easily partitioned because it increases the number of points which are correctly guessed as starting points. As the model is input-sequence monotone, the output sequence is also a bound of the exact sample-path. Hv-monotonicity [8] is used to minimise the number of rounds of fix-up computations proposed in [20]. We now show how we can build a complete sample-path for a bound of the exact simulation using some simulated parts and ordering relations without some of these rounds. Of course we assume that the model is hv-monotone. We modify the TPS to converge faster on a bound of the samplepath. Let us suppose to give all the details that we want to compute an upper bound (i.e. computing a lower bound only require to change some inequalities in the following algorithm). More precisely we change the rules about the consistency of the simulations performed by the logical processes: we say that two parts are consistent if they are a proved upper bound of the exact sample-path. This proof is based on the hv-montonicity concept. The key idea is now that two consecutive parts are consistent if the first one is consistent and if the second one is a proved upper bound. Simulation processes LPi (i = 1..N ) are not modified but the Master process performs a slightly different computation. The main assumption is, as within the original approach, that all parts except the first one are initially marked as not consistent while the first one is consistent. Suppose that at the end of round k, the points Yki (ti+1 ) have been computed using Yki (ti ) as starting points. If Yki (ti+1 ) = Yki+1 (ti+1 ) and part i is consistent, mark part i + 1 as consistent. This rule is the same as in the original approach. Furthermore if Yki (ti+1 ) < Yki+1 (ti+1 ) and part i is consistent, the concatenation of the parts provide a sample-path of an upper bounding sequence because of the hv-monotonicity and the transitivity of the ordering. Thus one can mark part i + 1 as consistent. An example of upper bound computation for an hvmonotone model is depicted in Fig. 2. The first run is drawn in black solid lines. The parts are not consistent at the end of the first round. We compute new runs in parallel (depicted in dotted red lines). A coupling occur in LP2 at round 2 but such an event does not happen at other LP . Now we can combine both set of runs to obtain an upper bound. Clearly, if one concatenate parts P 1, P 2,
210
J.-M. Fourneau and F. Quessette
D2
P1
A
P4 D5 P3
D4
P2 D3
B
P5
time LP1
LP2
LP3
LP4
LP5
Fig. 2. TPS and fixing the sample-path to obtain a bound
D3, D4 and D5, we obtain an upper bound of the ”exact” sample-path which is not computed by the two sets of runs. Indeed P 1, P 2 and D3 are exact while D4 is an upper bound due to the hv-monotonicity and D5 is an upper bound because of the transitivity. Similarly, P 1, P 2, D3, B4 and R5 provide another upper bound. With two runs, the original method [20] does not converge because parts 4 and 5 are not consistent to design a correct sample-path while we obtain a solution for a bound within two rounds. We just have to modify the Master process to change the rules of consistency and let the logical processes, which are kept unchanged, computes parts of the paths. Further speculative computations can be performed to again speed up the parallel simulations instead of being idle. For instance, when the Master finds that parts i − 1 and i are joined but they are not consistent at this step of the computation, it requests that LPi computes a new part beginning with a random initial state which is larger than the current initial state (assume that we want to compute an upper bound). Thus it increases its probability to obtain a consistent part after the next round. Furthermore, assuming that there exists a maximal state denoted by M ax, at round R − 1 all the parts which are not yet consistent will receive, as initial state for the next run, the maximal state. Thus the next run will give proved upper bounds of the sample-path. The algorithm will converge in less than R rounds and increasing R makes the bound more accurate. Note that for open networks of finite queues, state Max is simply the state where all the queues are full. When queues are infinite one can choose an heuristic value for Max and the convergence will not be proved in R rounds but the algorithm will still be very efficient. A similar algorithm exists for lower bounds using the minimal state of the state space.
3
Monotone Networks of Queues
For the sake of readability we begin with a simple result to show how we can prove hv-monotonicity and then we generalise the results with more sophisticated routing strategies and more complex service time distributions. Finally we show
Monotone Queuing Networks and Time Parallel Simulation
211
with an example that G-networks of queues with positive and negative customers are not hv-monotone. We will use an event representation of the models. Events are associated with transitions. Let ev be an event and let x be a state, we denote by ev(x) the state obtained by application of event ev on state x. It is more convenient that some events do not have any effect (for instance, the end of service event will be a loop when it is applied on an empty queue). Monotonicity property has already be defined for events and their links with stochastic monotonicity are now understood [18]. Definition 4. An event ev is monotone if its probability does not depend on the state and for all states x and y, x α y implies that ev(x) α ev(y). 3.1
Finite Queues Jackson Networks
We consider a network of N queues with exponential service times and Poisson external arrivals. The queues have a finite capacity. Let Bi be the maximal size of queue i, μi the service rate of its server and λi the arrival rate of fresh customers. At the service completion at queue i, a customer leaves thenetwork with probability di or joins queue j with probability Pi,j . As usual di + j Pi,j = 1 for all queue j. When a customer arrives in a full queue, it is rejected. Let x = (x1 , x2 , ..., xN ) be the state of the network. xi will denote the size of queue i. Let B be (B1 , B2 , ..., BN ) and ei be the null vector except component i which is 1. The transitions of such a system are well known: – Fresh Arrival at queue i: the rate is λi and the transition is ev(x) = min (B, x + ei ) where the min operator is applied component-wise. – Departure from queue i to leave the network: the rate is μi di and the transition is ev(x) = (x − ei )+ where as usual x+ = max(x, 0). – Internal Routing from queue i to queue j: the rate is μi Pi,j and the transition is ev(x) = min(B, (x − ei )+ + ej ). One now has to describe how to order the states and sequences. – The ordering of the states α is the product order: x α y if for all i xi ≤ yi . – The ouput sequence of the model is the time tn and the state x at that time, n is the event index. – The ordering of the output sequence is β defined as follows: O1 = (t1n , x1n )n β O2 = (t2n , x2n )n if ∀ n, t1n = t2n and x1n α x2n . – The input sequence is a time instant tn and a uniform random value un . Let us first consider a Poisson process with rate Λ = i (λi + μi ) to uniformize the system (we follow Poisson calculus methodology [4]). The time instants are given by this process and u is used to draw the event which is realised at time instant of the simulation. Typically this is done by an inverse transform method or an alias method (see an inverse method in the following).
212
J.-M. Fourneau and F. Quessette
————————– Algorithm Draw from Inverse Transform —————– 1. Define pi = (λi + μi )/Λ. Let F be the pdf associated to pi . Build F −1 . 2. For all i, let Gi the pdf associated to the following probabilities on states 0 to N + 1: qi (0) = di μi /(λi + μi ), qi (N + 1) = λi /(λi + μi ) and for all k, 1 ≤ k ≤ N , qi (k) = Pi,k μi /(λi + μi ). Build G−1 for all i. i 3. Use F − 1(un ) to get the index of the queue where the event occurs (say i). 4. v ← (un − F (i − 1))(λi + μi ). 5. Use G−1 (v) to get the event with the following code (0: Departure, N+1 arrival, k between 1 and N routing from i to k. ——————————————————————————————————– Note that steps 1 and 2 have to be performed only once. This algorithm is given here for the sake of readability and because it is used in the proof of the following property. The alias method ([19] page 116) is much more efficient in average number of operations to generate a sample. Property 2. The simulation model of a Jackson network with finite capacity is hv-monotone for α ordering on the states, β ordering of the output sequences. Proof: by induction on the time instants. Let O1 = M(x, I) and O2 = M(y, I). We prove by induction that O1(t) α O2(t) for all t ≥ 0. Note that as O1(0) = x and Note that as O2(0) = y, the property holds at time 0. Now consider a time instant t where the n-th transition occurs. Assume that O1(t − 1) α O2(t − 1) holds and remember that the output is the state of the simulation. The input sequence is the same for both simulations even if the states are not equal. It is clear form the pseudo code of the algorithm that the event generated from the input is the same for both simulations because it is not state-dependent. Finally all events are monotone in such a network: ev(O1(t − 1)) α ev(O2(t − 1)). Therefore O1(t) α O2(t) and finally by induction O1 β O2.
We now present some numerical results to show the efficiency of the approach. We consider a toy example with three queues. The arrival rate are respectively 2.740, 3.540 and 2.170. The service rates are respectively 6.0, 6.0 and 3.0. The buffer size is⎞50 for all queues. The routing probabilities are given by matrix ⎛ 0.0 0.4 0.2 ⎝ 0.6 0. 0.1 ⎠. We assume that we have 100 processes and each part of the 0.2 0.0 0.0 simulation generates 1000 events. We report in Figure 3 the time needed to build a consistent path for each LP. In these experiments, all the simulations processes have coupled after run 15 while we obtain an upper bound within 6 runs and a lower bounds after 7 runs. Clearly our approach is much more efficient than the initial one. 3.2
Index Based Routing, Poisson Arrivals and Exponential Services
We consider the same set of queues with the same capacity and the same rates but we generalises the routing policy as follows: we attach with the end of service
Monotone Queuing Networks and Time Parallel Simulation
213
!!"#
$!% &&%
Fig. 3. Building a consistent sample-path vs. process number
event ev of a customer on queue i, a routing strategy which is defined as a function Rev on the state space and which gives the destination of the customer. We consider routing functions defined by index on queues. An index is a function Ijev (xj ) for event ev occuring at state xj at each queue j, and the routing function gives as a result the queue which minimises the index: Re(x) = argmini (Iiev (xi )). Intuitively, an index routing sends a customer to the queue with the minimal index value. This formalism supposes that argmin is well defined even when some index values are equal. The event monotonicity of some index based policy has already been used to design a perfect simulation algorithm [24,25]. Furthermore in [25], the following property is given: Property 3. If the indices used by index routing are non decreasing functions of the states, then the routing strategies are event monotone. In the following we denote these strategies as monotone index based routings. Many interesting routing strategies are monotone index based. For instance: – Jump the shortest queue: Iiev (xi ) = xi + 1. – Jump the shortest response time queue: Iiev (xi ) = (xi + 1)/μi . – Route to the first available queue in an ordered list. Let Li the rank of queue i in the list of priority for the customers. Indices are defined as follows: Iiev (x) = Li if xi < Bi and Iiev (x) = ∞ otherwise. – Blocking between i and j: a simplest version of the previous strategy using list of size 2 because queue i can always receive the customer again. – Jump over blocking: it is a simplified version of the third item.
214
J.-M. Fourneau and F. Quessette
Property 4. The simulation model of a network with finite capacity queues, monotone index based routing, exponential services and Poisson arrivals is hvmonotone for α ordering on the states and β ordering of the output sequences. Proof: The proof is similar to the proof of Property 2. We prove the monotonicity by induction on the event number we get the complete comparison of the samplepaths. Again the first step is based on two parts: first we prove that the input sequence provides the same event ev for states x and y and again it is true because the generation of the event does not change with the state description. Second we take into account that the events are monotone. Indeed, the arrivals are event monotone (see the proof of Property 2) and while the routings are event monotone according to Property 3.
3.3
Monotone Phase Type Service Times, Exponential Arrivals
We first define the stochastic monotonicity of matrices and the strong stochastic comparison of distributions to introduce monotone Phase type distribution. We follow Stoyan [22] for both definitions. Definition 5. Let X and Y be random variables taking values on a totally ordered and finite state space {1, 2, . . . , n} with p and q as probability distribution vectors. X issaid to be less than Y in the strong stochastic sense (denoted by X st Y ) if nj=k pj ≤ nj=k qj for k = 1, 2, . . . , n. For instance, one can easily check that: (0.3, 0.2, 0.3, 0.2) st (0.1, 0.4, 0.0, 0.5). Definition 6. Let M be a stochastic matrix on a totally ordered state space S, M is stochastically monotone if for all u st v then uMZ st vMZ . Property 5. Let M be a stochastic matrix, let M (i, ∗) be the i-th row of M and may be seen as a probability distribution, M is stochastically monotone iff M (i, ∗) st M (i + 1, ∗). A service type is distributed as a continuous time Phase type if it is the absorbing time of a continuous time Markov chain. We define a monotone Phase type in continuous time as follows: Definition 7. A continuous time monotone phase type distribution is defined by rate μ and an absorbing discrete time Markov chain given by matrix M such that the absorbing state is the last state of the space and matrix M is stochastically monotone. More precisely, the CTMC describing the phase type distribution is P = μ(M − Id), where Id is the identity matrix. Let n be the size of matrix M . Consider now a network of queues with monotone Phase type services. For the sake of simplicity we still consider a routing of customers based on a Markovian routing matrix R but an index based routing is also possible. For the same reason, we assume that the fresh arrivals follow independent Poisson processes with rate λi . We now need to change the state definition and the orderings. A state x of the network will be a vector of 2N integers: (x1 , p1 , x2 , p2 , ..., xN , pN )
Monotone Queuing Networks and Time Parallel Simulation
215
where xi is the size of queue i, and pi is the phase of service at that queue. When pi = n, the service ends. Thus (xi , pi ) is the state of queue i. It is assumed that if xi = 0, then pi = 1. Furthermore: – The input sequence is again composed of time instants tn and uniform ran dom values un . Again we uniformize the model with rate Λ = i (λi + μi ) which is an upper bound of the total rate of transition in an arbitrary state. The time instants are still given a Poisson process with rate Λ and un is used to draw an event which is realised at time tn . Now the number of event is larger as we also consider the transitions of the service phases. – The ouput sequence of the model is time tn and state x at that time. – The state ordering (γ ) on (xi , pi ) is defined by (xi , pi ) γ (yi , qi ) if xi ≤ yi or ((xi = yi ) and (pi ≥ qi )). Intuitively the ordering is associated to the remaining time to empty the queue. – The ordering of the output sequence is δ defined as follows: O1 = (t1n , x1n )n δ O2 = (t2n , x2n )n if ∀ n, t1n = t2n and x1n γ x2n . Property 6. The simulation model of a network with finite capacity, monotone phase type services and Poisson arrivals is hv-monotone for ordering on the states and ordering of the output sequences. Proof: The proof is slightly more complex as the generation of the event takes into account the state. We still proceed by induction. Let u be the random value provided by the input sequence at time t. We begin with steps 1 and 3 of the generation algorithm to obtain the queue number where the events occur (say i). Suppose at time t−1 we have by the induction assumption that (xi , pi ) γ (yi , qi ) where (xi , pi ) and (yi , qi ) are the states at that time. Now define v as in Step 4 of the generation algorithm. v is the same for both simulations because it is not dependent on the state. Now consider the value of v and the event generated: – If v is smaller than λi /(λi + μi ) the event is an arrival for any value of the state. In that case we conclude because the arrival is a monotone event. – if v is larger than λi /(λi + μi ), the event may be a service phase transition, an end of service followed by a routing from i to j or a departure. These events depend on the state because of the phase. We now have two cases: 1. Suppose that xi < yi . Let (xi , pi ) be the state after the event generated by u applied on (xi , pi ). We define similarly (yi , qi ). If the event on y is an end of service, yi = yi − 1 and qi = 1. Due to the strict inequality xi < yi . and the possible events which are service phase transition or service completion, we have xi ≤ xi , xi ≤ yi and pi ≥ 1. Thus the relation holds. If the event in y is not a departure, then we still have xi < yi . And the proof for queue i is complete. 2. Suppose that xi = yi and pi ≥ qi , then the monotonicity of matrix M implies that xi = yi and pi ≥ qi . Thus even if the events generated by u are not the same for the two states, the relation between the states still holds after execution of the event. By induction the model is hv-monotone.
216
J.-M. Fourneau and F. Quessette
3.4
Networks of G/G/1 Queues
Until now, all the models we have studied are Markovian. Here we consider a more general model in terms of distributions and independence assumptions. Assume that the inter-arrivals and services follow arbitrary distributions. We assume that the trace is composed of triples: the time instant tn , the queue in , and the description of the event. For the sake of simplicity we restrict ourselves to simple events: a symbol ”a” describes a fresh arrival and an ”e” is used for an end of service. At the end of its service at queue i, a customer may leave the network with probability di or it may route to queue j with probability Pi,j . The state is the number of customers at each queue and we use α ordering. The output sequence is the state of the network. As the events are described in the input sequence, we just have to prove that the events (arrival, departure, routing from i to j) are monotone. This is already done in the proof of hvmonotonicity of Jackson networks (we just have to consider that Bi = ∞). For the sake of conciseness we just give the result without proof. Property 7. The simulation model of a network of GI/GI/1 queue with the formerly defined input sequence is hv-monotone for α ordering on the states, and β ordering of the output sequence. 3.5
G-Networks of Queues with Positive and Negative Customers
G-networks with positive and negative customers were introduced by Gelenbe in [14]. A negative customer deletes a positive customer at its arrival at a backlogged queue. A negative customer is never queued. Positive customers are usual customers which are queued and receive service or are deleted by negative customers. Under typical assumptions (Poisson arrival for both types of customers, exponential service time for positive customers, Markovian routing of customers, open topology) Gelenbe proved that such a network has a product form solution for its steady-state behavior. As steady-state distribution have a closed form, simulation is not necessary. The results we give here is a trivial example of non monotone network to illustrate that all networks of queues are not monotone. Property 8. The simulation model of a G-network with positive and negative customers, exponential services and Poisson arrivals of both types of fresh customers is not hv-monotone for α ordering. Proof: We give a very simple example with two queues. The states are the number of positive customers in each queue. Assume x = (1, 0) and y = (1, 1). We have: x α y. Let u a random value and suppose that the event ev generated by u is the end of service in queue 2 followed by routing as a negative customers into queue 1. Clearly ev(1, 1) = (0, 0) because the negative customer deletes the positive customer at queue 1. Now consider ev(1, 0). As queue 2 is empty this event is a loop: ev(1, 0) = (1, 0). Thus, ev(y) α ev(x). The model is not hv-monotone.
Monotone Queuing Networks and Time Parallel Simulation
4
217
Conclusions
We think that TPS and monotonicity of models may be the key for a better utilisation of cores for performance evaluation in the future. The traditional approaches in parallel simulation are based on distributed algorithms techniques to prove a correct sample-path but these approaches are not that efficient due to the cost of synchronisations between processes (clocks and future event list must be, in some sense, globally consistent, see [12]). TPS removes or simplifies the synchronisation problem if some stochastic properties hold. We propose to relax the assumptions of computing the exact sample-path as we only need a proof of quality of service. In the future we will develop a tool to simulate networks of queues using the TPS approach. The first problem is to find a simple characterisation of hv-monotone or inseq-monotone networks. While networks with ordinary customers are often monotone [16], the answer is much more complex for networks with customers and signals such as resets [15], or signal changing the class of a customer [6]. One possible direction is to describe the queueing network as a tensor decomposition of matrices following the approach used in [11] or [5] to prove product-form stationary distribution. Note that we already have a tool [7] to check the comparison and the monotonicity of matrices. Acknowledgement. This work was partially supported by an UVSQ grant BQR 2010.
References 1. Andradottir, S., Hosseini-Nasab, M.: Parallel simulation of transfer lines by time segmentation. European Journal of Operational Research 159(2), 449–469 (2004) 2. Andrad´ ottir, S., Ott, T.J.: Time-segmentation parallel simulation of networks of queues with loss or communication blocking. ACM Trans. Model. Comput. Simul. 5(4), 269–305 (1995) 3. B¨ ol¨ oni, L., Turgut, D., Wang, G., Marinescu, D.C.: Challenges and benefits of timeparallel simulation of wireless ad hoc networks. In: Valuetools 2006: Proceedings of the 1st international conference on Performance evaluation methodolgies and tools, p. 31. ACM Press, New York (2006) 4. Br´emaud, P.: Markov Chains: Gibbs fields, Monte Carlo Simulation and Queues. Springer, Heidelberg (1999) 5. Dao Thi, T.H., Fourneau, J.M.: Stochastic automata networks with master/Slave synchronization: Product form and tensor. In: Al-Begain, K., Fiems, D., Horv´ ath, G. (eds.) ASMTA 2009. LNCS, vol. 5513, pp. 279–293. Springer, Heidelberg (2009) 6. Dao-Thi, T.-H., Fourneau, J.-M., Tran, M.-A.: Networks of symmetric multi-class queues with signals changing classes. In: Al-Begain, K., Fiems, D., Knottenbelt, W.J. (eds.) ASMTA 2010. LNCS, vol. 6148, pp. 72–86. Springer, Heidelberg (2010) 7. Fourneau, J.-M., Le Coz, M., Pekergin, N., Quessette, F.: An open tool to compute stochastic bounds on steady-state distributions and rewards. In: 11th International conference MASCOTS, Orlando, FL. IEEE Computer Society Press, Los Alamitos (2003)
218
J.-M. Fourneau and F. Quessette
8. Fourneau, J.-M., Kadi, I.: Time parallel simulation of monotone systems. Poster Session, IFIP Performance conference, Namur, Belgique (2010) 9. Fourneau, J.-M., Kadi, I., Pekergin, N.: Improving time parallel simulation for monotone systems. In: Turner, S.J., Roberts, D., Cai, W., El-Saddik, A. (eds.) DS-RT, pp. 231–234. IEEE Computer Society, Los Alamitos (2009) 10. Fourneau, J.-M., Pekergin, N.: An algorithmic approach to stochastic bounds. In: Calzarossa, M.C., Tucci, S. (eds.) Performance 2002. LNCS, vol. 2459, pp. 64–88. Springer, Heidelberg (2002) 11. Fourneau, J.-M., Plateau, B., Stewart, W.: An algebraic condition for product form in Stochastic Automata Networks without synchronizations. Performance Evaluation 85, 854–868 (2008) 12. Fujimoto, R.M.: Parallel and Distributed Simulation Systems. Wiley Series on Parallel and Distributed Computing (2000) 13. Fujimoto, R.M., Cooper, C.A., Nikolaidis, I.: Parallel simulation of statistical multiplexers. Journal of Discrete Event Dynamic Systems 5, 115–140 (1994) 14. Gelenbe, E.: Product-form queuing networks with negative and positive customers. Journal of Applied Probability 28, 656–663 (1991) 15. Gelenbe, E., Fourneau, J.-M.: G-networks with resets. Perform. Eval. 49(1-4), 179–191 (2002) 16. Glasserman, P., Yao, D.D.: Monotone Structure in Discrete-Event Systems. Series in Probability and Mathematical Statistics. Wiley Inter-Science, New York (1994) 17. Greenberg, A.G., Lubachevsky, B.D., Mitrani, I.: Algorithms for unboundedly parallel simulations. ACM Trans. Comput. Syst. 9(3), 201–221 (1991) 18. Kadi, I., Pekergin, N., Vincent, J.-M.: Different monotonicity definitions in stochastic modelling. In: Al-Begain, K., Fiems, D., Horv´ ath, G. (eds.) ASMTA 2009. LNCS, vol. 5513, pp. 144–158. Springer, Heidelberg (2009) 19. Knuth, D.E.: The Art of Computed Programming. Addison-Wesley, Reading (1981) 20. Nicol, D.M., Greenberg, A.G., Lubachevsky, B.D.: Massively parallel algorithms for trace-driven cache simulations. IEEE Trans. Parallel Distrib. Syst. 5(8), 849–859 (1994) 21. Propp, J., Wilson, D.: Exact sampling with coupled Markov chains and applications to statistical mechanics. Random Structures and Algorithms 9(1&2), 223–252 (1996) 22. Stoyan, D.: Comparaison Methods for Queues and Other Stochastic Models. John Wiley and Sons, Berlin (1983) 23. Turgut, D., Wang, G., Boloni, L., Marinescu, D.C.: Speedup-precision tradeoffs in time-parallel simulation of wireless ad hoc networks. In: DS-RT 2006: Proceedings of the 10th IEEE international symposium on Distributed Simulation and Real-Time Applications, pp. 265–268. IEEE Computer Society Press, Los Alamitos (2006) 24. Vincent, J.-M.: Perfect simulation of queueing networks with blocking and rejection. In: Saint, IEEE Symposium on Applications on the Internet, Trento, pp. 268–271 (2005) 25. Vincent, J.-M., Vienne, J.: Perfect simulation of index based routing queueing networks. SIGMETRICS Performance Evaluation Review 34(2), 24–25 (2006)
Traffic-Centric Modelling by IEEE 802.11 DCF Example Paolo Pileggi1, and Pieter Kritzinger2 1
Networking Group, Department of Telecommunications and Microelectronics, University of Rome (Tor Vergata), Italy [email protected] 2 Communications Research Group, Department of Electrical Engineering, University of Cape Town, South Africa [email protected]
Abstract. Probably no protocol has been analysed as much as the various versions of the IEEE 802.11 Distributed Coordination Function (DCF). In this paper, we show how to describe a typical DCF analytic model as a semi-Markov process (SMP) by taking a new approach to performance modelling, called Traffic-Centric Modelling (TCM). TCM is therefore explained at the hand of an example IEEE 802.11 network in Basic Access mode under both saturated and unsaturated traffic conditions. We show how to solve the corresponding SMP by executing DCF activity over the SMP structure, making the proposed solution a hybrid analytical-simulation method. The accuracy of the technique is illustrated by comparing the results with that from the analytic model that is most frequently cited in the research literature. Keywords: Traffic-Centric Modelling; Analytical and Numerical Simulation; Semi-Markov process; Performance Modelling; WLAN.
1
Introduction
System hardware and operating software typically constitute the core of the performance model. It is not surprising then that performance models are far too often developed with the workload as an afterthought. A new perspective, called Traffic-Centric Modelling (TCM), where the perspective is from the quality of service (QoS) experienced in the system by the individual traffic units (t-units) constituting the workload, is advocated herein. Since the IEEE 802.11 Distributed Coordination Function (DCF) has been analysed in countless papers, an IEEE 802.11 DCF example system is modelled using the TCM approach. Evidently the most-cited paper1 in the literature of DCF modelling is that by Bianchi [1]. A reading of the 6 most-cited papers by Ziouva and Antonakopoulos [2], Zheng et al. [3], Dong and Varaiya [4], Ni et al. [5] and Daneshgaran et al. [6] reveals that the models in all of these papers 1
Corresponding author. 4121 citations at the time of writing.
K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 219–233, 2011. c Springer-Verlag Berlin Heidelberg 2011
220
P. Pileggi and P. Kritzinger
are based upon a Markov chain (MC) that is some derivation of the original model by Bianchi. In this paper, we show that the models mentioned above, and others, can be viewed as an instance of a much more general semi-Markov process (SMP) due to the modelling approach taken. More significantly even, the solutions of the earlier MC models invariably involve a complicated stochastic analysis with non-trivial mathematical formulation. We present an SMP model on the analysis of an example IEEE 802.11 DCF network and an efficient algorithmic solution of the model. It is not the objective of this paper to present another DCF model but rather to show how previous MC-based analytic models can be re-interpreted as SMPs, thus allowing a much broader and more general perspective on the modelling of versions of the IEEE 802.11 standard, workloads and channel conditions. Also, due to its generality, this perspective may prove useful in wireless network configurability, flexibility and programmability studies. In the next section, we briefly outline the basic principles that TCM stems from and then, in Sect. 3, we describe the behaviour of the example network we have chosen to illustrate the TCM methodology. The SMP description of the example network is developed in Sect. 4, where after, in Sect. 5, we derive the basic normalised network throughput for our example network. An algorithmic solution of the SMP of the network is given in Sect. 6. Such an algorithm can be written for the solution of any SMP of a system in a stable state, which is what all MC models assume. In Sect. 7, we compare the SMP results with those of the original Markov model presented by Bianchi. Moreover, we show that it is straightforward to account for unsaturated traffic conditions by presenting results for 2 unsaturated traffic intensities.
2
Traffic-Centric Modelling
Any system performance model needs to consider the traffic in the system as well as a model of the machine, i.e., the associated hardware, software structures and protocols. Workload modelling is hard though because events change indeterminately and frequently but at a rate orders of magnitude different from that of events in the machine model (MM). Because it is somewhat intangible, the workload model (WLM) is frequently specific to the particular MM. This does not make the performance model very useful should the workload composition or its nature change. The authors are advocating an approach whereby we define, as a modelling artefact, an entity called a traffic unit (t-unit) that carries with it not only attributes of the physical data (HTML, MPEG4, etc.) but attributes describing its quality-of-service (QoS) and the quality-of-experience (QoE) of the connection as experienced by itself and earlier t-units. We call this approach Traffic-Centric Modelling (TCM). TCM is an approach to system modelling where the system model requires a WLM and an MM, as before. As shown in Fig. 1, what distinguishes TCM from other modelling techniques is that it shifts the focus of the performance
Traffic-Centric Modelling by DCF Example
221
modelling exercise from that which serves to that which requires service. Traditionally, the WLM and MM are joined by a traffic generation interface (MMWLM interface in Fig. 1) with no opportunity for QoE feedback; the optional feedback mechanism would be implemented separately, directly feeding from the MM into the WLM, noting that the event-time resolutions of the workload and machine operations would have to be managed on the same time-line. Differently, TCM connects the WLM and MM by making the t-unit the core model component that is affected independently and directly by both, as shown in Fig. 1. The QoE feedback is applied directly to the t-unit.
Fig. 1. Comparison between Traffic-Centric and other more traditional systems modelling approaches
To prove the feasibility of what we propose, we consider an IEEE 802.11 MPDU, i.e., a data frame, as the t-unit. The frame is described by its attributes, such as its packet length in bits, and by its behaviour, such as being received successfully at the destination, colliding with one or more transmissions from other nodes in the system, and so on. The t-unit experience some actions in the system and various performance metrics can be determined from these experiences.
3
System Behaviour
We describe an IEEE 802.11 system operating under unsaturated traffic conditions to illustrate the proposed methodology. As is usually the case, we make the assumption that the system is a fully-connected point-to-multipoint IEEE 802.11 network of homogeneous nodes. Each node n, of a total of N nodes, transmits data frames to a central access point (AP) according to the Basic Access (BA) mode of the DCF access mechanism. As is often done [7,8,9,10], we describe the system behaviour from the perspective of an observer node, denoted n, which may be any one of the N nodes in the network. The behaviour of a particular node includes the behaviour actions that the frame can experience. We define the state of a node (and thus of the SMP, see Sect. 4.2), as the number of successive transmissions of the same frame. An observation point is
222
P. Pileggi and P. Kritzinger
set at the instant when a change of state, possibly a return to the same state, occurs. At each observation point 1, 2, . . ., the observer records whether the channel was idle or busy during the previous observation period. As shown in Fig. 2, the wireless channel is thus considered to be alternating between consecutive, interleaved idle and busy periods, corresponding to the collective behaviour of the N nodes. A frame is transmitted, either successfully or not, during a busy period. Failure would result if 2 or more nodes transmit simultaneously, referred to as a collision. In order not to complicate the SMP, we do not take failure as a result of an error on the wireless channel into consideration, although such an extension is straightforward.
Fig. 2. An instance of the channel alternating between idle and busy periods as one or more nodes transmit data
The DCF dictates that an individual node, ready to transmit a frame, first monitors the channel for a Distributed Interframe Space (DIFS) period, TDIF S . If the node has a frame to transmit, the node decrements the back-off counter for a random number of slots. If the node has no frames to transmit, it remains idle for an empty time period. The duration of the back-off period, BoVn , is picked uniformly from an integervalued interval called the contention window. The length of the contention window begins at CWmin and doubles in length after every failed transmission, up to a maximum length CWmax . This specific action attempts to avoid collisions, since other nodes may have been monitoring the channel for the same purpose. If the channel is sensed busy during back-off, the back-off counter suspends and is reactivated after a successful transmission and after the channel has been sensed idle for a further DIFS period. When the back-off counter reaches zero, the node transmits the frame. If two or more nodes transmit simultaneously, a collision occurs. To resolve a collision, all nodes involved in the collision reset their back-off counters and restart back-off immediately. Counters of the other non-colliding nodes in the neighbourhood suspend transmission for a period TEIF S called the Extended Interframe Space (EIFS). Thus, colliding nodes have a greater probability of medium access for this post-collision period. All frames are acknowledged within a Short Interframe Space (SIFS) period TSIF S . If the sender does not receive an acknowledgment within the required time, it either reschedules transmission or drops the frame, depending on its retransmission (retry) count. The microsecond values for the slot duration σ and the Interframe Spaces are determined by the modulation scheme employed in the Physical Layer (PHY).
Traffic-Centric Modelling by DCF Example
4
223
DCF Behaviour as a Semi-Markov Process
Although the following material about SMPs can be found in several textbooks (e.g., Bause [11]), we believe that a short introduction is useful for those readers not already familiar with the theory. 4.1
General Semi-Markov Theory
An SMP can be thought of as a process whose successive state occupancies are governed by the transition probabilities of a Markov process that spends time (the holding or sojourn time) in any state described by an integer-valued random variable that depends on the state currently occupied and on the state to which the next transition will be made. The state variable in our case is the number of consecutive transmissions of the same frame at any one node. At the transition instants (the observation points described in Sect. 3), the SMP behaves just like a Markov process. We call this process the embedded Markov process and denote the single-step state transition probabilities by pij , i, j = 0, 1, . . . , R. For simplicity, we assume that the process has a finite state space of size R that is in fact the maximum number of collisions allowed for any one frame. We also define τij as the sojourn time in state i before the transition to the next state j. The sojourn times with expected value τij are positive, integer-valued random variables (with unit time σ, the IEEE 802.11 slot time), each governed by a probability mass function sij (m), m = 0, 1, . . ., called the sojourn time mass function for a transition from state i to state j. That is, P [τij = m] = sij (m), m = 0, 1, . . . ; i, j = 0, 1, . . . , R ∞ τij = msij (m).
(1) (2)
m=0
In other words, to fully describe a discrete-time SMP, we must specify R2 holding time mass functions, in addition to the single-step transition probabilities. We next define the waiting time τi with expected value τi as the time spent in state i, i = 0, 1, . . . , R, irrespective of the successor state and we define the probability mass function of this waiting time as P [τi = m] =
R
pij sij (m)
(3)
j=0
and τi =
R j=0
pij τij .
(4)
224
P. Pileggi and P. Kritzinger
That is, the probability that the system will spend m time units in state i if we do not know its successor state, is the sum for all possible successor states j of the probability that it will spend m time units in state i, provided its successor state is j, multiplied by the probability that its successor state will indeed be j. Finally, let vector ϕ = (φ0 , φ1 , . . . , φR ) denote the steady-state probabilities φr of the SMP in state r and let Π = {π0 , π1 , . . . , πR } be the steady-state probability vector of the equivalent embedded MC. One can show (e.g., Howard [12]) that πr τ r φr = R i=0 πi τ i
(5)
or ϕ=
1 ΠM τ
(6)
where we have written τ=
R
πr τ r .
(7)
r=0
and M is the diagonal matrix [τ r ] of mean waiting times. Intuitively, the probability φr of finding the SMP in state r is the product of the average waiting time τ r in that state, multiplied by the probability πr of being in that state in the embedded MC and normalised by the steady-state mean time spent in a visit to a state τ . In Sect. 5, we show that the values of τ r , φr and the transition probabilities are sufficient to derive common performance metrics for IEEE 802.11 networks.
4.2
SMP Model for the Example Network
Assuming homogeneous node behaviour and a perfect channel, the number of possible events in the network and the resultant states and state changes are the same for each node. Figure 3 illustrates the SMP corresponding to the system behaviour, described in Sect. 3. In the figure, the state variable r, r = 0, 1, . . . , R, represents the number of transmissions of the same frame at a particular node, where R ∈ N+ is the installation specific retry-limit, i.e., the maximum number of consecutive frame retransmissions allowed, after which the frame is discarded, i.e., dropped. When in state R, the system will revert to state 0 in the case of either a failure or success of the last transmission. While in state r, node n can experience the events and resultant transitions listed in Table 1. These transition definitions are similar to the definition of slot states by Malone et al. [13]. Different from those authors, we do not define an explicit idle state, rather the idle time is included in the sojourn time of a state.
Traffic-Centric Modelling by DCF Example
225
Fig. 3. Semi-Markov chain for a typical node Table 1. State transition descriptions Transition pr,0 where r
=
0, . . . , R
pr,r+1
where r =
0, . . . , R − 1
psr,r
where r
=
0, . . . , R
pcr,r
where r
0, . . . , R
ps 0,0 pc 0,0 pR,0
5
=
Description The probability that the current frame at node n is transmitted successfully, in which case the number of collisions returns to 0. The probability that the transmitted frame at n is involved in a collision, in which case node n must back-off by an adjusted random time and the number of transmissions increases by 1. The probability that the back-off process at node n is suspended due to a successful transmission by another node. The probability that the back-off process at node n is suspended due to a collision at nodes other than itself. The probability that there was no frame to send by the node during an observation interval while another node transmitted successfully. The probability that there was no frame to send by the node during an observation interval while two or more nodes suffered a collision. The probability that a frame at node n suffers a collision in state R, i.e., the drop probability.
Calculating Common Performance Metrics
It is important to be reminded that IEEE 802.11 performance can be viewed from the perspective of a single node (sometimes referred to as a “de-coupled” node), or from the perspective of the transmission medium experiencing the collective behaviour of all nodes on the network. To be specific, we refer to a user performance metric and a channel performance metric, respectively, in the sequel. The most popular performance metric of a node in IEEE 802.11 DCF is the normalised throughput defined as the amount of useful data transmitted divided by the capacity of the medium. Referring to Fig. 3, this normalised mean throughput, denoted ψn of a single user n, is given by the probability of
226
P. Pileggi and P. Kritzinger
the SMP being in a state r, r = 0, . . . , R, returning to state 0 after a successful transmission of the mean time to transmit the payload information r , all as a ratio of the mean sojourn time τr in that state: ψn =
R
φr × pr,0 ×
r=0
r . τr
(8)
The normalised mean throughput ψ of the whole network of N nodes, each with the same behaviour, is then given by ψ = N × ψn .
(9)
Another metric is the mean network (or channel) efficiency ν. That is, the percentage of time the channel is being used productively. From the SMP model in Fig. 3 and Table 1, we have
s ν = φ0 × p0,0 +
R
φi × (pi,0 + psi,i ).
(10)
i=0
As is the intention of the paper, the metrics mentioned are not intended to be an exhaustive list but rather as typical examples of those that can be computed using the estimates obtained through the SMP and parameters of the model that can be computed, as we shall show in the following section.
6
Steady–State Analysis of the SMP
In order to compute the metrics mentioned in the previous section, we need to determine the values of the basic variables pi,j and τi,j ∀i, j = 0, . . . , R. The probability mass functions sij (m) of Eq. 2 are not known but we can determine the values of τij empirically. Algorithm 1 is used to do this, assuring that the system reaches steady-state. In other words, the algorithm is executed until it converges and then the appropriate pi,j and τi,j estimates are computed as shown in Table 2. The execution of Algorithm 1 constitutes the simulation-component of the hybrid model proposed. The algorithm requires that one nominates a node to act as the wireless channel observer, called the reference node. Lines 16, 21, 36, 40, 56 and 58 show where the convergence estimates are recorded for the reference node. pi,j values, as defined in Table 1, are recorded with their corresponding τi,j values. Lines 7 through 9 determine after how many slots the next transmission will occur and which nodes get to transmit next. Referring to Fig. 2 and Table 1, depending on the transition, the idle time is made up of one or more of the empty time (ET ), DIFS, EIFS and the back-off time (annotated as BoV). The number of slots required to transmit during the next busy period tbusy is shown to be computed at line 10. Depending on whether the transmission was a success or not, tbusy takes on one of two values. These values are different for either BA and RTS/CTS modes.
Traffic-Centric Modelling by DCF Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
begin Input: N , number of contending nodes; R, retry-limit; activityCount ← 0; ETn ← compute(RAN DOM ) ∀ n ∈ {1, . . . , N }; BoVn ← compute(RAN DOM ) ∀ n ∈ {1, . . . , N }; previousW asSuccess ← true; dropOccurred ← f alse; involvedInP reviousT xn ← f alse ∀ n; repeat slotsT oN extT Xn ← compute(ETn , DIF S, EIF S, BoVn ) ∀ n ∈ {1, . . . , N }; minSlotsT oN extT X, minCount ← compute(slotsT oN extT Xn ); update(effective idle time accumulator); compute tbusy for current observation activity;
previousW asSuccess ← (minCount == 1)?true : f alse; for n ∈ N do if slotsT oN extT Xn == minSlotsT oN extT X then /* node transmits */ if minCount == 1 then /* node transmits successfully */ if node is reference node then record successful transmission by node: pr,0 and τr,0 ; end move noden to state 0; generate next ETn ; else /* node collides */ if node is reference node then record collision by node: pr,r+1 and τr,r+1 ; end if presentn = R then move node to state 0; generate next ETn ; else move node to state r + 1; end
/* drop occurred */ /* node collides */
end generate next BoVn ; else
37 38 39 40
/* node does not transmit */ set involvedInP reviousT xn ← f alse; if ETn ≤ minSlotsT oN extT X + tbusy then /* node suspends */ update BoVn to (slotsT oN extT Xn − minSlotsT oN extT X); if minCount == 1 then /* suspends due to successful TX */ if node is reference node then record suspension by node due to another node transmitting s successfully: ps r,r and τr,r ; end else
41 42 43 44 45 46
/* suspends due to collision */ if node is reference node then record suspension by node due to collision between other nodes: pc r,r c ; and τr,r end
end if node is non-empty then set ETn ← 0; else /* node is empty reduce ETn by (minSlotsT oN extT X + busy slots for successful or failed TX); end else /* node buffers were empty during entire observation interval if node is non-empty then set ETn ← 0; else /* node is empty reduce ETn by (minSlotsT oN extT X + busy slots for successful or failed TX); end if node is reference node then if successful transmission occurred by another node then record empty time observation by node due to successful transmission s by another node: ps 0,0 and τ0,0 ; else /* collision occurred between other nodes record empty time observation by node due to collision between other c c nodes: p0,0 and τ0,0 ; end end end
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
227
end end activityCount ← activityCount + 1; until solution converges ; end
Algorithm 1. Algorithm to derive values for the SMP parameters
*/
*/
*/
*/
228
P. Pileggi and P. Kritzinger
At line 29, a new BoV is generated for a node that transmitted, whether successful or not. However, at line 33, the BoV is only updated to the difference between the amount of time it would have waited to transmit and the amount of time passed before another node transmitted during the observation period. Corresponding to the system description, given in Sect. 3, the ET variable is introduced as an extension to account for non-saturated workload scenarios. It represents the period that a node is expected to have no data in its buffer since its last transmission. A new ET is generated for a node at lines 18 and 24, which is the case when the node enters state 0, i.e., a frame was transmitted successfully or dropped. The node is thus also reverted at these lines to state 0. In lines 43 through 47 and lines 49 through 53, ET is updated by the time elapsed since the last observation point, which includes tbusy . When the node is in state R and it is involved in a collision, the probability of a node dropping a frame is recorded in the same way as for any other collision. In order to verify that the values of the respective computed metrics converge, we computed the auxiliary variables defined below. The results shown in Table 2 are for a network operating in BA mode with an arbitrary number N = 10 contending nodes and where infinite retries are allowed, i.e., R → ∞. First, we write ψ(i) as the normalised mean throughput observed after each of i consecutive iterations of 106 steps of the algorithm, with i = 1, . . . , 20. Furthermore, δ(i) = ψ(i) − ψ(i − 1). δ(i) δ(i) = . ψ(i) Next we form the cumulative sum ζ(i) of δ(i) for i, i = 1, . . . , 20, i.e., ζ(i) =
i
δ(j).
j=1
ζ(i) = ζ(i) − ζ(i − 1). The values for these variables for i, i = 1, . . . , 20, derived from executing the algorithm for 20 × 106 cycles, are shown in Table 2. Note that, in particular ζ(i), the cumulative sum of the relative difference in successive values of ψ(i), remains almost constant after i = 9. Since it is a numerical computation, one expects the final value to fluctuate around some steady state value as is indicated in the table. The computations were done on a 2.5GHz Intel I5 processor and takes less than 10 seconds to converge to the values shown. The Java code of the algorithm, comprising just over 450 lines of code, is available from the authors.
Traffic-Centric Modelling by DCF Example
229
Table 2. Results showing consecutive iterations through Algorithm 1
7
Iteration i
ψ(i)
δ(i)
ζ(i)
ζ(i)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
0.83573307 0.835337667 0.835479861 0.835579425 0.835498504 0.835476546 0.835479476 0.835469503 0.835390717 0.835337454 0.835351775 0.835379917 0.835348441 0.835324045 0.835328289 0.835327233 0.835312823 0.835322277 0.835323287 0.835327283
4.73E-04 -1.70E-04 -1.19E-04 9.68E-05 2.63E-05 -3.51E-06 1.19E-05 9.43E-05 6.38E-05 -1.71E-05 -3.37E-05 3.77E-05 2.92E-05 -5.08E-06 1.26E-06 1.73E-05 -1.13E-05 -1.21E-06 -4.78E-06
4.73E-04 3.03E-04 1.84E-04 2.81E-04 3.07E-04 3.03E-04 3.15E-04 4.10E-04 4.73E-04 4.56E-04 4.23E-04 4.60E-04 4.89E-04 4.84E-04 4.86E-04 5.03E-04 4.92E-04 4.90E-04 4.86E-04
1.70E-04 1.19E-04 -9.68E-05 -2.63E-05 3.51E-06 -1.19E-05 -9.43E-05 -6.38E-05 1.71E-05 3.37E-05 -3.77E-05 -2.92E-05 5.08E-06 -1.26E-06 -1.73E-05 1.13E-05 1.21E-06 4.78E-06
Verification of the SMP Analysis
From the observed convergence behaviour of the solver, illustrated in Table 2, it is clear that the SMP is already in steady-state after 2 × 107 × N state changes, where N nodes are contending to access the channel. As a verification of the resulting performance model, we decided that comparing our results with those obtained by Bianchi and published in his seminal paper in 2000 [1] would suffice as a verification of the accuracy of the TCM modelling approach. Not only is that approach by Bianchi widely accepted, but we were fortunate to be given access by the author to the numerical tool used to compute the results in his original paper. Figure 4 shows the plots for the BA case of saturated traffic for both the SMP approach and the results from the Bianchi paper mentioned. For interest, we added 2 more plots for various mean frame inter-arrival rates. The 2 traffic intensities, intensity 1 and 2, are characterised by a geometric distribution of the ET with mean 15 and 30 slots, respectively. As one would expect, due to fewer collisions, for a larger number of competing nodes, less traffic actually leads to better throughput when compared with the saturated case. The fact that increased collisions leads to lower throughput is further confirmed by the plots in Fig. 5 for the operation of the network in RTS/CTS mode. In addition to the throughput results already presented, Fig. 6 shows the results for mean channel efficiency ν¯, as given by Eq. 10, where ν¯ is of course the same for both operational modes. As expected, the probability of a transmission over the channel resulting in a success decreases from 1 (in the case of 1 contending node, i.e., no contention) as the number of nodes increases, since
230
P. Pileggi and P. Kritzinger
Fig. 4. Normalised throughput ψ of the network in BA mode
Fig. 5. Normalised throughput ψ of the network in RTS/CTS mode
Traffic-Centric Modelling by DCF Example
231
Fig. 6. Channel efficiency ν of the network
the probability of a collision increases. Comparing the results of saturated and unsaturated traffic conditions, it is evident that, when nodes are less likely to have data ready to send, collisions are less likely. Other metrics that can be computed for the IEEE 802.11 DCF are not discussed since, as mentioned before, the intention of the paper is to present a methodology that coalesces earlier analytic models into a generalised stochastic model for modelling such systems, rather than to discuss the merits of the network protocol. Similarly, we give neither the SMP nor the algorithm for the results of the RTS/CTS operation, since both are easily determined from what we present for the BA case. Extending the SMP and solving it in the case of RTS/CTS and in fact, several other possible variations of an IEEE 802.11 network, such as imperfect channel operation, are not difficult to do.
8
Conclusion
Each of the many analyses of the IEEE 802.11 DCF that exist in the literature is very specific about the DCF operation, the workload environment, the channel behaviour, and so on. Most are based on a Markov chain (MC) model and use complex and often restrictive stochastic theory to determine an analytic solution. In this paper, we generalise earlier analytic models into a general semi-Markov process (SMP) structure that we then solve by executing DCF activity over the structure, as a result of the TCM approach proposed. We verify the accuracy of this approach by comparing the obtained results with those of the first MC
232
P. Pileggi and P. Kritzinger
model that was proposed and that has been imitated by many variations with their individual stochastic analyses. In addition to its accuracy and simplicity, the SMP structure can be modified easily to cater for instances where the channel is imperfect, retries are limited, etc., where we have shown how easily the algorithm is extended to cater for non-saturated workload scenarios. Future work should include comparisons of results with previous works, such as by Zheng et al. [3], in order to validate the method under different conditions, showing clearly the procedure to include such new conditions.
Acknowledgement This work has been supported partially by the EU FP7 FLAVIA project, contract number 257263. Funding by the South African National Research Foundation and the Telkom South Africa Centre of Excellence in the Department of Electrical Engineering at the University of Cape Town are also gratefully acknowledged.
References 1. Bianchi, G.: Performance Analysis of the IEEE 802.11 Distributed Coordination Function. IEEE Journal on Selected Areas in Communications 18(3), 535–547 (2000) 2. Ziouva, E., Antonakopoulos, T.: CSMA/CA performance under high traffic conditions: throughput and delay analysis. Computer Communications 25(3), 313–321 (2002) 3. Zheng, Y., Lu, K., Wu, D., Fang, Y.: Performance Analysis of IEEE 802.11 DCF in Imperfect Channels. IEEE Transactions on Vehicular Technology 55(5), 1648 (2006) 4. Dong, X.J., Varaiya, P.: Saturation throughput analysis of IEEE 802.11 wireless LANs for a lossy channel. IEEE Communications Letters 9(2), 100–102 (2005) 5. Ni, Q., Li, T., Turletti, T., Xiao, Y.: Saturation Throughput Analysis of ErrorProne 802.11 Wireless Networks. Journal of Wireless Communications and Mobile Computing, Wiley 5, 945–956 (2005) 6. Daneshgaran, F., Laddomada, M., Mesiti, F., Mondin, M.: Unsaturated Throughput Analysis of IEEE 802.11 in Presence of Non Ideal Transmission Channel and Capture Effects. IEEE Transactions on Wireless Communications 7(4), 1276–1286 (2008) 7. Giustiniano, D., Malone, D., Leith, D.J., Papagiannaki, K.: Experimental assessment of 802.11 MAC layer channel estimators. IEEE Communications Letters 11(12), 961–963 (2007) 8. Li, F., Li, M., Lu, R., Wu, H., Claypool, M., Kinicki, R.: Tools and Techniques for Measurement of IEEE 802.11 Wireless Networks. In: 4th International Symposium on Modeling and Optimization in Mobile, Ad Hoc and Wireless Networks, pp. 1–8. IEEE Computer Society Press, Los Alamitos (2006) 9. Malone, D., Clifford, P., Leith, D.J.: MAC layer channel quality measurement in 802.11. IEEE Communications Letters 11(2), 143–145 (2007)
Traffic-Centric Modelling by DCF Example
233
10. Tinnirello, I., Bianchi, G.: Rethinking the IEEE 802.11e EDCA Performance Modeling Methodology. IEEE/ACM Transactions on Networking 18(2), 540–553 (2009) 11. Bause, F., Kritzinger, P.S.: An Introduction to the theory of Stochastic Petrinets. Vieweg Verlag, Germany (2002) 12. Howard, R.: Dynamic Probabilistic Systems. In: Volume I: Markov Models. Volume II: Semi-Markov and Decision Processes, John Wiley & Sons, Inc, Chichester (1971) 13. Malone, D., Duffy, K., Leith, D.: Modeling the 802.11 distributed coordination function in nonsaturated heterogeneous conditions. IEEE/ACM Transactions on Networking 15(1), 159–172 (2007)
Flexible Traffic Engineering in Full Mesh Networks: Analysis of the Gain in Throughput and Cost Savings Gerhard Hasslinger Deutsche Telekom Netzproduktion GmbH Fixed Mobile Engineering Deutschland Heinrich-Hertz-Str. 3-7, Darmstadt, Germany [email protected]
Abstract. We study the link upgrading process in fixed and mobile broadband access networks, as a steadily ongoing planning procedure to keep pace with rapidly growing user demand and Internet traffic. Full mesh topologies are considered as a relevant core network structure, for which an explicit analysis of the resource and cost efficiency is carried out comparing bandwidth upgrades with and without optimized load balancing. The results indicate that flexible traffic path design can essentially increase the admissible throughput or vice versa reduce part of the overprovisioning of routing and transmission capacity with corresponding savings in costs of equipment as well as reduced energy consumption. The availability of traffic engineering prerequisites on different Internet (IP) and especially on Multiprotocol Label Switching (MPLS) networking platforms is addressed. Keywords: Traffic engineering, throughput optimization, full mesh networks, modeling and analysis of resource utilization and costs.
1 Introduction: Traffic Engineering and Its Effect on Costs Traffic-driven upgrades are a dominant cost factor for provisioning of Internet access. Studies on Internet traffic growth observe annual growth factors in the range 1.5 – 2 since 1990, which are slightly slowing down around 1.45 in the forecast for the next years [1][13]. For mobile networks, growth rates are still higher in recent years such that traffic is more than doubling within a year [2]. As a consequence, bandwidth provisioning has to be steadily adapted to increasing demand as far as scalability of underlying technology enables to avoid shifts to next generation equipment in short lifecycle periods. The distribution of operational (OPEX) and capital (CAPEX) expenditures depends on the lifecycle duration and on the demand for capacity upgrades, as depicted in an example of Figure 1, which also refers to implementation expenditures (IMPEX) that are often included in CAPEX. IP network resource utilization is usually low. Among the main reasons contributing to overprovisioning for IP traffic and applications are ¾
variability in usage pattern due to churn in on-/offline mode and daily or seasonal busy hour profiles,
K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 234–248, 2011. © Springer-Verlag Berlin Heidelberg 2011
Flexible Traffic Engineering in Full Mesh Networks
235
¾
high variability of source traffic for many IP applications, e.g. web browsing, video conferencing and streaming, gaming etc., ¾ demands for resilience in the aggregation and the backbone, ¾ inflexible traffic management procedures leading to unbalanced load and congestion due to delayed or insufficient adaptation to changing demands and changing network topology due to planned upgrades or due to breakdown of resources. IMPEX CAPEX OPEX
60 50 40 30 20 10 0
1
2
3
4
5
Year s
Fig. 1. Example of expenditures in the lifecycle of an IP networking platform
Traffic variability occurs on different time scales from short term bursts on the milliseconds scale, up to periodical daily/weekly profiles and long term growth trends. Automated load balancing mechanisms are important not only to handle sudden shifts in traffic demand matrices, but also for including new resources becoming available during a network upgrading process. As a precondition to perform and to control load balancing on meshed telecommunication networks, a set of traffic engineering functions has to be provided as a basic part of network management including ¾
monitoring and situation awareness of the current network topology and traffic on the links and nodes [4], ¾ the ability to direct traffic on explicit paths from source to destination for load control [3][14], ¾ threshold based decisions to adapt to changing load and to trigger upgrades, ¾ online tools to compute and configure optimized traffic path designs in a network-wide view [8] and ¾ fast failure resilience by automated and instantaneous switching to backup paths that have been prepared for a set of most relevant failure cases, at least for single link breakdowns [3][8][11][14]. When looking at current networking scenarios, we seldom find full support of all those traffic engineering prerequisites. In pure IP networks, measurement of the link loads in 5- or 15-minute intervals has been the only available information for network planning for a long time. IP routing automatically adapts to failures, but requires a number of seconds until routing information and rerouting paths stabilize to adapt to
236
G. Hasslinger
changes in topology. In addition, it is difficult to enhance the shortest path first principle with load balancing and control by manipulating the routing weights. Multiprotocol label switching (MPLS) has been developed by the Internet engineering task force (IETF) as a networking sub-layer providing advanced traffic engineering support with all the previously listed functions [10]. Explicit source-todestination paths can be set up in MPLS in normal operation and backup paths for failure cases with measurement options per path. Based on that, algorithms of optimizing network throughput can be applied by centralized and distributed approaches including linear programming and simulated annealing [3][8]. Nonetheless, there is a tradeoff between traffic path design for balanced load and short rerouting delays especially when many paths have to be switched to restore balanced load after failure events. MPLS has been deployed in the backbone and aggregation of a number of large network providers and is still in development by an active working group within the IETF. There are other networking environments subject to mobility, churn and more types of dynamics which make control and traffic engineering functions much more challenging. Therefore fast and efficient schemes for monitoring and management response have been studied in different environments [4][7][10]. For the analysis of load balancing and corresponding cost savings we assume that a full traffic engineering cycle can be established including (1) (2) (3)
measurement of the current edge-to-edge flow demands (traffic matrix), computation of an optimized network wide path design and (re-)configuration of the computed design into the routers.
Traffic engineering tools, e.g. TE-Scout [8], have been developed to support the full cycle, where a re-optimization of traffic paths is recommended to adapt to any change in topology, upgrades of link bandwidth or relevant non-transient shifts being encountered in the traffic matrix. Those tools can also be used to investigate failure resilience [11] and to enhance the topology for throughput optimization, as has been studied even with regard to single link failures [8]. We compare classical (over-)provisioning methods with advanced traffic management. In particular, resource utilization and costs are analyzed ¾
for usual link upgrades separately for each link without adaptation of traffic paths
¾
and for load balanced traffic engineering solutions involving path (re-)optimization after each upgrade or change in topology.
Single link upgrades in pure IP networks with shortest path first (SPF) routing are subject to considerable utilization gaps, since an upgrade to k-fold capacity drastically reduces the load on the link by a reciprocal factor 1/k. Upgrades of backbone links are usually triggered when the link load is approaching a threshold. Those thresholds have to include safety margins for ensuring QoS with regard to short term traffic burstiness [5] as well as busy hours in daily traffic profiles and long term variability over weeks and months with seasonal effects. Since upgrades have to be planned several months in advance, prognosis for traffic growth in the meantime and an additional safety margin for unforeseen delays in the upgrade processes have to be taken into account. Last not least, global content
Flexible Traffic Engineering in Full Mesh Networks
237
delivery platforms have a major influence on IP traffic flows, which support popular web sites by distributing large content volumes via global server farms delivering data from a server in the near of the requesting user [9]. In section 2 we introduce a model to evaluate the effect of a continuous link upgrading process on the utilization for exponential traffic growth. Section 3 addresses how traffic engineering can increase the throughput and resource utilization. The cost saving effect of traffic engineering is analyzed in section 4 for the case of full mesh networks followed by a discussion of special cases and extensions and by a summary of main results in the conclusions.
2 Modeling of Link Utilization during Bandwidth Upgrade Cycles We assume an exponential traffic growth over time and denote ¾
tUp for the link load threshold, which triggers the next upgrade (0 < tUp ≤ 1 as a percentage of bandwidth),
¾
fUp for the capacity upgrade factor ( fUp > 1),
¾
dUp for the duration of an upgrade period from a link upgrade to the next one.
Figure 2 illustrates the development of link loads, when upgrades are performed by factors fUp = 2, 4 and 10 while traffic growth is exponential. In the past decade, IP core capacities scaled in 4-fold steps e.g. from 2.5 Gbit/s via 10 Gbit/s to 40 Gbit/s, whereas Ethernet proceeds to 10-fold capacity (10 Mbit/s, 100 Mbit/s, 1 Gbit/s, 10 Gbit/s). Naturally, upgrades to twice the capacity are always possible by replicating a link. Ethernet standardization is currently developing towards 40 Gbit/s and 100 Gbit/s interfaces. We can compute the mean link load ρMean during an upgrade period of length dUp in terms of the ratio of the areas below the exponential growth curve and below the step function for capacity upgrades in Figure 2. In such a period a constant growth rate ω is lifting the traffic demand from the initial level tUp to the level tUp fUp while the maximum allowable link bandwidth stays constant at fUp. Figure 2 illustrates the case tUp = 1 and we conclude in general
ρMean
t = Up f Up d Up
d Up
∫ exp(ω x) dx = 0
tUp 1 − 1 / f Up d exp(ω x) Up = tUp 0 f Up d Upω ln( f Up )
|
(1)
where exp(ω d Up ) = f Up . The result shows that the mean link load undercuts the threshold tUp by a factor (1 – 1 / fUp ) / ln(fUp), which is independent of ω and dUp. In particular, the mean load ρMean on an IP link with usual upgrading process is bounded by ¾
ρMean < 0.72 tUp for fUp = 2, i.e. upgrades to twice the capacity,
¾
ρMean < 0.54 tUp for fUp = 4, i.e. upgrades to 4-fold capacity,
¾
ρMean < 0.39 tUp for fUp = 10, i.e. upgrades to 10-fold capacity.
238
G. Hasslinger
Even if the traffic does not strictly follow an exponential growth in practice, the estimates still hold for random variability around an underlying growth tendency, provided that traffic variability and growth is independent of upgrading instances, i.e. if upgrades are not delayed until congestion, which would lead to jumps in link traffic volume after widening a bottleneck.
Traffic growth and provided bandwidth [Gb/s]
50
Exponential Traffic Growth
4-fold upgrades ⇒ Mean load < 54%
(Growth factor 2 over 2 years)
10-fold upgrades (Ethernet) 40
Upgrades to 4-fold capacity
2-fold upgrades ⇒ Mean load < 72%
Upgrades to double capacity 30
20
10-fold upgrades ⇒ Mean load < 39% 10
2.5 1 0 0
1
2
13
4
5
2 6
7
8
3
9
10
11 4
Years
Fig. 2. Link upgrades and resulting utilization gaps for exponential traffic growth
3 Traffic Path Optimization for Upgrades in a Full Mesh Traffic engineering can fill utilization gaps after upgrades by redirecting transport paths from links in the surrounding to an upgraded link, such that newly installed bandwidth is instantly exploited to smooth down higher load on other links. Traffic engineering tools are available, to compute optimized path designs for load balancing for arbitrary network topologies and traffic demand matrices based on operations research methods [3][8][14]. As a concrete case study, we evaluate the potential gain of traffic engineering for a full bidirectional mesh of K nodes with a uniform traffic matrix, such that all demands tij = d(τ) [Mbit/s] between pairs Ni, Nj (1 ≤ i, j ≤ K) of edge nodes are equal. Again, we expect an exponential growth of the demands over time d(τ) = d0 exp( ωτ), starting from initial level d0 where ω can be chosen to match current growth rates [2][13], but has no impact on the long term utilization determined by equation (1). Although the assumption of unique traffic demands is simplifying, the full mesh scenario is currently relevant in the core of IP/MPLS networks. Regarding transport costs, the router line card interfaces are more expensive than optical transmission equipment for the same capacity. As a consequence, it is cheaper to bypass multiple
Flexible Traffic Engineering in Full Mesh Networks
239
hops in a mesh IP topology via direct paths on the optical layer, wherever traffic volume demands are sufficiently large. Therefore full mesh core networks contribute to cost efficiency as an inner hierarchy level in the backbone avoiding multiple hops in IP transport between core nodes. Aggregation regions of almost equal size are usually assigned to core nodes, which strengthen balanced traffic matrices for broadband access aggregation. Consumer traffic of this type generated by millions of subscribers dominates over business applications in IP traffic statistics [2][12]. On the other hand, there is an asymmetry between higher downstream and lower upstream rates in consumer traffic and there are transit flows of different type on IP networks which contribute to variability in IP traffic matrices. A full mesh with unique link capacities C and with load threshold tUp can transport uniform demands up to tij = d(τ) ≤ C tUp
(2)
by single hop transfers of tij on the link from Ni to Nj. In this scenario, upgrades are triggered simultaneously for all links when d(τ) approaches the load threshold C tUp, yielding a large utilization gap afterwards. Similar gaps are also encountered in meshed networks when links are upgraded independent of each other at different points in time without redirection of traffic to make use of new capacity as soon as it is available. Traffic engineering measures for flexible adaptation of paths after upgrades can essentially smooth down those utilization gaps. Then the full mesh upgrade can be divided into several upgrade steps for subsets of links in order to increase the throughput more gradually while the mean utilization can be kept at a higher level. Some demands have to be split up and transported via multiple paths during intermediate upgrade steps. A full mesh topology suggests up to K–1 steps until all links are extended from capacity C to fUp C as follows: 1th step: bidirectional upgrades of all links to and from node N1, 2nd step: bidirectional upgrades of links to and from N2 except for the link to/from N1, … kth step: N–k bidirectional upgrades of links between node Nk and nodes Nj for j > k. Figure 3 illustrates the stepwise upgrading process where bold lines indicate links with increased capacity fUp C. Next we determine the gain in throughput and the corresponding costs for stepwise upgrades. The allowable throughput has to be evaluated with regard to the complete traffic demand matrix tij, since it does not help if only a part of the demands can be served at higher bandwidth. N1
N2
N6
1. Upgrade Step
N3
N5
N4
N1
2. Upgrade Step
N2
N6
N3
N5
N1
N2
N6
N4
Fig. 3. Stepwise upgrades in a full mesh of K = 6 nodes
…
N3
N5
N4
240
G. Hasslinger
Each demand tij is associated with a multipath flow from the source Ni to the destination Nj. The traffic is directed on a path design especially adapted to the resources in each upgrade step. The flows have to fulfill boundary conditions for allowable throughput such that all traffic flow intensities are positive and the sum of the flow intensities of all paths over a link does not exceed the link capacity. For formal definition and optimization techniques for multi commodity flow problems in telecommunication networks we refer to [3][8][14]. We start with the situation after the first step, when K – 1 links between node N1 and all other nodes have been upgraded to capacity fUpC. In order to exploit additional capacity to increase throughput, following paths pij(k) and flow intensities fij(k) are assigned: Demands tij for i,j ≥ 2: pij(1) = (Ni, Nj)
with fij(1) = CtUp and
pij(2) = (Ni, N1), (N1, Nj) with fij(2) = (fUp – 1)C tUp / (K – 1) Demands t1j for j ≥ 2: p1j(1) = (N1, Nj) with f1j(1) = CtUp + (fUp – 1)C tUp / (K – 1) Demands t i1 for i ≥ 2: p i1(1) = (Ni, N1) with f i1(1) = CtUp + (fUp – 1)C tUp / (K – 1) Figure 4 demonstrates how traffic demands tij are split up between the link Ni → Nj and via Ni → N1 → Nj to utilize new upgraded capacity. Consequently, the maximum throughput C tUp [1+ (fUp – 1)/ (K – 1)] is allowable as the total flow for each demand tij, such that all flows on all included paths generate full utilization on each link, where
N1
N2
N6
N3
N5
N4
Fig. 4. Example of multi-path flows for the demands t5j from node N5
links lij for i,j ≥ 2, which have not jet been upgraded, are loaded by fij(1) = CtUp, links l1j for j ≥ 2 are loaded by a sum of flows f1j(1) +
∑
K i =2 i≠ j
.
fij(2) = CtUp + (K – 1)(fUp – 1)C tUp / (K – 1) = fUpC tUp and
links li1 for i ≥ 2 are loaded by a sum of flows
Flexible Traffic Engineering in Full Mesh Networks
fi1(1) +
∑
K j =2 j ≠i
.
241
fij(2) = CtUp + (K – 1)(fUp – 1)C tUp / (K – 1) = fUpC tUp.
In similar way, the k-th upgrade step is shown to increase the allowable throughput to C tUp [1 + k (fUp – 1) / (K – 1)] until fUp C tUp is reached in the (K – 1)-th step. The path design sets up k flows of intensity (fUp – 1)C tUp / (K – 1) from Ni to Nj via N1, N2, … Nk for i, j > k to serve the demand tij. Flows to and from the nodes N1, N2, … Nk are transported on direct links, which already have been upgraded in the first k steps. In summary, the first k steps of an upgrade cycle increase the allowable throughput by a factor 1 + k (fUp – 1) / (K – 1) such that the throughput is sufficient for d(τ) ≤ C tUp [1 + k (fUp – 1) / (K – 1)].
(3)
4 Modeling and Analysis of Costs 4.1 (Sub-)Linear Upgrade Cost Model with Exponential Decrease in Time In order to analyze CAPEX for full and stepwise upgrades, a cost model is introduced in two dimensions regarding ¾
a cost profile for the dependency on link capacity and
¾
a cost profile for the development of the costs for the same equipment over time.
For the first dimension we assume CAPEX to increase with capacity such that an upgrade by a factor fUp causes costs of f eCost cC , where cC are the costs per link of capacity Up
unit C. The analysis can be carried out for arbitrary parameter eCost ≥ 0 where a corridor 0.5 < eCost ≤ 1 covers most realistic cost developments. On the maximum side, eCost = 1 corresponds to a linear increase, whereas eCost = 0.5 includes a square root increase such that 4-fold capacity doubles the link costs. Technology shifts may temporary lead to different behaviour but which is not expected to persist in the long term perspective. In extreme scenarios, e.g. when no equipment for larger capacity is available, parallel links of the highest available capacity can be installed which exceed linear cost involving additional multiplexers and load balancers to operate multiple links in parallel. For the second cost profile in time domain we rely on Moore’s law, assuming that there is a long term balance between increase in deployed bandwidth and decrease in cost per bandwidth. Subscriber fees for broadband Internet access are constant or even decreasing over time despite of higher access speeds being offered. Therefore network providers would be ruined in a tradeoff between decreasing flat rate fees and increasing traffic driven costs if costs per link bandwidth wouldn’t decrease at least at the same ratio as offered bandwidth is increasing over time. We expect the demand for higher bandwidth to hold on for more than the next decade, since video services still benefit from higher transfer rates up to the Gbit/s range for advancing HDTV and 3D quality, which is far beyond nowadays access speeds. We briefly discuss the effect of different cost reduction profiles over time in section 4.3. Let T denote the duration of a stepwise upgrade cycle until all links have been upgraded once. An upgrade of a link from capacity C to fUp C at time τ after the start of the cycle is associated with costs
242
G. Hasslinger
c( f Up ,τ ) = f UpeCost cC e
e − (τ / T ) ln( f Cost ) Up
(0 ≤ τ ≤ T ) ,
(4)
eCost where a factor f Up is compensated for within an upgrade cycle, i.e. at τ = T the link
Cost Factor Developments for 4-fold Upgrade
capacity fUp C is as expensive as the capacity C has been in the beginning (τ = 0). Figure 5 illustrates the cost model (4) over an upgrade cycle to 4-fold capacity, where c(fUp = 4,τ = 4 years) = c(4, 4)= c(1, 0). Exponential Traffic Growth
4
Linear Cost Factor with Exponential Decrease Square Root Cost Factor with Exponential Decrease
3
2
1
0 0
1
2 Years
3
4
Fig. 5. Linear and sub-linear cost model for capacity with compensation for increasing bandwidth over time
4.2 Evaluation of Full and Stepwise Upgrades Based on the Cost Model eCost CAPEX of K(K – 1) f Up cC / 2 is introduced by instantaneous upgrades of all links to
the capacity fUp C. For stepwise upgrades, we evaluate the instances τ k when the k-th step becomes necessary, i.e. when the traffic growth approaches the next threshold according to the maximum throughput of the previous upgrade step. Assuming exponentially growing traffic demand
d (τ ) = e
(τ / T ) ln( f Up )
C t Up
we first obtain the time τ k when the demand exceeds the allowable throughput of the (k–1)-th upgrade step from (3)
d (τ k ) / C tUp = e
(τ k / T ) ln( f Up )
= 1 + ( f Up − 1)(k − 1) /( K − 1) ⇒
τ k = T ln[1 + ( f Up − 1)(k − 1) /( K − 1)] / ln( f Up ).
(5)
Figures 6 and 7 show upgrade instances τ k in full meshs of K = 6 and K = 12 nodes associated with the time coordinate of each step. The development is shown over an
Flexible Traffic Engineering in Full Mesh Networks
243
upgrade cycle to 4-fold capacity fUp = 4 which compensates for exponential traffic growth over four years according to the current estimates [2][13]. The k-th upgrade step includes k [K – 1 – (k – 1)/2] links with associated costs CAPEX k = k [ K − 1 − (k − 1) / 2] f UpeCost cC e = k [ K − 1 − (k − 1) / 2] f UpeCost cC e
e −(τ k / T ) ln( f Cost ) Up
e −ln( f Cost ) ln[1+ ( k −1)( f Up −1) /( K −1)] / ln( f Up ) Up
.
In total, CAPEX in a cycle of stepwise upgrades sums up to K −1
∑ CAPEX k =1
K −1
k
= ∑ k [ K − 1 − (k − 1) / 2] f UpeCost cC e
e −ln( f Cost ) ln[1+( k −1)( f Up −1) /( K −1)] / ln( f Up ) Up
.
k =1
As compared to full instantaneous upgrades we finally obtain the ratio RCAPEX of CAPEX saving by stepwise upgrades, depending on three parameters K, fUp and eCost K −1
RCAPEX = ∑ CAPEX k / [ K ( K − 1) f UpeCost cC / 2] k =1
Stepwise Upgrades: Troughput & CAPEX
1 = K
k − 1 − ln( f UpCost ) ln[1+ ( k −1)( f Up −1) /( K −1)] / ln( f Up ) k 2 e . − ∑ K −1 k =1 K −1
(
)
e
(6)
4 Exponential Traffic Growth Throughput: Full 4-fold Upgrades Throughput: Stepwise Upgrades (K = 6) Cumulative Costs (Linear Model) Cumulative Costs (Square Root Model)
3
2
1
0 0
1
2 Years
3
4
Fig. 6. Cost factors for stepwise full mesh upgrades for K = 6
Thus CAPEX saving can be realized for steady traffic growth in terms of the ratio RCAPEX due to delayed investment over time, which is permanently achieved in each new upgrade cycle. On the other hand, this is reflected in higher mean link utilization and causes overhead in advanced traffic engineering procedures, where paths have to be explicitly redirected for topology or demand changes including multi-path design per demand. In this way traffic engineering causes more effort in OPEX, whereas higher flexibility for on-demand reoptimization of traffic flows and energy saving effects are reducing OPEX. A most critical precondition is the support for fast monitoring [4] and reaction in case of unforeseen changes, i.e. after link failures [11].
G. Hasslinger
Stepwise Upgrades: Troughput & CAPEX
244
4 Exponential Traffic Growth Throughput: Full 4-fold Upgrades Throughput: Stepwise Upgrades (K=12) Cumulative Costs (Linear Model) Cumulative Costs (Square Root Model)
3
2
1
0 0
1
2 Years
3
4
Fig. 7. Cost factors for stepwise full mesh upgrades for K = 12
From knowledge of the instances τ k due to (5) we finally also evaluate the mean Step−Upgr. utilization ρ Mean during a stepwise upgrade cycle, which corresponds to the ratio of the areas below the exponential growth curve and the throughput limit steps in Figure 6: Step− Upgr. ρ Mean =
1 − 1 / f Up . K −1 τ −τ ln( f Up ) ∑ k =1 k +1 k [1 + ( f Up − 1)k /( K − 1)] T
(7)
Results for the mean utilization and CAPEX saving ratio are shown in Table 1 for full mesh networks with K = 6 and K = 12 nodes and for upgrade factors fUp = 2, 4 and 10. In addition, the ratio RCapac = ρ Step− Upgr. / ρ Full− Upgr. of installed capacities is included in Table Mean Mean 1 as an indicator of savings in energy consumption to be expected in operational expenditures. 1 / RCapac directly corresponds to energy costs, if they are linear in the capacity of installed equipment. For a more realistic assumption of a sub-linear increase of energy e
costs with capacity, a profile f UpPower cC , Power can be evaluated as an extension with parameter ePower expressing the dependency of energy consumption on capacity C. Table 1. Savings of stepwise upgrades in utilization, installed resources and CAPEX
RCapac =
K
fUp
6 2 12 2 6 4 12 4 6 10 12 10
Full − Upgr. − Upgr. ρ Mean ρ Step − Upgr. Full− Upgr. ρ Step / ρ Mean Mean Mean
72.1% 72.1% 54.1% 54.1% 39.1% 39.1%
93.4% 96.9% 87.3% 93.9% 79.7% 90.1%
1.295 1.344 1.613 1.736 2.037 2.304
eCost
f Up
RCAPEX = f Up ; f UpeCost = f Up0.5
0.693 0.649 0.658 0.606 0.619 0.555
0.819 0.793 0.795 0.765 0.767 0.730
Flexible Traffic Engineering in Full Mesh Networks
245
The link utilization for stepwise upgrades goes up to 97% for fUp = 2 and is still at 80 - 90% for fUp = 10 in contrast to large utilization gaps for full upgrades. The cost factor RCAPEX is in the range of 55 - 70% when costs are linear in capacity and still in the range of 73 - 82% for a square root increase. More nodes in the network allow for more intermediate upgrade steps and thus increase the potential for cost savings. The relative improvement for 12 nodes is about 10% above the results for 6 nodes, which still holds when several of the last steps in an upgrade cycle are performed together since each of them includes only one or a few links. Figure 6 compares the CAPEX spent in an upgrade cycle to 4-fold capacity (fUp = 4). Stepwise upgrades are done when the load exceeds the allowable throughput of installed resources. Costs immediately jump 4-fold for linear profile (eCost = 1) when the full mesh is upgraded, whereas CAPEX curves for stepwise upgrades stay below by 35 - 40% until the end of the cycle. Similar curves are observed for square root cost development (eCost = 0.5). Then the full upgrade cost factor f eCost = 2 (dotted Up
line in Figure 6) is undercut in stepwise upgrades by 20 - 24%. 4.3 Discussion of Cost Aspects for Special Cases and Extensions If traffic growth would stop e.g. after one year then cost savings can even be higher since the stepwise process would stop further upgrades when utilization thresholds are not reached. In all examples of Figure 6, no more than 1/3 of the full upgrade CAPEX is spent in the stepwise process within the first year and still no more than half after two years. Therefore exponential traffic growth obviously is not an essential precondition for achieving the CAPEX savings by traffic engineering. It is adopted as a realistic scenario to enable exact analysis, but CAPEX savings are expected to be even higher when more flexibility is required for unforeseen variability in traffic growth. The cost model assumes exponential decrease of costs over time, where the rate depends on the cost development for capacity, such that necessary costs for upgrades by the same factor remain almost constant over time. It is obvious that a faster cost decrease rate would lead to a higher gain of the time shifts for investment in a stepwise strategy whereas the gain is lower for smaller decrease rates. If costs remain constant over time then the cumulative costs of stepwise upgrades approach the full upgrading costs at the end of the cycle, but for a limited budget which does not suffice for a next full upgrade, some upgrade steps may still be affordable resulting in corresponding higher network throughput. While the case of full mesh networks leads to the presented analytical solution for path design and CAPEX evaluation, mesh network topologies in general require optimization tools involving linear programming or simulated annealing to compute a set of traffic paths for load balancing and near optimum utilization of the transport capacities [3][8][14]. Results in [8] confirm a similar potential for improving resource efficiency and costs also for other IP network topologies with a connectivity degree of at least 3, such that 3 disjoint paths exist between each pair of nodes. Nonetheless, the network-wide optimization of traffic paths makes the control of traffic more complex than separated treatment for each link. When higher loads are realized, operational processes may become more critical, such that the possible gain by adjusting load levels has to be exploited with care. On the other hand, the opportunity to adapt traffic paths gives much more flexibility to deal with breakdowns in operational processes.
246
G. Hasslinger
4.4 Failure Resilience: Throughput and Fast Redirection of Traffic Paths A major challenge for full deployment of the proposed load balancing mechanisms can be seen in the additional demand to extend path optimization to integrate failure recovery. This is indispensible e.g. for backbones where a large population would be affected by a failure and in many other mission critical networks. When traffic engineering is used to optimize the throughput in normal operation, the effect of nonoptimized failure situations would be even more severe. Thus a set of relevant failure cases including at least single link failures has to be taken care of by preparing automated switching to backup paths. Recent work improves the identification of relevant failure cases and possible resilience enhancements of the topology [11] and uses distributed methods for failure resilience [3]. The network throughput with regard to a set of relevant failure scenarios has to cover all demands in the current traffic matrix in normal operation as well as in all considered failure cases, such that a worst case analysis of the network throughput has to be carried out on the failure set [8][11]. Traffic engineering tools can pre-compute optimized backup paths for each failure scenario. A single link failure usually triggers IP/MPLS rerouting and shifts the traffic from the failed link to backup paths. When network dimensioning in the backbone has to cover single link failures without optimization tools, this often means a 50% reduction in allowable throughput with regard to a merge of traffic from two links on a provided backup path of the same capacity. Experience from [8] in meshed networks revealed a higher potential for throughput improvement by traffic engineering when single link failures are taken into account as compared to the previous results in section 4.2 for normal operation. In our case study of a full mesh, traffic on a failed link e.g. from N1 → N2 can again be split up on K – 2 disjoint backup paths via N1 → Nj → N2, for all j > 2. When all links have the same bandwidth C and load threshold tUp, then a balanced redistribution of traffic on those backup paths adds no more traffic than C tUp/(K – 2) per link. We conclude that the allowable throughput is reduced for single link failure resilience by a factor (K – 2)/( K – 1), since a reduction of all flows by this factor would keep the load below or equal to C tUp on all links including those carrying a backup path. Thus single link failure resilience in a full mesh can be obtained at 20% throughput reduction for K = 6 and less than 10% throughput reduction for K = 12 nodes, respectively. It is not unexpected that a full mesh is more favorable to compensate for single link failures than lower degree meshed networks studied in [8]. Considering failure resilience in stepwise upgrading processes, we can again redistribute traffic paths from a failed link over K – 2 disjoint 2-hop paths via other links, where we have to cope with different bandwidths C and fUpC. Thus in the worst case, all links with backup paths are limited in capacity by C tUp but have to carry additional traffic fUpC tUp/(K – 2) from an upgraded link. Then a traffic reduction by the factor (K – 2)/(K – 2 + fUp) would lead to admissible load on all links. The relative throughput reductions for single link failure resilience are more severe for different link bandwidths especially for a small number of nodes, e.g. 50% for K = 6 and fUp = 4 and still amount to 17 % for K = 12 and fUp = 2. In addition, the flexibility of adapting traffic paths according to re-optimized designs is beneficial especially in order to react to unforeseen shifts in the traffic matrix, e.g., due to hot spot effects or changes in external load controlled by content delivery
Flexible Traffic Engineering in Full Mesh Networks
247
networks [9]. Even if redirections of a number of traffic paths for re-optimization cannot always be done in real-time, it still provides an automated and much faster response as compared to weeks or months of delay in planning and executing link upgrades or other modifications of the topology in an operational network.
5 Conclusions The effect of traffic engineering to make better use of new installed bandwidth during the continuous upgrading process in broadband access networks is analyzed in terms of the achievable network throughput and the impact on costs. Considering exponential traffic growth and a cost model involving exponential decrease in costs per bandwidth unit over time, an exact analysis can be performed in order to determine the benefit of load balancing in full mesh networks. The evaluation for full mesh networks with realistic traffic growth and cost decrease rates shows that instantaneous adaptation of traffic paths can save at least 20% of traffic-driven bandwidth costs as well as corresponding energy consumption. The results confirm similar experience with case studies of arbitrary topologies with the help of tools to compute optimum traffic path designs for normal operation as well as failure cases.
Acknowledgements Part of this work was developed while the author was involved in the 4WARD project <www.4ward-project.eu> funded by the European Commission and in the MEVICO project <www.celticplus.eu; search “MEVICO”> funded by the German Federal Ministry of Education and Research.
References [1] Akamai, State of the Internet (2010), http://www.akamai.com [2] Cisco Systems, Visual networking index, forecast and methodology, White paper series, updated in 2011 especially for mobile networking traffic (2011), http://www.cisco.com [3] Cohen, R., Nakibly, G.: Maximizing Restorable Throughput in MPLS Networks. IEEE Infocom (2008) [4] Gonzalez Pietro, A., Stadler, R.: Controlling Performance Trade-offs in Adaptive Network Monitoring. In: 11th IFIP/IEEE International Symposium on Integrated Network Management, New York, USA (2009) [5] Haßlinger, G.: Quality-of-Service Analysis for Statistical Multiplexing with Gaussian Distributed and Autoregressive Input. Telecommunication Systems 16, 315–334 (2001) [6] Haßlinger, G., Nunzi, G., Meirosu, C., Fan, C., Andersen, F.-U.: Traffic Engineering Supported by Inherent Network Management: Analysis of Resource Efficiency and Cost Saving Potential. International Journal on Network Management 21, 45–64 (2011) [7] Hasslinger, G., Kunz, T.: Challenges for Routing and Search in Dynamic and Selforganizing Networks. In: Ruiz, P.M., Garcia-Luna-Aceves, J.J. (eds.) ADHOC-NOW 2009. LNCS, vol. 5793, pp. 42–54. Springer, Heidelberg (2009)
248
G. Hasslinger
[8] Haßlinger, G., Schnitter, S., Franzke, M.: The efficiency of traffic engineering with regard to failure resilience. Telecommunication Systems 29, 109–130 (2005) [9] Hasslinger, G., Hartleb, F., Beckhaus, T.: User Access to Popular Data on the Internet and Approaches for IP Traffic Flow Optimization. In: Al-Begain, K., Fiems, D., Horváth, G. (eds.) ASMTA 2009. LNCS, vol. 5513, pp. 42–55. Springer, Heidelberg (2009) [10] Internet Engineering Task Force (IETF), http://www.ietf.org; MPLS working group (2011), http://www.ietf.org/html.charters/mpls-charter.html [11] Menth, M., Duelli, M., Martin, R., Milbrandt, J.: Resilience analysis of packet switched communication networks. IEEE/ACM Trans. on Networking 17, 1950–1963 (2009) [12] Minnesota Internet traffic studies, MINTS (2010), http://www.dtc.umn.edu/mints/home.php [13] Odlyzko, A.: Internet traffic growth: Sources and implications. In: Proc. SPIE, vol. 5247, pp. 1–15 (2003) [14] Pioro, M., Mehdi, D.: Routing, Flow and Capacity Design in Communication and Computer Networks. Morgan Kaufmann Publ., San Francisco (2004)
Investigation of the Reliability of Multiserver Computer Networks Saulius Minkeviˇcius and Genadijus Kulvietis Vilnius Gediminas Technical University, Sauletekio 11, 10223 Vilnius, Lithuania [email protected], [email protected]
Abstract. Performance in terms of reliability of multiserver computer networks motivates this paper. The law of the iterated logarithm on the extreme queue length in open multiserver queueing networks in heavy traffic is derived and applied to a reliability model for multiserver computer networks where we relate the time of failure of a multiserver computer network to the system parameters. Keywords: Performance evaluation, reliability theory, queueing theory, mathematical models of technical systems, open multiserver queueing network, heavy traffic, the law of the iterated logarithm, queue length of jobs, extreme values.
1
Introduction
Probabilistic models and queueing networks have long been used to study the performance and reliability of computer systems [5,6] and to analyse the performance and reliability of computer networks and of distributed information systems [7,8]. In this paper, we will first briefly review the works related to using the queueing theory of computer systems reliability, and then present some new results on the estimation of the time of failure of a computer network. In one of the first papers of this kind [21], the reliability of execution of programs in a distributed computing system is considered, showing that a program, which runs on multiple processing elements that have to communicate with other processing elements for remote data files, can be successfully executed despite that certain system components may be unreliable. In order to analyse the performance of multimedia service systems which have unreliable resources and to estimate their capacity requirements, a capacity planning model using an open queueing network is presented in [25], and in [9] a novel model for a reliable system composed of N unreliable systems, which can hinder or enhance each other’s reliability, is discussed. In [26], the management policy of an M /G/1 queue with a single removable and non-reliable server is discussed and analytic results are explored, using an efficient Matlab program to calculate the optimal threshold of the management policy and to evaluate the system performance. In
Corresponding author.
K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 249–256, 2011. c Springer-Verlag Berlin Heidelberg 2011
250
S. Minkeviˇcius and G. Kulvietis
[27], the authors consider a single machine subject to break down and employ a fluid queue model with repair. In [32], the behaviour of a heterogeneous finitesource system with a single server is considered and applications in the field of telecommunications and reliability theory are treated. In this paper, we present the law of the iterated logarithm (LIL) for queue length of customers in open multiserver queueing networks under heavy traffic conditions. Queueing networks have been extensively used for the performance analysis of manufacturing systems, transportation systems, and computer and communication networks. Therefore, many approximation methods have emerged, and among them are LIL. One can familiarize with the general theory on the LIL and its numerous applications in various fields of probability theory in the survey [2]. The main part in the development of the theory on the LIL was played by [31] in the fundamental work, where the functional variant of the LIL for a Wiener process was proved. [14] can be considered as the first work on the LIL in the queueing theory. Applying the approach of [31], the author of the [14] proved the LIL in it, under the conditions of heavy traffic, for the queue length of customers, waiting time of a customer, a virtual waiting time of a customer, and other important probability characteristics of the classical queueing system G1/G/1 and more general systems (e.g., for a multiple queueing system). Also, a functional variant of the LIL for a renewal process is proved in [14]. Using the results in [15] and [16], the survey in [34] presents the proof of theorems on the LIL for the waiting time of a customer, the occupation time process, and the extreme value of the waiting time of a customer in the queueing system G1/G/1. Also, [11] and [12] prove theorems on the LIL for a cumulative process associated with the queue length of customers and waiting time of a customer in an ordinary queueing system G1/G/1. Note that the research of the LIL in more general systems than the queueing system G1/G/1 or multiphase queueing systems has just started (see [22]). In [1] and [23], the LIL is proved in heavy traffic for the queue length of customers, waiting time of a customer, a virtual waiting time of a customer in a multiphase queueing system. [29] also gives the proof of the theorem on the LIL under the conditions of heavy traffic for a virtual waiting time of a customer in the open Jackson network. Limit theorems (diffusion approximations) and the LIL for the queueing system under the conditions of heavy traffic are closely connected (they belong to the same field of research, i.e. investigations on the theory of queueing systems in heavy traffic). Therefore, first we shall try to trace the development of research on the general theory of queueing system in heavy traffic. There is a vast literature on the diffusion approximation. Readers are referred to [34], [20], [4] and [10] for a general survey of the subject. The present work extends the studies by [17,18] for a single station of multiserver queues, and by [28], [19] and [3] for networks of single-server queues. Other closely related papers are [13] for networks of infinite-server queues, and [35] for a GI/G/∞ queue.
Investigation of the Reliability of Multiserver Computer Networks
2
251
The Network Model
Consider a network of j stations, indexed by j = 1, 2, . . . , J, and the station j has cj servers, indexed by (j, 1), . . . , (j, cj ). A description of the primitive data and construction of processes of interest are the focus of this section. No probability space will be mentioned in this section, and of course, one can always think that all the variables and processes are defined on the same probability space. First, {uj (e), e ≥ 1}, j = 1, 2, . . . , J, are J sequences of exogenous interarrival times, where uj (e) ≥ 0 is the interarrival time between the (e − 1)-st job and the e-st job who arrive at station j exogenously (from the outside of the network). n Define Uj (0) = 0, Uj (n) = uj (e), n ≥ 1 and Aj (t) = sup{n ≥ 0 : Uj (n) ≤ e=1
t}, where Aj = {Aj (t), t ≥ 0} is called the exogenous arrival process of the station j, i.e., Aj (t) counts the number of jobs arrived at the station j from the outside of the network. Second, {vjkj (e), e ≥ 1}, j = 1, 2, . . . , J, kj = 1, 2, . . . , cj , are c1 + . . . + cJ sequences of service times, where vjkj (e) ≥ 0 is the service time for the e-th customer served by the server kj of the station j. Define Vjkj (0) = 0, Vjkj (n) = n vjkj (e), n ≥ 1 and xjkj (t) = sup{n ≥ 0 : Vjkj (n) ≤ t}, where xjkj = e=1
{xjkj (t), t ≥ 0} is called the service process for the server kj at the station j, i.e., xjkj (t) counts the number of services completed by server kj at the station −1 j during the server’s busy time. We define μjkj = M vjkj (e) > 0, σjkj = −1 D vjkj (e) > 0 and λj = (M [uj (e)]) > 0, aj = D (uj (e)) > 0, j = 1, 2, ..., k; with all of these terms assumed finite. Also, let τjkj (t) be the total number of jobs after service departure from the kj server of the jth station of the network in the interval [0, t], τijki (t) be the total number of jobs after service departure from the ki server of the ith station of the network and arrived to the jth station of the network in the interval [0, t], pij be probability of the job after service at the ith station of the network τijki (t) are arrived to the jth station of the network. Let ptijki = denote a part τiki (t) of the total number of jobs which, after service at the ki server of the ith station of the network, are arrived to the jth station of the network in the interval [0, t], i, j = 1, 2, . . . , J, ki = 1, . . . , ci and t > 0. The processes of primary interest are the queue length process Q = (Qj ) with Qj = {Qj (t), t ≥ 0}, where Qj (t) indicates the number of jobs at the station j at time t. Now we introduce the following processes Qjkj = {Qjkj (t), t ≥ 0}, where Qjkj (t) indicates the number of customers waiting to be served by server kj of cj the station j at time t; clearly, we have Qj (t) = Qjki (t), j = 1, 2, . . . , J. ki =1
The dynamics of the queueing system (to be specified) depends on the service discipline at each service station. To be more precise, “first come, first served” (FCFS) service discipline is assumed for all J stations. When a customer arrives at a station and finds more than one server available, it will join one of the servers
252
S. Minkeviˇcius and G. Kulvietis
with the smallest index. We assume that the service station is work-conserving; namely, not all servers at a station can be idle when there are customers waiting for service at that station. In particular, we assume that a station must serve at its full capacity when the number of jobs waiting is equal to or exceeds the number of servers at that station.
3
The Main Results
First let define βjkj =
J ki =1
2 μiki · pij + λj − μjkj > 0, σ ˆjk = j
J ki =1
μ3iki · σiki · p2ij +
λ3j · aj + μ3jkj · σjkj > 0, j = 1, 2, . . . , J, kj = 1, 2, . . . , cj . We will also assume that the following “overload conditions” are fulfilled ci J
μiki · pij + λj >
i=1 ki =1
cj
μiki , j = 1, 2, . . . , J.
(1)
ki =1
Note that these conditions quarantee that the length of all the queues will grow indefinitely with probability one. The results of the present paper are based on the following theorem: Theorem 1. If conditions (1) are fulfilled, then ⎛ ⎞ sup Qjkj (s) − βjkj · t 0≤s≤t P ⎝ lim = 1⎠ = t→∞ σ ˆjkj · a(t) ⎛ P ⎝ lim
t→∞
where a(t) =
√
sup Qjkj (s) − βjkj · t
0≤s≤t
σ ˆjkj · a(t)
⎞ = −1⎠ = 1,
2t ln ln t, j = 1, 2, . . . , J, kj = 1, 2, . . . , cj .
Proof. In [30] it is proved that, if conditions (1) are fulfilled, then | sup Qj (s) − sup x ˆj (s)| ≤ sup (w(s) + γ(s)), 0≤s≤t
where x ˆj (t) = w(t) =
J
ci J
i=1 ki =1 ci J
j=1 i=1 ki=1
0≤s≤t
xiki (t) · pij + Aj (t) −
(2)
0≤s≤t
cj ki =1
xiki (t) · |ptijki − pij |, γ(t) =
xiki (t), ci J
sup (xiki (s) − τiki (s)),
i=1 ki =1 0≤s≤t
j = 1, 2, . . . , J. Similarly as in (2) we can prove that | sup Qjkj (s) − sup x ˆjkj (s)| ≤ sup (w(s) + γ(s)), 0≤s≤t
where x ˆjkj (t) =
J ki =1
0≤s≤t
(3)
0≤s≤t
xiki (t)·pij +Aj (t)−xjkj (t), j = 1, 2, . . . , J, kj = 1, 2, . . . , cj .
A further proof is similar as that in [29] (see (3)). The proof is complete.
Investigation of the Reliability of Multiserver Computer Networks
4
253
The Reliability of a Multiserver Computer Network
In this section, we prove the following theorem on the probability that a computer network fails due to overload. mjkj and conditions (1) are fulfilled, the βjkj computer network becomes unreliable (all computers fail). Theorem 2. If t ≥ max
max
1≤j≤J 1≤kj ≤cj
Proof. At first, using Theorem 1, we get that for 0 ≤ ε ≤ 1 ⎛ P ⎝ lim
sup Qjkj (s) − βjkj · t
0≤s≤t
t→∞
σ ˆjkj · a(t)
⎞ < 1 − ε⎠ = 0, j = 1, 2, . . . , J, kj = 1, 2, . . . , cj .
Let us investigate a computer network node j, which consists of cj elements vjkj (computers), j = 1, 2, . . . , J, kj = 1, 2, . . . , cj . Denote 1, if the element vjkj is reliable, Xjkj = 0, if the element vjkj is not reliable, j = 1, 2, . . . , J, kj = 1, 2, . . . , cj . Note that {Xjkj = 1} = {Qjkj (t) < mjkj }, mjkj < ∞, j = 1, 2, . . . , J, kj = 1, 2, . . . , cj . Denote the structural function of the system of elements connected by scheme 1 from cj , j = 1, 2, . . . , J (see, for example, [24]) as follows: ⎧ ⎪ ⎪ ⎨1, φ(Xj1 , Xj2 , . . . , Xjcj ) =
⎪ ⎪ ⎩0,
cj ki =1 cj ki =1
Xiki ≥ bj ,
Xiki < bj ,
where bj , j = 1, 2, . . . , J is the parameter of failure of the computer node. ci J Suppose y = Xiki − X11 , Xj = (Xj1 , Xj2 , . . . , Xjcj ), j = 1, 2, . . . , J, i=1 ki =1
X = (X11 , X12 , . . . , X1c1 , . . . , XJcj ). Let us estimate the reliability function of the system h(X) (computer network) using the formula of a conditional probability for the reliability function of the computer node h(Xj ), j = 1, 2, . . . , J. Note that h(X) = max h(Xj ). 1≤j≤J
But for fixed j = 1, 2, . . . , J we have that h(Xj ) = h(Xj1 , Xj2 , . . . , Xjcj ) = cj Eφ(Xj1 , Xj2 , . . . , Xjcj ) = P (φ(Xj1 , Xj2 , . . . , Xjcj ) = 1) = P ( Xjkj ≥ bj ) ≤ P(
ci J i=1 ki =1
Xiki ≥ bj ) ≤ P (
ci J i=1 ki =1
kj =1
Xiki ≥ 1) = P (X11 + y ≥ 1) =
P (X11 + y ≥ 1|y = 1) · P (y = 1) + P (X11 + y ≥ 1|y = 0) · P (y = 0) = P (X11 ≥ 0) · P (y = 1) + P (X11 ≥ 1) · P (y = 0) ≤ P (y = 1) + P (X11 ≥ 1) =
254
S. Minkeviˇcius and G. Kulvietis
P (y = 1) + P (X11 = 1) ≤ P (y ≥ 1) + P (X11 = 1) = P ( + P (X11 = 1) ≤ · · · ≤
ci J i=1 ki =1
Thus, 0 ≤ h(Xj ) ≤
P (Xiki = 1) =
ci J
ci J i=1 ki =1
J ci i=1 ki =1
P ( sup Qiki (s) ≤ miki ). 0≤s≤t
P ( sup Qiki (s) ≤ miki ).
i=1 ki =1
max
1≤j≤J 1≤kj ≤cj
t→∞
⎛
⎛
mjkj βjkj
sup Qjkj (s) < mjkj
0≤s≤t
⎞
sup Qjkj (s) − βjkj · t
0≤s≤t = lim P ⎝ t→∞
(4)
0≤s≤t
Applying Theorem 1, we obtain that for t ≥ max 0 ≤ lim P
Xiki − X11 ≥ 1)
σ ˆjkj · a(t)
<
mjkj − βjkj · t ⎠ σ ˆjkj · a(t) ⎞
sup Qjkj (s) − βjkj · t 0≤s≤t ⎝ ≤ lim P < 1 − ε⎠ t→∞ σ ˆjkj · a(t) ⎛ ⎞ sup Qjkj (s) − βjkj · t 0≤s≤t ≤ lim P ⎝ < 1 − ε⎠ t→∞ σ ˆjkj · a(t) ⎛ ⎞ sup Qjkj (s) − βjkj · t 0≤s≤t ≤ P ⎝ lim < 1 − ε⎠ = 0, t→∞ σ ˆjkj · a(t)
j = 1, 2, . . . , J, kj = 1, 2, . . . , cj . It follows from (5) that lim P sup Qjkj (s) < mjkj = 0, j = 1, 2, . . . , J, kj = 1, 2, . . . , cj . t→∞
(5)
(6)
0≤s≤t
Consequently, lim h(X) = 0 (see (4) - (6)), which completes the proof. t→∞
References 1. Asmussen, S.: Extreme value theory for queues via cycle maxima. Extremes 1(2), 137–168 (1998) 2. Bingham, N.H.: Variants of the law of the iterated logarithm. Bulletin London Mathematical Society 18, 433–467 (1986) 3. Chen, H., Mandelbaum, A.: Stochastic discrete flow networks: Diffusion approximations and bottlenecks. The Annals of Probability 19, 1463–1519 (1991) 4. Flores, C.: Diffusion approximations for computer communications networks. In: Gopinath, B. (ed.) Computer Communications. Proc. Syrup. Appl. Math. American Mathematical Society, pp. 83–124 (1985)
Investigation of the Reliability of Multiserver Computer Networks
255
5. Gelenbe, E.: Unified approach to the evaluation of a class of replacement algorithms. IEEE Transactions on Computers C22(6), 611–618 (1973) 6. Gelenbe, E.: Probabilistic models of computer systems. Part II. Acta Informatica 12, 285–303 (1979) 7. Gelenbe, E., Finkel, D., Tripathi, S.K.: Availability of a distributed computer system with failures. Acta Informatica 23(6), 643–655 (1986) 8. Gelenbe, E., Wang, X.W., Onvural, R.: Diffusion based statistical call admission control in ATM. Performance Evaluation 27(8), 411–436 (1996) 9. Gelenbe, E., Fourneau, J.M.: G-networks with resets. Performance Evaluation 49(14), 179–191 (2002) 10. Glynn, P.W.: Diffusion approximations. In: Heyman, D.P., Sobel, M.J. (eds.) Handbooks in Operations Research and Management Science, Stochastic Models, vol. 2, North-Holland, Amsterdam (1990) 11. Glynn, P.W., Whitt, W.: Sufficient Conditions for Functional-Limit-Theorem versions of L = λW . Queueing Systems 1, 279–287 (1987) 12. Glynn, P.W., Whitt, W.: An LIL version of L = λW . Mathematics of Operations Research 13(4), 693–710 (1988) 13. Harrison, J.M., Lemoine, A.J.: A note on networks of infinite-server queues. Journal of Applied Probability 18, 561–567 (1981) 14. Iglehart, D.L.: Multiple channel queues in heavy traffic.IV. Law of the iterated logarithm. Zeitschrift f¨ ur Wahrscheinlichkeitstheorie und Verwandte Gebiete 17, 168–180 (1971) 15. Iglehart, D.L.: Functional limit theorems for the GI/G/1 queue in light traffic. Advances in Applied Probability 3, 269–281 (1971) 16. Iglehart, D.L.: Extreme values in the GI/G/1 queue. Advances in Applied Probability. Annals of Mathematical Statistics 43, 627–635 (1972) 17. Iglehart, D.L., Whitt, W.: Multiple channel queues in heavy traffic. I. Advances in Applied Probability 2, 150–177 (1970) 18. Iglehart, D.L., Whitt, W.: Multiple channel queues in heavy traffic.II. Advances in Applied Probability 2, 355–364 (1970) 19. Johnson D. P.: Diffusion approximations for optimal filtering of jump processes and for queueing networks. Ph. D. dissertation, University of Wisconsin (1983) 20. Lemoine, A.J.: Network of queues–A survey of weak convergence results. Management Science 24, 1175–1193 (1978) 21. Lin, M.S., Chen, D.J.: The computational complexity of reliability problem on distributed systems. Information Processing Letters 64(3), 143–147 (1997) 22. Minkeviˇcius, S.: On the law of the iterated logarithm in multiphase queueing systems. Lietuvos Matematikos Rinkinys 35(3), 360–366 (1995) 23. Minkeviˇcius, S.: On the law of the iterated logarithm in multiphase queueing systems. II. Informatica 8(3), 367–376 (1997) 24. Morder, J.J., Elmaghraby, S.E.: Handbook of operational research models and applications. Van Nostrand Reinhold, New York (1978) 25. Park, K., Kim, S.: A capacity planning model of unreliable multimedia service. Journal of Systems and Software 63(1), 69–76 (2002) 26. Pearn, W.L., Ke, J.C., Chang, Y.C.: Sensitivity analysis of the optimal management policy for a queueing system with a removable and non-reliable server. Computers and Industrial Engineering 46(1), 87–99 (2004) 27. Perry, D., Posner, M.J.M.: A correlated M/G/1-type queue with randomized server repair and maintenance modes. Operations Research Letters 26(3), 137–148 (2000) 28. Reiman, M.I.: Open queueing networks in heavy traffic. Mathematics of Operations Research 9, 441–458 (1984)
256
S. Minkeviˇcius and G. Kulvietis
29. Sakalauskas, L.L., Minkeviˇcius, S.: On the law of the iterated logarithm in open queueing networks. European Journal of Operational Research 120, 632–640 (2000) 30. Sakalauskas, L.L., Minkeviˇcius, S.: Nonlinear phenomena in digital networks. II. Information Technology and Control (to appear, 2011) 31. Strassen, V.: An invariance principle for the law of the iterated logarithm. Zeitschrift f¨ ur Wahrscheinlichkeitstheorie und Verwandte Gebiete 3, 211–226 (1964) 32. Sztrik, J., Kim, C.S.: Markov-modulated finite-source queueing models in evaluation of computer and communication systems. Mathematical and Computer Modelling 38(7-9), 961–968 (2003) 33. Zubov, V.: Mathematical theory of reliability of queueing systems. Radio i Sviaz (1964) 34. Whitt, W.: Heavy traffic limit theorems for queues: a survey. In: Lecture Notes in Economics and Mathematical Systems, vol. 98, pp. 307–350. Springer, Heidelberg (1974) 35. Whitt, W.: On the heavy-traffic limit theorem for GI/G/∞. Advances in Applied Probability 14(1), 171–190 (1982)
Performability Modeling of Exceptions-Aware Systems in Multiformalism Tools Enrico Barbierato1, Marco Gribaudo2 , Mauro Iacono3 , and Stefano Marrone4 1
3
Dip. di Informatica, Universit` a di Torino, corso Svizzera, 185, 10129 Torino, Italy [email protected] 2 Dip. di Elettronica e Informazione, Politecnico di Milano, via Ponzio 34/5, 20133 Milano, Italy [email protected] Dip. di studi Europei e Mediterranei, Seconda Universit` a degli Studi di Napoli, Belvedere Reale di San Leucio, 81100 Caserta, Italy [email protected] 4 Dip. di Matematica, Seconda Universit` a degli Studi di Napoli, via Vivaldi 43, 81100 Caserta, Italy [email protected]
Abstract. Exceptions constitute a widely accepted fault tolerance mechanism, suitable to manage both hardware and software faults. In performability analysis it is a common practice to exploit software tools capable of describing a system using models expressed in various formalisms. Often these tools provide extensibility features that allow augmenting the primitives of a given formalism, but in most cases they lack of exception support. This paper aims at filling this gap, by introducing a general mechanism to add support for exception handling to most of the existing formalisms. The validity of the proposed method is supported by two modelling cases that benefit in clarity and economy.
1
Introduction
Fault tolerant systems need to cope with known and unknown events that can arise during execution. This requirement must be considered during the whole development cycle, to avoid mismatches and integration problems. A well accepted structuring mechanism for the management of abnormal situations is exception handling. Exceptions represent a valuable way to support the design process, because they provide a good abstraction for both hardware and software anomalies and are supported by most of the current programming languages. However evaluating the impact of exception handling on the performances of a system is not straightforward, especially when such features are introduced in the early phases of the development cycle. A performance model, capable of natively supporting exception based mechanisms, could offer a useful mean of aiding decisions and encourage the adoption of exceptions-aware design techniques. K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 257–272, 2011. c Springer-Verlag Berlin Heidelberg 2011
258
E. Barbierato et al.
Since the choice of a modeling language depends on a number of factors, from fitness to the task to user’s taste, exception handling support should be not included in a single modeling formalism, but should be made available at a higher level, e.g. at the level of formalism definitions, as a general feature that can be implemented in any suitable desired formalism. This paper presents a general way in which exceptions can be added to some of the most popular performance evaluation formalisms, and show how they can be implemented in an extensible modeling tool. Several extensible multiformalisms performance evaluation tools exists: two examples are Mobius [5] and SIMTHESys [14]. This paper presents a formal definition of exceptions in multiformalism performance models and shows how exceptions can be implemented in SIMTHESys. Note that the proposed approach is general enough to be implemented also in other tools with similar features. The rest of this paper is organized as follows: Section 2 briefly reviews related literature. In Section 3 a framework for the exception mechanisms (raising and catching) is defined and its implementation in the SIMTHESys tool is presented. Section 4 shows the effectiveness of the proposed approach in two cases, one of which is a complex agri-food tracking information system. Section 5 concludes the paper with final considerations and future research directions.
2
Related Works
The development of methodological and practical tools for supporting fault tolerant systems design is still an open issue, despite the importance of the research in this field [20].The problem is not new [6] but recently the relevance of the conceptual role of exceptions in all the phases of the design process has been analyzed from different perspectives: [21] introduces open issues in the field, [15] and [4] focus on unchecked exceptions management, [1] deals with requirements specification for exceptions, [19] explores relations between component based development and exception handling, [18] introduces exception management in N-version object oriented redundant software solutions and [16] considers exceptions in cooperative object oriented software development. However, exception handling in formal specification languages has received scant attention [3]. Some language extensions have been proposed for example for Petri Nets (PN): in [11] Self Adapting Recovery Nets are presented to cope with exceptions in business processes, with a technique that is based on dynamically modifying the structure of a PN whenever an exception has to be handled. Exception Petri Nets (EPN) [22], a colored variant of Procedural Petri Nets (PPN), allow procedure calls to be interrupted by exceptions. Nested Workflow Nets (NWN) are another variant of PN that models exception handling by creating or destroying Workflow Nets (WN) models that occur in an exception as the effect of a container WN describing the process. The MODEST language [3] natively supports exceptions for modeling stochastic timed systems, and constitutes an example of general modeling language with exception handling features. In [12] this feature is used to check Probabilistic Timed Automata. Other languages that naturally support exception handling
Performability Modeling of Exceptions-Aware Systems
259
are Esterel [2] (that is a synchronous programming language, here considered because it is also a formal specification language for timed systems) and EnhancedLOTOS [9], a formal specification language based on temporal ordering. In other contexts, a formal interpretation of Business Process Modeling Notation (BPMN) supporting exceptions has been given in [7]. In this case exceptions are defined in BPMN and described by PN. UML 2.0 [10] explicitly introduces exception handling. Many examples exist of exceptions enabled systems being modeled by non-specialized modeling languages: these examples will not be considered relevant for the purpose of this paper since they significantly depart from the goals of this work. 2.1
SIMTHESys Overview
SIMTHESys [14] is a methodology for the definition of performability modeling formalisms. In SIMTHESys a formalism is a formal description language, which is defined by its elements. An element is described by its properties and its behaviors: the former defines its state, the latter describes how it interacts with other elements by means of an algorithmic description. Every formalism also defines a special element, namely the formalism element, that represents a model written in that formalism. Formalisms are described by the Formalism Description Language (FDL). Formalisms are used to define performability models that can be composed and nested. Models are described by the Model Description Language (MDL) documents.
3
Exceptions in Multiformalism Models
Exception handling is a mechanism designed to treat the occurrence of exceptions, special conditions that change the normal flow of execution of process. In programming language the concept has been addressed in many papers, such as in [13]. In this paper, an exception is either synchronous, if it is explicitly and intentionally thrown, or asynchronous, if it is originated by undesired causes (synchrony). It can be generated by an event in a model or by a state of the model (origin). Finally, an exception can be deterministic, if it is thrown every time the triggering conditions are met, or stochastic, if it is thrown according to a probability distribution (stochasticity). Synchrony and origin allow the classification of possible causes of exceptions (some examples are presented in Table 1); stochasticity enables representing randomness in the occurrence of their effects. In our opinion, this exception model is general enough to be introduced in different modeling formalisms. 3.1
Exception-Enabled Models
This section presents a formal definition of the exception handling mechanism for multiformalism models. The following focuses only on the definition of synchronous, event based exceptions (either deterministic or stochastic). Section 3.2
260
E. Barbierato et al. Table 1. Examples of exceptions classification Synchrony synchronous asynchronous event explicitly thrown exception software error, I/O fault Origin state signal, transaction rollback system fault
and 4 explain how the other kind of exceptions can be defined using appropriate primitives of common multiformalism models. For the purposes of this work, a multiformalism model M can be considered as a tuple: M = (E, Σ) (1) where E = e1 , . . . , en is a set of n formalism primitives that defines the model: e. g. they may correspond to places, transitions and arcs in a PN, or queues, routers and connections in a Queueing Network (QN). Σ = {σ1 , . . . , σm } is a set of states that describes the possible evolutions of the model: e. g., for a PN model, states σj corresponds to combinations of possible markings of the places. Set Σ is derived from the model elements ei according to the semantics of the formalism: the actual procedure is outside the scope of this work. An exception-enabled model is a tuple: X = (E, Σ, C, T, Φ)
(2)
where M = (E, Σ) is the basic model to which exceptions are added. C = {c1 , . . . , ce } is called the catch set, and corresponds to a set of exception names (here called without loss of generality ck , with 1 ≤ k ≤ e). To simplify the presentation, we allow each model element to raise at most one type of exception. T : E → (C × (0, 1]) ∪ ∅ is the throw function that associates each element ei ∈ E with an exception name ck ∈ C. In particular, T (ei ) = ∅ if element ei does not throw any exception. Otherwise T (ei ) = (ck , p) if element ei can throw exception ck with probability p. If p = 1 then the exception is deterministic, otherwise it is stochastic with p < 1. Φ : C × Σ → Σ is the effect function that describes how exceptions are handled. Let us call σl ∈ Σ the current state of the model. If exception ck is thrown in state σl , then model moves immediately to state σl = Φ(ck , σl ). 3.2
State-Based Exceptions
According to the definition given in section 3.1, all elements of any formalism support the possibility of throwing an exception. While this capability is sufficient to manage event-triggered exceptions, state-triggered exceptions present a different degree of complexity due to the fact that the state of a model σl ∈ Σ generally depends on the properties of all its elements. For this reason, either support for state-based exceptions is introduced at the formalism level, or the relevant condition is obtained by combining the state elements using a suitable ancillary formalism (such as Fault Trees [8]).
Performability Modeling of Exceptions-Aware Systems
261
In the example provided in this paper, the second approach has been chosen because it offers several advantages: – it allows the handling of the same event-triggered exceptions by elements of different formalisms used in different submodels (they simply need to use the same exception name); – it allows the handling of state-triggered exceptions that depend on the composition of the state of different models; – it is general enough to model transparently complex, composed, multiformalism models, independently from the specific formalisms used; – it needs only minimal modification to existing formalisms; – state-triggered exceptions can be implemented by using event-triggered exceptions in a (sub)model that evaluates the desired condition over the state and enables a throw-capable element. Consequently, any desired suitable formalism can be used as ancillary formalism for the state retrieval task. 3.3
Implementation
A SIMTHESys model can be turned into an Exception-enabled model by adding specific elements, properties and behaviors to the corresponding formalism. The formalism must be extended to include a new type of element called Catch. A model must include a Catch object for each exception, which is for each ck ∈ C. Each element of the model ei ∈ E that can throw an exception must declare a throws (string constant) property and a throwsprob (double constant) property. The former defines the name ci ∈ C and the latter defines the probability p ∈ [0, 1] associated to the exception. In other words, this implements the definition T (ei ) = (ck , p) given in Section 3.1. If an element ei does not throw an exception (i.e. T (ei) = ∅) the modeler must set throwsprob to zero. Finally, the function Φ is implemented by adding one or more Effect arcs that connect the Catch element to the submodels affected by the execution of the exception. A string property associated to the arc describes the value computed by Φ. Catch objects, Effect arcs, throws and throwsprob properties must be handled in different ways depending on the particular formalisms being considered. In this paper we focus on Exponential Events formalisms, that include QN, PN, and FT. These formalisms make use of an InitEvent behavior which retrieves the active events and fire them after an exponentially distributed time. The actions triggered by an Effect arc are executed by a new behavior called RaiseException. It is run with a probability ThrowsProb every time the behavior representing the execution of the element is performed. For example, a queue element of a QN has a fire behavior that is invoked every time a job completes its service. If the queue element has a throwprob greater than zero, then after the job has been moved to the next station the behavior RaiseException is invoked to raise the associated exception. As introduced in section 3.2, state-based exceptions use ancillary formalisms to detect triggering conditions. In particular, elements of these formalisms must
262
E. Barbierato et al.
specify the name of the exception they can throw. Detection is performed by a new behavior called CheckException which looks for all the elements of the ancillary formalism that can trigger a state-based exception. If for any of these elements the condition is verified, the RaiseException is executed again to throw the corresponding exception. The CheckException behavior is triggered every time that a change in state has occurred, that is immediately after eventbased exceptions have been considered. For example, let us consider a PN formalisms that uses FT as ancillary statebased event detection. Each time a transition fires, the fire behavior checks if the new state in which the model has been brought to can trigger a state-base exception by looking in all the FTs for a TopEvent in a fault state. If a TopEvent in the fault state has an associated exception, it is triggered immediately.
4
Case Study
In this section we present initially a toy example that motivates the introduction of exceptions by comparing a simple Petri Net model with exceptions with an equivalent model designed without such features. The second case is a more complex example studying the performance of an agri-food tracking system. 4.1
A Motivating Example
Figure 1 shows a SPN model with exceptions of a simple server with breakdown. Jobs arrive at the server (place Buff) due to the firing of transition Arr. New arrivals are allowed to enter the system only if the buffer contains less than K jobs. This is ensured by the inhibitor arc of weight K that connects place Buff to
Ret
Repeat p=0.001 E1
Arr
E1 Ret=1
Serv K Buff Down
E2 p=1 E2
Buff=0; Ret=0;
Fail Restore
Up
Fig. 1. A simple server with breakdown model with exception
Performability Modeling of Exceptions-Aware Systems
263
Ret
ER
EB
2
MR
Repeat
SF 0.001 Sok
Arr Serv K Buff
Chk
0.999
Down
Fail Restore
Up
Fig. 2. The same model presented in Figure 1, but without resort to the use of exceptions
transition Arr. Jobs are serviced by the firing of transition Serv. Service might fail with a given probability (0.001 in this case). If a failure occurs, jobs might be re-inserted in the buffer. Resubmitted jobs are stored in place Ret, and reenter the system because of the Repeat transition. To reduce the possibility of buffer overflows, only one job at a time can wait to be inserted back in the queue. If place Ret is already marked when a failure occurs, the job is lost. Failure of the system is modeled by associating exception E1 to transition Serv, with probability 0.001. If the exception is raised, its Effect arc sets the marking of place Ret to 1 to indicate the presence of a job that has been resubmitted. Server failure is modeled by places Up and Down, and transitions Fail and Repair. If the system is down, no arrival or service can be operated (this is modeled by the two inhibitor arcs starting from place Down and terminating respectively on transitions Arr and Serv). If a failure occurs, both the buffer and the space for resubmitted jobs have to be cleared. This is implemented by associating exception E2 to the Down transition. When this exception is caught, the corresponding Effect arc sets the number of tokens of the places Buff and Ret to zero. Figure 2 shows the same model using a GSPN (Generalized Stochastic Petri Net) without exceptions. The absence of exceptions requires the introduction of 1 extra place, 5 immediate transitions and more than 10 arcs. In particular, the immediate transitions ER and EB are used to set to zero the marking of the places Buff and Repeat respectively. Places Chk and transitions SF and Sok are used to model the failure probability of the server. Immediate transition MR is required to limit the marking of place Ret to at most one token. Although both models share the same tangible state space, the GSPN model presented in Figure 2 has several additional number of vanishing markings that increase the time required to analyze the model.
264
4.2
E. Barbierato et al.
An Agri-Food Tracking System
Tracking detailed data about transformation and distribution in the agri-food sector is a crucial issue for the certification of the food supply chain. A certification-based approach to the problem, capable of ensuring that all relevant data about every ingredient of every production batch is assured, generates a huge rate of verification/registration requests in a national market, since everything must be under direct or indirect control of a state agency. The system needs to be distributed as sources of requests (producers, transformers or distributors) are spread all over the country, and can have different technologies available. To reduce the costs, this registry should be implementable by different service providers, competing in the service market, authorized and supervised by the government. The case of a federal government, regional registries would be needed since local laws could state different needs. In such a scenario tuning performance levels of registration servers (and of the whole verification/registration chain) is crucial, and the inherent distribution of such a system influences the service levels. The correctness of data transactions can be ensured by adopting some implementation of the well known two-phase commit (2PC) protocol. The use of a careful exception handling based design can improve the availability of the system. A performance evaluation formalism that also accounts for the impact of exceptions, can thus simplify the analysis of the considered case. 2PC: Short Description. The 2PC is a distributed transaction coordination protocol prescribing that one coordinator and several participants take part in transactions. The coordinator is connected to the user application and participants cannot communicate with each other unless it is via the coordinator. The protocol is initiated by a user commit request to the coordinator. During the first phase, the coordinator sends parallel prepare messages to the participants and waits for answers. Every participant that agrees with the commit operation sends the coordinator an agree message (after a proper logging) and enters a waiting state for the final commit/abort message; otherwise, if a participant does not agree, it sends a disagree message (after a proper logging) that causes the distributed transaction to abort. This action terminates the protocol on the participant side with a cancel action. The second phase starts when the coordinator receives all the answers. If all participants sent agree messages, the coordinator sends them commit messages (after a proper logging), and the transaction is confirmed to the user. If at least one of them sent a disagree, the coordinator sends all the participants an abort message, and informs the user. A participant receiving a commit or an abort commits or aborts (after a proper logging) the local part of the transaction and sends an acknowledgment message. This sequence of actions ensures that the distributed transaction is correctly executed even in case of failures, due to the logging capability. Two kinds of failures can happen: server and communication failures. On any server, a recovery process examines logs in case of exceptional situations, and uses logs to return either the server to a coherent state or to send messages to coordinator and participants. If an intermediate action is logged as prepared but not completed after a failure (a transaction that did not reach the final acknowledgment state in the log),
Performability Modeling of Exceptions-Aware Systems
265
Fig. 3. Sequence diagram of 2PC with agreement
the participant periodically tries to get the final result from the coordinator. If the coordinator notices a failure in one of the participants while waiting for agreement, it aborts the transaction. If a participant notices the failure of the coordinator before sending its agreement, it unilaterally aborts the transaction. The 2PC protocol message flow is described in two sequence diagrams (Fig. 3 and Fig. 4) respectively in the case of normal operation with agreement and without). More details can be found in [17].
Fig. 4. Sequence diagram of 2PC without agreement
System Architecture. The system under study is based on three main elements: the Official Registry (OR), the Company Registry (CR) and the Tracking
266
E. Barbierato et al.
Manager (TM). The OR is a public registry, by which a governmental authority guarantees integrity of tracking information to citizens and to commercial partners, and can be accessed by customers to verify the products and the food chain. The CR is a private registry that a food company or a third party uses to disclose punctual information about products and food chain while restricting overall information about them. A production/transformation site has one or more TMs that are in charge of executing the registration of food processing at both registries for every batch. This operation requires an interaction with the CR to retrieve/store information about internal product components, and with the OR to retrieve certified data about external product components and to save and certify data about the new product batch. The system operates with distributed transactions guaranteed by a 2PC protocol. Fig. 5 shows a model of the system using SPN extended with exception handling. This model considers a simplified scenario, in which a single OR and a single CR are used. Modeling OR and CR. The OR and the CR models have the same structure and represent participants of the 2PC protocol. Both models are composed of two parts (one implementing the 2PC, the other modeling failures of system components) plus the state-based exception condition (the ancillary formalism is FT). The SPN is composed of five submodels: one for the participant part of the 2PC protocol (the left part of the SPN) and four to model faults in the hardware components of the server (in the HD1, HD2, CPU, SUP/UPS prefixed elements). HD1, HD2 and CPU prefixed elements model the evolution between: a working and a fault condition (the two places) of the two disks; and the CPU subsystem, that break and get repaired with an exponential interarrival timed transitions. SUP/UPS prefixed elements model the power subsystem, composed of the power supply and the UPS: assuming that the UPS may fail only if the power supply has failed. The left part of the SPN models the two phases of the protocol (here simplified for clarity): the prepare place is marked when a prepare message is received, and enables the 1stphase exception enabled transition. This transition can either fire or it can throw a software-generated, event-based, stochastic timed exception. In the former case it marks the ok place (agree is sent) and the lock place (relevant data locked in the database), and it unmarks the available place. In the latter case the transition generates an exception with a given probability (a parameter of the model) to represent a local error. In case of no exception, when a commit /abort message is received (place commit/abort is marked) the 2ndphase transition removes the marking from commit/abort and lock places, marking the ack (acknowledgment is sent) and available (transaction committed, operations terminated) places. The failed place is marked by the exception handler, inhibiting 1stphase and 2ndphase transitions, and unmarked by the restore transition, that models repair time. Removing the marking from failed and enabling the two transitions represent the effect of operations resumed by log examination after a server crash. A server crash is a hardware-generated, state-based, deterministic, timed exception, that is modeled by the FT. The exception enabled event hardware failure throws an
Performability Modeling of Exceptions-Aware Systems
267
catchORhwf OR
catchORres
hardwarefailure E
INTERCONNECTION NETWORK sendprepare
prepare E
ok
HD1fail
1stphase
HD1ok failed
preparemsg
lock
recvok1
commit/ abort
recvok2
ack
CPUrep CPUko CPUok
disks HD1ko
power
available
E
CPUfail
HD1rep
restore
HD2fail HD2ok HD2ko
UPSfail SUPrep SUPok
2ndphase SUPko HD2rep
commitabortmsg
UPSok
SUPfail
UPSko
UPSrep CR
hardwarefailure E prepare
commitmsg E
ok
HD1fail
1stphase
HD1ok
recack1 failed recack2
CPUfail
HD1rep
restore
commit/ abort
power
available
E
lock
CPUrep CPUko CPUok
disks HD1ko
HD2fail HD2ok HD2ko
UPSfail SUPrep SUPok
2ndphase
ack
SUPko HD2rep catchCRres
recv/ack 2 recvOK 2
2 allOK
2
2
HD1fail
toOK
HD1ok
CPUrep CPUko CPUok
disks HD1ko
power
available
CPUfail
HD1rep
restore
phase
HD2fail HD2ok HD2ko
elaborate requests
UPSfail SUPrep SUPok
SUPko HD2rep
tUsers
TM
hardwarefailure E
toKO
E
UPSko
UPSrep
catchCRhwf
nOK
2 fail
UPSok
SUPfail
UM pUsers
SUPfail
UPSok
UPSko
UPSrep
catchTMres catchTMnOK catchTMhwf
Fig. 5. System model
exception when either the disks event or the power event happen, or if the place representing a fault in CPU is marked. Analogously, the disks event happens if both HD1 and HD2 show a marked fault place (we imagine that server disks are mirrored), and the power event happens if both the power supply and the UPS fail. Modeling TM. The TM represents the coordinator of the 2PC protocol. This model is also composed of two parts (one implementing the 2PC, the other
268
E. Barbierato et al.
modeling failures of system components) plus the state-based exception condition (the ancillary formalism is again FT). The SPN is composed of five submodels, four of which have the same structure and dynamics described for the OR and CR case. The left part of the SPN models the two phases of the protocol plus the interaction with a client that requests the transaction: the requests place is marked when a client wants to obtain a registration, and enables the elaborate transition. This transition marks the sendprepare place (prepare is sent) in the interconnection network, marks with a token the phase place (that tracks the phase in which the protocol is) and removes the marking from the available place. The recvOK place (representing the number of incoming agree messages) enables the allOK transition when marked with 2 tokens. This transition marks the phase place with 2 tokens and the commitabortmsg (commit or abort is sent) in the interconnection network. The toOK transition, which represents an agreement between the two participants, is enabled by 2 tokens in the Phase place and 2 tokens in the recvack place (representing the number of incoming acknowledge messages), and terminates the operations. The fail place has the same role of the failed place in the previous models. In a similar way the toKO transition models the disagreement of the two participants. Modeling the Interconnection Network. The dispatching of messages by the network is modeled by the interconnection network submodel. The sendprepare place is marked by the coordinator and it is unmarked by the preparemsg transition, that marks the prepare places in the participants SPN. The recvOK1 transition is enabled by the ok place of the first participant and marks the recvOK place in the second participant to represent the dispatch of an agree message; recvOK2 works in a similar manner. The commitmsg transition is enabled by the commitabortmsg place, and it marks the commit/abort places in the participants. The recack1 transition is enabled by the ack place of the first participant and it marks the recvack place of the coordinator to represent the dispatch of the acknowledge message:recack2 works in a similar way. The Global Model. The global model contains the presented submodels plus the catch elements that perform the recovery actions on them. The model has seven exceptions that can be grouped into three different sets, since most of them perform the same effect on different submodels. The catchORhwf, catchCRhwf and catchTMhwf represents the handling of the exception that are thrown by the FT of the corresponding submodel. Since this corresponds to a hardware failure, the effect of these exceptions is to set the marking of the corresponding failed place to one, and to empty all the places that represents the failure of the system components (HD1ok, HD1ko, HD2ok, HD2ko, SUok, SUko, UPSok, UPSko,CPUok, CPUko). Emptying these places prevents the exception to be rethrown until the system has been restored. The catchORres, catchCRres and catchTMres, are raised by the firing of the restore transition of the corresponding submodel. Their effect puts back a token into the places HD1ok, HD2ok, SUok, UPSok, and CPUok to restore the working state of the system.
Performability Modeling of Exceptions-Aware Systems
269
Table 2. Parameters of the agri-food model preparemsg, commitmsg 5.00000E − 01 recvok1, recvok2 5.00000E − 01 recvack1, recvack2 5.00000E − 01 firstPhase, secondPhase2 2.00000E + 01 CPU Fault 3.12500E − 09 Power Supply Fault∗ 2.29167E − 07 UPS Fault∗ 1.66670E − 06 HDD Fault∗ 8.33000E − 09 CPU Repair, Power Supply Repair 5.55000E − 04 UPS Repair 5.55000E − 04 HDD Repair∗ 2.77000E − 04 Restore∗ 9.25000E − 05 tUsers∗ 2.50000E − 01
Finally the catchTMnOK exception is raised by the 1stphase transition of both the OR and CR submodels. Its handler sets the marking of place nOK to one, to disable the toOK transition and to enable the toKO transition. This allows to select wether there has been an agreement (no exception fired) or a disagreement (handled by the catchTMnOK exception) between the CR and OR participants. Evaluation Results. The model has been analyzed using the parameter given in Table 2. Results were computed by the SIMTHESys analytical solving engine (formal analysis should be pursued where possible, in order to avoid uncomplete confidence levels typical of simulations). The rates have been chosen to match typical values collected from various literature. The parameters marked by a star, have been scaled to study the system performance under different failure and repair rates. In particular all the marked parameters have been multiplied by the same factor in the different experiments. Figure 6 shows the throughput of the system, considering both the requests that have an agreement (Correct req.), and the ones that generated an exception during the first phase (Malformed req.). The graph also shows the system response time (obtained using Little’s law): as can be seen, both the throughput and the response time tends to increase when the repair rates increases, despite the proportional increase in the failure rates. Figure 7 shows the failure probability (i.e. the probability that the system is blocked due to an hardware fault). In particular, it enables analysing the effect of the redundant hardware components by showing the probability that the system is working in a degraded state due to the failure of one of the two mirrored HD, or to the failure of the main power. As can be seen, the UPS is extremely effective, since it has a probability of being in use much higher than the system fault probability. The effectiveness of the redundant HD is not as noticeable, since the probability of having a broken disk is very close to the system fault probability.
270
E. Barbierato et al.
0,18 0,16 0,14 0,12 0,1 0,08 0,06 0,04 0,02 0
10,26 10,258 10,256 10,254 10,252
ResponseTime
Throughput
ThroughputandResponseTime
Malfromedreq. Correctreq.
10,25
Throughput
10,248
ResponseTime
FailureͲ repairrate
Fig. 6. System throughput and response time
Failureprobabilities Probability
1,00EͲ03 8,00EͲ04 6,00EͲ04 4,00EͲ04
WorkingwithUPS
2,00EͲ04
OnefailedHD
0,00E+00
TMfailure
FailureͲ repairRate Fig. 7. Failure probabilities of the TM component
5
Conclusions and Future Work
In this paper we have presented a formal way to include exception handling in generic performance modeling formalisms. Even if the examples presented in this paper were modelled with SPN, exception have been integrated in a multiformalism language that allow the description of models by combining GSPNs, FCQNs (Finite Capacity Queueing Networks) and FTs. The main advantages of the proposed methodology arises from the use of set instructions to handle an exception: this allows the removal from the model description large sets of primitives that are usually required to restore the system to an operating state.
Performability Modeling of Exceptions-Aware Systems
271
Future work includes the extension of the exception concept to allow contexts: in particular we will allow the possibility of grouping together submodels at various levels, and we will give the possibility of handling an exception at one level, or propagating it to higher levels of the model. This will enable the definition of models that are more modular, and more closely match some of the current most popular software architectures.
References 1. Bail, W.: An approach to defining requirements for exceptions. In: Cheraghchi, H.S., Lee, S.H., Romanovsky, A., Babu, C. S. (eds.) Advanced Topics in Exception Handling Techniques. LNCS, vol. 4119, pp. 243–254. Springer, Heidelberg (2006) 2. Berry, G.: Preemption and concurrency. Foundations of Software Technology and Theoretical Computer Science, 72–93 (1993) 3. Bohnenkamp, H., et al.: Modest: A compositional modeling formalism for hard and softly timed systems. IEEE Transactions on Software Engineering 32(10), 812–830 (2006) 4. Cheng, Y., Chen, C.T., Jwo, J.S.: Exception handling: an architecture model and utility support. In: 12th Asia-Pacific Software Engineering Conference (APSEC 2005), December 2005, p. 8 (2005) 5. Clark, G., et al.: The mobius modeling tool. In: Proceedings of the 9th international Workshop on Petri Nets and Performance Models (PNPM 2001), p. 241. IEEE Computer Society, Washington, DC, USA (2001) 6. Cristian, F.: Exception handling and software fault tolerance. IEEE Transactions on Computers 31, 531–540 (1982) 7. Dijkman, R.M., Dumas, M., Ouyang, C.: Semantics and analysis of business process models in bpmn. Information and Software Technology 50(12), 1281–1294 (2008), http://www.sciencedirect.com/science/article/B6V0B-4RY6WMV-1/2/ aa067258b1416b2969e509911a572d42 8. Ganesh, J., Dugan, J.: Automatic synthesis of dynamic fault trees from uml system models. In: International Symposium on Software Reliability Engineering(2002) 9. Garavel, H., Sighireanu, M.: On the introduction of exceptions in e-lotos. In: Proc. Conf. Formal Techniques for Networked and Distributed Systems (FORTE 1996), pp. 469–484 (1996) 10. Group, O.M.: Unified modeling language standards version 2.3, http://www.omg.org/spec/UML/2.3/ 11. Hamadi, R., Benatallah, B., Medjahed, B.: Self-adapting recovery nets for policydriven exception handling in business processes. Distrib. Parallel Databases 23, 1–44 (2008), http://portal.acm.org/citation.cfm?id=1340318.1340339 12. Hartmanns, A., Hermanns, H.: A modest approach to checking probabilistic timed automata. In: Proceedings of the 2009 Sixth International Conference on the Quantitative Evaluation of Systems (QEST 2009), pp. 187–196. IEEE Computer Society, Washington, DC, USA (2009), http://dx.doi.org/10.1109/QEST.2009.41 13. Hutton, G., Wright, J.: Compiling Exceptions Correctly. In: Kozen, D. (ed.) MPC 2004. LNCS, vol. 3125, pp. 211–227. Springer, Heidelberg (2004) 14. Iacono, M., Gribaudo, M.: Element based semantics in multi formalism performance models. In: MASCOTS, pp. 413–416. IEEE, Los Alamitos (2010)
272
E. Barbierato et al.
15. Jacobs, B., Muller, P., Piessens, F.: Sound reasoning about unchecked exceptions. In: Fifth IEEE International Conference on Software Engineering and Formal Methods( SEFM 2007), pp. 113–122 (September 2007) 16. de Lemos, R., Romanovsky, A.: Exception handling in a cooperative object-oriented approach. In: 2nd IEEE International Symposium on Object-Oriented Real-Time Distributed Computing (ISORC 1999), pp. 3–13 (1999) 17. Mohan, C., Lindsay, B.: Efficient commit protocols for the tree of processes model of distributed transactions. SIGOPS Oper. Syst. Rev. 19, 40–52 (1985), http://doi.acm.org/10.1145/850770.850772 18. Romanovsky, A.: An exception handling framework for n-version programming in object-oriented systems. In: Third IEEE International Symposium on ObjectOriented Real-Time Distributed Computing (ISORC 2000), pp. 226–233 (2000) 19. Romanovsky, A.: Exception handling in component-based system development. In: 25th Annual International Computer Software and Applications Conference (COMPSAC 2001), pp. 580–586 (2001) 20. Romanovsky, A.: A looming fault tolerance software crisis? SIGSOFT Softw. Eng. Notes 32, 1–4 (2007) 21. Romanovsky, A.: On exceptions, exception handling, requirements and software lifecycle. In: IEEE International Symposium on High-Assurance Systems Engineering, vol. 0, p. 301 (2007) 22. St¨ orrle, H.: Semantics of control-flow in uml 2.0 activities. In: Proceedings of IEEE Symposium on Visual Languages - Human Centric Computing, September 2004, pp. 235–242 (2004), http://dx.doi.org/10.1016/j.entcs.2004.08.046
The Impact of Input Error on the Scheduling of Task Graphs with Imprecise Computations in Heterogeneous Distributed Real-Time Systems Georgios L. Stavrinides and Helen D. Karatza Department of Informatics, Aristotle University of Thessaloniki, 54124 Thessaloniki, Greece {gstavrin,karatza}@csd.auth.gr
Abstract. In real-time systems, it is often more desirable for a job to produce an approximate, imprecise result by its deadline than to produce a precise result late. In this paper, we evaluate by simulation the performance of a heterogeneous distributed real-time system, where composite jobs with end-to-end deadlines are scheduled dynamically as they arrive in the system, utilizing imprecise computations. Each job is a directed acyclic graph of component tasks, where the output data of a task may be used as input by another task. In case the input data of a component task are imprecise, the processing time of the task is extended, in order to correct the error and produce a result of acceptable quality. The impact of input error on the system performance is investigated under various workloads and input error limits. Keywords: heterogeneous distributed real-time systems; task graphs; imprecise computations; input error; simulation.
1
Introduction
Due to the inherent need of many scientific and commercial applications for high quality results within strict timing constraints, distributed real-time systems have become increasingly important. They are employed in many aspects of our daily life, such as the control of nuclear power plants, financial markets, radar systems, telecommunication networks, intensive care monitoring and multimedia applications. In a real-time system, the jobs have deadlines that must be met. The correctness of the system does not depend only on the computational results, but also on the time at which the results are produced. In case a real-time job fails to meet its deadline, its results will be useless [1]. As a more cost-effective solution, many of today’s distributed real-time systems are heterogeneous. That is, they comprise different types of processors and networks. The major challenge in such a real-time heterogeneous environment, is the employment of an effective scheduling technique, in order to guarantee that every real-time job will produce high quality results within the imposed timing K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 273–287, 2011. c Springer-Verlag Berlin Heidelberg 2011
274
G.L. Stavrinides and H.D. Karatza
constraints. The scheduling algorithm is responsible for the allocation of jobs to processors and determines the order in which jobs will be executed. In distributed real-time systems, a job may be modelled as a directed acyclic graph (DAG or task graph), where the nodes represent the component tasks of the job and the edges represent the data dependencies between the tasks. Due to the precedence constraints among the component tasks, a task’s output is used as input by other tasks of the job. Each job has an end-to-end deadline that must be met. That is, the tasks of a job do not have any specific individual deadlines. In order for a task to start execution, all of its predecessor tasks must have been completed. A task with no predecessors is called an entry task, whereas a task with no successors is called an exit task. The immediate predecessors of a task are called parents of the particular task, while the immediate successors of a task are called children of the particular task. In order for a job to meet its deadline, i.e. to be guaranteed, all of its exit tasks must finish execution before the job’s deadline is reached. 1.1
Related Work
Based on the observation that in real-time systems it is often more desirable for a job to produce an approximate result by its deadline, than to produce a precise result late, Lin et al. proposed the imprecise computations technique [2]. According to this method, the execution of a real-time job is allowed to return intermediate (imprecise) results of poorer, but still acceptable quality, when the deadline of the job cannot be met. To achieve this, it is assumed that every component task in a job is monotone. That is, the quality of its results is improved as more time is spent to produce them. If a monotone task is fully completed, then its results are precise. It is often assumed that each monotone task of a job consists of a mandatory part, followed by an optional part [3]. In order for a task to produce an acceptable result, its mandatory part must be completed. The optional part refines the result produced by the mandatory part. Input error may affect the processing time of a task. Specifically, when the input data of a task are imprecise, the processing time of the task is extended, in order to correct the error and produce a result of acceptable quality [4]. A job is completed only when all of its tasks have completed at least their mandatory part, before the job’s deadline. Because of its key importance, scheduling in distributed real-time systems has been studied extensively in the literature [5], [6], [7]. Among the real-time scheduling policies that have been proposed, the Earliest Deadline First (EDF) algorithm is the most commonly used [8]. According to this technique, the job with the earliest deadline has the highest priority for scheduling. Heuristics for task graph scheduling have been proposed by many authors [9], [10]. The imprecise computations model has been studied and extended in the literature. In [11], Feng and Liu investigate the impact of input error on the static scheduling of a single, linear chain of tasks with an end-to-end deadline on a single processor. That is, each component task is considered to have only one parent task. On the other hand, in [12], Haweet et al. examine the static scheduling of a single task
The Impact of Input Error on the Scheduling of Task Graphs
275
graph with an end-to-end deadline on a single processor, but without taking into account the effects of input error on the execution time of the component tasks. 1.2
Our Approach
In this paper, we evaluate by simulation the performance of a heterogeneous distributed real-time system, where task graphs with end-to-end deadlines are scheduled dynamically as they arrive in the system, utilizing imprecise computations. The output data of a component task in a DAG may be used as input by more than one task, according to the data dependencies in the graph. In case the input data of a component task are imprecise, the processing time of the task is extended, in order to correct the error and produce a result of acceptable quality. The minimum result precision that is acceptable from a task is determined by a predefined result precision threshold. Furthermore, each component task has an input error limit, beyond of which the error in its input cannot be corrected and an acceptable result cannot be produced, no matter how long the task executes. The work presented in this paper differs from our previous work in [7] mainly in two aspects: the system model and the imprecise computations model. Specifically, in this paper we consider a heterogeneous environment instead of a homogeneous system. Moreover, in contrast to [7] where the parent tasks of a task can all omit their whole optional part, in this case study there is a limit on the allowed input error of a task. Therefore, the fraction of the optional part that each parent task can discard is restricted. Our foremost goal is to guarantee that all jobs that arrive in the system will meet their deadlines, providing results as precise as possible. The main focus of this paper is the investigation of the impact of input error on the system performance, under various workloads and input error limits. The remainder of this paper is organized as follows: Section 2 gives a description of the system, the workload and the imprecise computations model under study, Section 3 describes the on-line strategy used to schedule the task graphs that arrive in the system and Section 4 presents and analyzes the simulation results. Finally, Section 5 concludes this paper, providing suggestions for further research.
2
System and Workload Model
The target system is considered to be a heterogeneous distributed real-time system, consisting of a set P of q processors, each serving its own queue (memory). Each processor pi is characterized by an execution rate μi . Since the system is heterogeneous, the processor execution rates may vary. It is assumed that the processors in the system are fully connected, that the communication is contention-free and that a processor can receive and send data to other processors simultaneously, even when it is executing a task. Thus, no attention is paid to the routing strategies used for communication. N is the set of communication links in the system. The transfer rate between two processors pi and pj is
276
G.L. Stavrinides and H.D. Karatza
denoted by νij . The communication startup time of processor pi is taken into account in the value of the transfer rate νij . It is assumed that there is only one bidirectional communication link between any pair of processors. That is, νij = νji for any pair of processors pi and pj . As in the case of the processor execution rates, the data transfer rates between the processors may vary as well. Real-time jobs arrive in the system in a Poisson stream with rate λ. Each job that arrives in the system, is a directed acyclic graph G = (V, E), where V is the set of the a nodes of the graph and E is the set of the b directed edges between the nodes of the graph. The terms job, task graph and DAG are used interchangeably in this paper. The same applies for the terms task and node. Each node in a job represents a component task ni of the job, whereas a directed edge eij between two tasks ni and nj represents a message that must be transmitted from task ni to task nj . A job that arrives in the system may have one or more entry tasks and one or more exit tasks. A task can start execution only if it has received its required input data from all of its parent tasks. It is assumed that no additional data are required during a task’s execution and that the output data of a task are available only after the task’s completion. The execution of the tasks is assumed to be non-preemptive. Each node ni in a job has a weight wi which denotes its computational volume, i.e. the amount of computational operations needed to be executed. The computational cost of the task ni on a processor pj is given by Comp(ni , pj ) = wi /μj
(1)
where μj is the execution rate of processor pj . The average computational cost of the task ni over all of the processors in the system, is defined as pj ∈P Comp(ni , pj ) Comp(ni ) = (2) q where P is the set of processors and q is the number of processors in the system. Each edge eij between two tasks ni and nj has a weight cij which represents its communication volume, i.e. the amount of data needed to be transferred. The communication cost of the edge eij , which is incurred when transferring data from task ni to task nj , scheduled on processors pm and pn respectively, is defined as Comm ((ni , pm ), (nj , pn )) = cij /νmn (3) where νmn is the data transfer rate of the communication link between the processors pm and pn . When both tasks ni and nj are scheduled on the same processor, the communication cost of the edge eij becomes zero, since it is considered negligible when compared with interprocessor communication costs. The average communication cost of the edge eij over all of the communication links in the system, is given by Comm ((ni , pm ), (nj , pn )) Comm(eij ) = νmn ∈N (4) q(q − 1)/2
The Impact of Input Error on the Scheduling of Task Graphs
277
where N is the set of communication links and q(q − 1)/2 is the number of communication links in the system. Each component task ni of a job is assigned a priority value P Vi , which determines its priority for scheduling. The level Li of a task is the length of the longest path from the particular task to an exit task. The length of a path in the graph is the sum of the computational and communication costs of all of the tasks and edges, respectively, on the path. The level of task ni is given by Li = Comp(ni ) + max Comm(eij ) + Lj nj ∈Si
(5)
where Si is the set of the child tasks of task ni . The level of an exit task is equal to the task’s computational cost. The critical path length CP L of a job is the length of the longest path from an entry task to an exit task in the graph. The relative end-to-end deadline RD of a job is the interval between the job’s arrival time A and its absolute end-to-end deadline D (measured from time zero). That is, RD = D − A.
(6)
The communication to computation ratio CCR of a job is the ratio of its average communication cost to its average computational cost on the target system and is defined as eij ∈E
CCR =
ni ∈V
Comm(eij ) Comp(ni )
(7)
where V and E are the sets of the nodes and the edges of the job respectively. The value of CCR indicates whether the DAG is communication intensive, computationally intensive or moderate. An example task graph with 2 entry tasks and 4 exit tasks, is illustrated in Fig. 1. In this paper, it is assumed that there is a centralized scheduler that has full knowledge of the system. When a task graph arrives in the system, all of its tasks first enter a global waiting queue. In this queue, the unscheduled tasks of all the arrived jobs wait until they get ready to be scheduled. A task is ready to be scheduled when it has no predecessors (i.e. if it is an entry task) or when all of its parent tasks have finished execution. Thus, there are no data dependencies between tasks that are ready for scheduling. Once one or more tasks become ready to be scheduled, something which occurs after a job arrival or after a task completion, the scheduler is invoked. The scheduler allocates a processor to each ready task in the global waiting queue and determines the task’s position in the processor’s respective local waiting queue, as explained in Section 3. Clearly, a local waiting queue may contain tasks of different jobs. We assume that task migrations are not permitted between the processors and that software and hardware failures do not occur during the execution of a task.
278
G.L. Stavrinides and H.D. Karatza n1
n2
n3
n4
n5
n6
n7
n8
Fig. 1. An example task graph. The number in each node denotes the task’s average computational cost, whereas the number on each edge denotes the average communication cost of the edge. The level of task n2 is the highest in the graph and it is equal to L2 = 22. The DAG’s critical path length is equal to the highest entry task level in the graph, L2 . That is, CP L = 22. The edges on the critical path of the graph are shown with thick arrows.
2.1
Imprecise Computations Model
It is assumed that every job that arrives in the system consists of component tasks that are monotone. The computational volume wi of each component task ni consists of a mandatory part mpi , followed by an optional part opi . That is, wi = mpi + opi
(8)
where 0 < mpi < wi . A task is completed when at least its mandatory part has been processed. That is, a task can either complete its optional part entirely, partially or it may skip its whole optional part. When a task completes only a part of its optional part (or when its entire optional part is omitted), there is error in its results (output error ) and therefore its results are imprecise. If the particular task is not an exit task in the graph, then its output data will be used as input by its child tasks. Therefore, the child tasks of the particular task will have input error. The output error of a task ni is given by OEi =
opi − τi opi
(9)
where τi is the processed part of the optional part opi of the task. Thus, opi − τi gives the amount of discarded work of task ni . Since 0 ≤ τ ≤ opi , from (9), it follows that 0 ≤ OEi ≤ 1. The input error of a task ni is equal to the total output error of the task’s parent tasks. That is, IEi = OEj (10) nj ∈Zi
The Impact of Input Error on the Scheduling of Task Graphs
279
where Zi is the set of the parent tasks of task ni . If a task has input error, then there is an impact on its execution time. Specifically, we assume that its mandatory part is extended, since more computations are required by the task to correct the error and produce an acceptable result. However, it is assumed that the optional part of the task is not affected by its input error. For instance, in weather forecasting systems, there is a satellite data collection task n1 and a data visualization task n2 , which produces the satellite images. Assume that the processing time of the mandatory part of task n2 is the time required by the task to process and visualize the data provided by task n1 , in order to produce an image of an acceptable standard. The processing time of the optional part of task n2 is the time required by the task to enhance the quality of the image produced by its mandatory part. If the data provided to task n2 by task n1 are imprecise (e.g. due to noise during the satellite transmission), then task n2 will require more time to process the data and produce an image of the acceptable quality. That is, the mandatory part of task n2 is extended due to input error. The optional part of task n2 remains the same. It is assumed that the size of the data produced by a task – and thus the communication cost of the task’s outgoing messages to its child tasks – is independent of the precision of the data. The mandatory part extension of a task ni is given by mpei = mpi · IEi
(11)
where mpi is the mandatory part and IEi is the input error of the task ni respectively. A task ni cannot always eliminate its input error and produce a precise result by just extending its mandatory part. That can only happen when its input error IEi is less than or equal to its input error limit IELi (0 ≤ IEi ≤ IELi ). Otherwise, if the task’s input error exceeds the input error limit of the task, then the task can never give an acceptable result, no matter how long it executes. The minimum result precision that is acceptable from a task is determined by a predefined result precision threshold which is fixed for all tasks. A task ni provides results of the minimum quality when only its mandatory part mpi is processed and its whole optional part opi is omitted. The relation between the result precision threshold RP T and the mandatory part mpi of a task is given by (12) mpi = RP T · wi where wi is the computational volume of task ni . Consequently, the result precision of a task ni is defined as RPi = RP T + (1 − RP T )(1 − OEi )
(13)
where OEi is the output error of the task. The result precision of every completed task is RP T ≤ RP ≤ 1. When a task ni completes both its mandatory part mpi and its optional part opi , it produces precise results (i.e. its output error is OEi = 0) and therefore its result precision is RPi = 1. On the other hand, if a task completes only its mandatory part mpi , then it produces imprecise results
280
G.L. Stavrinides and H.D. Karatza
of the minimum acceptable quality (i.e. its output error is OEi = 1) and thus its result precision is RPi = RP Ti . The result precision of a job ultimately depends on the precision of the results of its exit tasks only. Therefore, the result precision RPk of a job Gk is considered to be equal to the average result precision of Gk ’s exit tasks. A task ni which is in service on a processor pm can be aborted prematurely, if the following conditions hold: 1. 2. 3. 4.
There is a task waiting for service at the head of pm ’s local waiting queue. Task ni is not an exit task of its job. Task ni has completed its mandatory part. The potential output error of task ni (that is, its output error in case it is aborted at the current time instant) is less than or equal to the minimum difference between the input error limit and the current input error of its child tasks. That is, OEi ≤ min {IELj − IEj } nj ∈Si
(14)
where OEi and Si are the potential output error and the set of child tasks of task ni respectively, whereas IELj and IEj are the input error limit and the current input error of a child task nj in Si , respectively. 5. The processing time saved by skipping the unprocessed part of the optional part of task ni is greater than or equal to the total average additional processing time imposed to ni ’s child tasks, due to its potential output error. That is, pn ∈P (OEi · mpj )/μn (opi − τi )/μm ≥ (15) q nj ∈Si
where opi , τi , Si and OEi are the optional part, the processed part of the optional part, the set of child tasks and the potential output error of the task in service ni , μm is the execution rate of the processor pm of the task in service, mpj is the mandatory part of a child task nj in Si , P is the set of processors in the system, q is the number of processors in the system and μn is the execution rate of a processor pn in P . Note that for each child task nj of the task in service ni , the average of its imposed additional processing time is considered. This is due to the fact that all of the child tasks of the task in service are still unscheduled and thus not assigned to a particular processor. A job is completed if all of its tasks are completed before the job’s deadline. In the case where an uncompleted job’s deadline is reached, then the job is not always considered lost. Specifically, if the job’s last tasks remaining to be completed are exit tasks and all of them have completed their mandatory part at the time of their job’s deadline, then the tasks, and thus the job, are considered completed. In any other case the job is lost.
The Impact of Input Error on the Scheduling of Task Graphs
3
281
Scheduling Strategy
The ready tasks in the global waiting queue are scheduled according to a list scheduling heuristic, which consists of a task selection phase and a processor selection phase, as described below. 3.1
Task Selection Phase
Each ready task is assigned a priority value according to the Earliest Deadline First (EDF) policy. That is, the priority value P Vi of a component task ni is considered to be equal to the absolute deadline D of its job (P Vi = D). Subsequently, the tasks are arranged in a list according to their assigned priorities. The task with the highest priority for scheduling is the one with the smallest priority value (i.e. the one with the earliest end-to-end deadline). If two or more tasks have the same priority value, then they are arranged in descending order of average computational costs. 3.2
Processor Selection Phase
Once a ready task is selected by the scheduler, it is allocated to the processor which can provide it with the earliest estimated start time EST (ties are broken randomly). The EST of a ready task ni on a processor pj is given by the expression EST (ni , pj ) = max {Tdata (ni , pj ), Tidle (ni , pj )} (16) where Tdata (ni , pj ) is the time interval after which all input data of task ni will be available on processor pj , whereas Tidle (ni , pj ) is the time interval after which the task ni will reach the head of pj ’s local waiting queue and pj will be idle and thus able to execute task ni . Tdata (ni , pj ) is equal to the largest communication cost between ni and its parent tasks. If a parent task of ni was executed on processor pj , we consider the respective communication cost to be equal to zero. In order to calculate Tidle (ni , pj ), we first find the potential position of the ready task ni on processor pj . That is, we find the position at which the ready task ni would be placed in the local waiting queue of processor pj , if it was actually assigned to that particular processor. Consequently, if task ni would be placed at the head of pj ’s queue and pj is busy executing another task which cannot be aborted, then Tidle (ni , pj ) is equal to the remaining execution time of the task in service. Otherwise, if pj is idle, then Tidle (ni , pj ) = 0. On the other hand, if ni would be placed at any other position in pj ’s queue, so that it would be preceded by a task nr , then Tidle (ni , pj ) = EST (nr , pj ) + Comp(nr , pj )
(17)
where EST (nr , pj ) and Comp(nr , pj ) are the estimated start time and the computational cost of the preceding task nr respectively. Once a ready task is scheduled to the selected processor, it may be required to wait in order to receive data
282
G.L. Stavrinides and H.D. Karatza
from other processors. Otherwise, the task is ready for processing and therefore it waits for its turn to start execution. It is assumed that the scheduling overhead is negligible.
4 4.1
Performance Evaluation Performance Parameters
For the performance evaluation of the system in the framework described in the previous sections, we conducted a series of simulation runs using the independent replication method. Due to the complexity of the system and of the workload model under study, we implemented our own discrete-event simulation program in C++, tailored to the requirements of the specific case study. The effects of input error on the performance of the system are investigated using the overall system performance metric, which takes into account not only the number of jobs that meet their deadlines (that is, the number of guaranteed jobs), but also the precision of the results of the guaranteed jobs. The overall system performance metric is given by Gk ∈C RPk OSP = (18) T N JA where C is the set of all of the guaranteed (completed) jobs, RPk is the result precision of a completed job Gk in C and T N JA is the total number of job arrivals. In the best case, all of the jobs that arrive in the system meet their deadlines and provide precise results and therefore, OSP = 1. In the worst case, all of the jobs that arrive in the system are lost and therefore, OSP = 0. Hence, the overall system performance OSP is always in the range [0, 1]. 4.2
Task Graph Generation
In our simulation experiments, the jobs (DAGs) were generated randomly, using our own task graph generator, as explained in [7]. Each generated DAG is a weakly connected graph. That is, there is a path between any pair of tasks in the graph, without taking into account the direction of the edges. In the case where a graph has more than one task, there is at least one entry and one exit task in the graph. In order to generate a DAG, we first determine the number of tasks a in the graph, which is uniformly distributed in the range [1, M AX], where M AX is the maximum number of tasks allowed in a graph. Subsequently, if a > 1, we determine the number of entry tasks aentry in the graph, which is uniformly distributed in the range [1, a − 1]. We then create the first entry task. Subsequently, the a − aentry non-entry tasks (which may be exit tasks - this is determined when the construction of the task graph is finally completed) of the graph are created, one by one. At each step, we create a task and we connect it to its parent tasks, that are randomly chosen from the already created tasks. The number of a task’s parent tasks is uniformly distributed in the range [1, f ],
The Impact of Input Error on the Scheduling of Task Graphs
283
where f is the number of tasks that have already been created. After creating the a − aentry non-entry tasks, we continue constructing the DAG, by creating the rest aentry − 1 entry tasks, one by one. At each step, we create a task and we connect it to its child tasks, that are randomly chosen from the non-entry tasks already created. The number of a task’s child tasks is uniformly distributed in the range [1, a − aentry ]. The uniform distribution is used for the generation of the task graphs, so that all DAG structures are equally probable. 4.3
Simulation Input Parameters
For our experiments, we used the simulation input parameters shown in Table 1. The heterogeneity factor HF denotes the difference in the speeds of the processors, as well as in the transfer rates of the communication links in the system. The heterogeneity factor is in the range 0 ≤ HF ≤ 1. In the case where HF = 0, the system is homogeneous. The execution rate of each processor in the system is uniformly distributed in the range [μ · (1 − HF/2) , μ · (1 + HF/2)], where μ is the mean execution rate of the processors. The data transfer rate of each communication link in the system is uniformly distributed in the range [ν · (1 − HF/2) , ν · (1 + HF/2)], where ν is the mean data transfer rate of the communication links. The computational volume of a task in a graph is exponential with mean w, whereas the communication volume of an edge is exponential with mean c. For a given CCR and a mean computational volume w, the mean communication volume c can be calculated from (7). We investigated the impact of input error on the performance of the system with respect to the arrival rate λ of the jobs, for different communication to computation ratios and input error limits. We ran 30 replications of the simulation for each set of input parameters, with different seeds of random numbers and for 104 completed (that is, guaranteed) jobs in each replication. For every mean value, a 95% confidence interval was evaluated. The half-widths of all confidence intervals are less than 5% of their respective mean values. The simulation results are analyzed below. 4.4
Simulation Results and Discussion
The simulation results are shown in Figures 2, 3 and 4. It can be observed that for all values of the input error limit IEL and all types of DAGs, the overall system performance OSP decreases with the increase of the arrival rate λ. This is due to the heavier workload, which causes higher waiting times for the tasks in the queues. Therefore, more jobs miss their deadline. Moreover, the system exhibits the best performance when the DAGs are moderate (i.e. when CCR = 1), poorer performance when the DAGs are communication intensive (i.e. when CCR = 10) and the worst performance when the DAGs are computationally intensive (i.e. when CCR = 0.1). This suggests that, in our case study, the computational cost has a greater negative impact on the system performance than the communication cost of the jobs.
284
G.L. Stavrinides and H.D. Karatza Table 1. Simulation Input Parameters
Parameter description Number of processors in the system Mean execution rate of processors Mean data trans. rate of comm. links Heterogeneity factor Maximum number of tasks in a job Number of tasks in each job Arrival rate of the jobs Relative deadline of each job CCR of the jobs Result precision threshold Input error limit Mean comp. volume of the tasks
Value q = 64 μ=1 ν=1 HF = 0.5 M AX = 64 a ∼ U [1, M AX] λ = {0.1, 0.2, 0.3, 0.4} RD ∼ U [CP L, 2CP L] CCR = {0.1, 1, 10} RP T = 0.75 IEL = {0, 1.5 · 10200 } and IEL ∼ U [1, u] w = 10 (CCR = 0.1) and w = 1 (CCR = {1, 10})
In order to examine the impact of input error on the overall system performance OSP , we conducted three sets of experiments. In the first set of experiments, the input error limit of each task is considered to be equal to zero, i.e. IEL = 0 (Fig. 2). That is, no input error is allowed for any task, meaning that all parent tasks have to complete their whole optional part. In this case, only an exit task may discard a fraction of its optional part. As explained earlier, this may occur only when an exit task is the last task of its job remaining to be completed and the deadline of its job is reached. In the second set of experiments, the input error limit of each task is considered to be equal to a very large value (IEL = 1.5 · 10200 ) and thus considered infinite (Fig. 3). Therefore, all parent tasks can omit their whole optional part (provided that all the other conditions defined in subsection 2.1 are satisfied), as there is no limitation on the input error of their child tasks. In this case, it is assumed that by extending further the mandatory part of a child task, its input error can be corrected. In the third set of experiments, the input error limit is considered to be equal to a non-zero, finite value which may be different for each task in a job (Fig. 4). More specifically, we consider that the input error limit IEL of each task is uniformly distributed in the range [1, u], where u is the number of parent tasks of the particular task. That is, in this case there is an upper limit on the input error allowed for each task, restricting the fraction of the optional part that each parent task can discard. The simulation results show that when the input error limit is non-zero and finite for each task, we have the best overall system performance. When the input error limit is equal to zero for all tasks, the system exhibits poorer performance, whereas when the input error limit is considered infinite, we have the worst overall system performance. This may be explained by the fact that in condition (15), which must hold in order to skip the unprocessed part of the optional part of a parent task, we consider the average additional execution time imposed to each child task (over all processors in the system), which may be less than the actual
The Impact of Input Error on the Scheduling of Task Graphs
285
Fig. 2. OSP vs. arrival rate λ, for task input error limit IEL = 0
Fig. 3. OSP vs. arrival rate λ, for task input error limit IEL = 1.5 · 10200
additional execution time of each child task (the actual imposed processing time of the child tasks cannot be calculated at the time instant the condition (15) is evaluated, since the child tasks are not yet allocated to processors). When the input error limit is considered infinite, more parent tasks omit their optional part and thus more child tasks extend their mandatory part. Therefore, there is a higher probability that the actual additional execution time of the child tasks is greater than their calculated average additional execution time and thus greater than the time saved by discarding the optional part of the parent tasks. This may result in delays, not only for the tasks of the particular job, but also for the
286
G.L. Stavrinides and H.D. Karatza
Fig. 4. OSP vs. arrival rate λ, for task input error limit IEL ∼ U [1, u], where u is the number of parent tasks of each task
tasks of other jobs in the system. Hence, more jobs may miss their deadline and the jobs that complete execution may have lower result precision. These factors lead to a poorer overall system performance. On the other hand, when the input error limit is zero, parent tasks are not allowed to omit their optional part and thus no additional processing time is imposed to their child tasks. Therefore, the system performance is better compared to the case where the input error limit is considered infinite. Nevertheless, in the case where the input error limit is zero, processing time is never saved by skipping optional parts. Consequently, when the input error limit is non-zero and finite, it provides a moderate solution compared to the other two extreme cases and ultimately leads to a better system performance. In this case, parent tasks are allowed to discard their optional part, but in a restricted manner, so that there is a higher probability that the processing time saved is greater than the actual additional time imposed to the child tasks.
5
Conclusions and Future Work
In this paper, we investigated the impact of input error on the performance of a heterogeneous distributed real-time system, where task graphs with end-toend deadlines are scheduled dynamically as they arrive in the system, utilizing imprecise computations. The performance of the system was evaluated by simulation, under various workloads and input error limits. The simulation results suggest that, in our case study, if input error is allowed in a limited way, it can lead to a better overall system performance, compared to the cases where the input error of a task is unlimited or equal to zero.
The Impact of Input Error on the Scheduling of Task Graphs
287
However, we could investigate the case where the structure of the task graphs in the system exhibits higher variability. Moreover, in the condition examined in order to skip the unprocessed part of the optional part of a parent task, the worst-case additional processing time imposed to the child tasks could be considered, instead of the average. Therefore, further research is required in order to address these issues.
References 1. Buttazzo, G.C.: Hard Real-Time Computing Systems: Predictable Scheduling Algorithms and Applications, 2nd edn. Springer, New York (2004) 2. Lin, K.J., Natarajan, S., Liu, J.W.S.: Imprecise Results: Utilizing Partial Computations in Real-Time Systems. In: 8th IEEE Real-Time Systems Symposium, pp. 210–217 (1987) 3. Han, C.C., Shin, K.G., Wu, J.: A Fault-Tolerant Scheduling Algorithm for RealTime Periodic Tasks with Possible Software Faults. IEEE Trans. Comp. 52(3), 362–372 (2003) 4. Hull, D., Shankar, A., Nahrstedt, K., Liu, J.W.S.: An End-to-End QoS Model and Management Architecture. In: IEEE Workshop on Middleware for Distributed Real-time Systems and Services, pp. 82–89 (1997) 5. Karatza, H.D.: Performance of Gang Scheduling Policies in the Presence of Critical Sporadic Jobs in Distributed Systems. In: 2007 International Symposium on Performance Evaluation of Computer and Telecommunication Systems, pp. 547–554 (2007) 6. Sha, L., Abdelzaher, T., Arzen, K.E., Cervin, A., Baker, T., Burns, A., Buttazzo, G., Caccamo, M., Lehoczky, J., Mok, A.K.: Real Time Scheduling Theory: A Historical Perspective. Real-Time Systems 28(2–3), 101–155 (2004) 7. Stavrinides, G.L., Karatza, H.D.: Scheduling Multiple Task Graphs with End-toEnd Deadlines in Distributed Real-Time Systems Utilizing Imprecise Computations. Journal of Systems and Software 83(6), 1004–1014 (2010) 8. Liu, C.L., Layland, J.W.: Scheduling Algorithms For Multiprogramming in a Hard Real-Time Environment. Journal of the ACM 20(1), 46–61 (1973) 9. Topcuoglu, H., Hariri, S., Wu, M.Y.: Performance-Effective and Low-Complexity Task Scheduling for Heterogeneous Computing. IEEE Trans. Par. Distr. Syst. 13(3), 260–274 (2002) 10. Cheng, B.C., Stoyenko, A.D., Marlowe, T.J., Baruah, S.K.: LSTF: A New Scheduling Policy for Complex Real-Time Tasks in Multiple Processor Systems. Automatica 33(5), 921–926 (1997) 11. Feng, W.C., Liu, J.W.S.: Algorithms for Scheduling Real-Time Tasks with Input Error and End-to-End Deadlines. IEEE Trans. Soft. Eng. 23(2), 93–106 (1997) 12. Haweet, W.A.E., Meligy, H.H.E., Salam, I.A.E.: Imprecise Computation Technique to Schedule AND/OR Tasks with Global End-to-End Deadline in Distributed RealTime Systems. In: SICE 2003 Annual Conference, pp. 663–668 (2003)
Simple Correlated Flow and Its Application Alexander Andronov and Jelena Revzina Transport and Telecommunication Institute, Lomonosova str. 1, LV-1019, Riga, Latvia [email protected], [email protected] http://www.springer.com/lncs
Abstract. A correlated flow of arrivals is considered in a case, where interarrival times {Xn } correspond to the Markov process with the continuous state space R+ = (0, ∞). The conditional probability density function of Xn+1 given {Xn = z} is determined by means of q(x|z) = q(x|Xn = z) =
k
pi (z)hi (x),
z, x ∈ R+ ,
i=1
where {p1 (z), ..., pk (z)} is a probability distribution, p1 (z)+...+pk (z) = 1 for all z ∈ R+ ; {h1 (x), ..., hk (x)} is a family of probability density functions on R+ . This flow is investigated with respect to stationary case. One is considered as the Semi-Markov process J(t) on the state set {1, ..., k}. Main characteristics are considered: stationary distribution of J and interarrival times X, correlation and Kendall tau (τ ) for adjacent intervals, and so on. Further one is considered a Markovian system on which the described flow arrives. Numerical results show that the dependence between interarrival times of the flow exercises greatly influences the efficiency characteristics of considered systems. Keywords: Semi-Markov process, stationary distribution, queueing system.
1
Introduction
An important element of a probabilistic model is a description of considered random variable distributions. It is supposed usually that all random variables are independent. But numerous statistical data prove the opposite. For example, it has been experimentally stated that characteristics of the Internet flows are dependent ones [6, 8, 12]. Similarly, flows of the insurance claims for damages
The article is written with the financial assistance of European Social Fund. Project Nr. 2009/0159/1DP/1.1.2.1.2/09/IPIA/VIAA/006 (The Support in Realisation of the Doctoral Programme ”Telematics and Logistics” of the Transport and Telecommunication Institute). **The authors thank the anonymous referees for helpful comments and suggestions.
K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 288–300, 2011. c Springer-Verlag Berlin Heidelberg 2011
Simple Correlated Flow and Its Application
289
have dependent structure [2-5, 13]. In the first case, a correlation between interarrivals of the claims is described by so called Markov-Additive Processes of Arrivals [11], for example for Batch Markovian Arrival Process, where a claim circulates in some Markovian network before an arrival. In the second case, copulas are used usually for a description of the dependence [1, 3, 5, 10]. In our paper we wish to use a natural and direct way for a description of the dependence between continuous random variables X0 , X1 , .... We suppose that the last correspond to a Markov process with a uncountable state space (0, ∞) where the initial variable X0 has the probability density function f0 (x) and the distribution of any another variable Xn+1 , n = 0, 1, ..., depends on Xn only. Let each random variable Xn+1 have one probability density function from the family {h1 (x), ..., hk (x)}. The probability to have the i-th density hi (x) is a function pi (z) of fixed value Xn = z, p1 (z) + p2 (z) + ... + pk (z) = 1, ∀z ∈ (0, ∞).
(1)
Therefore the conditional density probability function for Xn+1 is determined as k pi (z)hi (x), z, x > 0. (2) q(x|z) = q(x|Xn = z) = i=1
A motivation of the suggested model consideration is the following. The current value z of Xn directly describes the distribution q(x|z) for the following value x of Xn+1 . It allows us to fix the arbitrary stochastic dependence between adjacent random variables. For example, these random variables may be positively correlated for one set of z and negatively correlated for other set. Moreover explicit formulas are got for a calculation such dependence indices as a covariance and Kendall-τ . A practician, having corresponding empirical indices, can realise those in the model. The decomposition of the Markov process kernel by sum (2) has another advantage. One allows presenting a stationary distribution of the interval length in the closed form. Furthermore, such well known modeling approaches as Markovian Arrival or Phase-type processes are based on the exponential distribution and can not describe the considered flow. The sequence X0 , X1 , ... can be used for a description of the customer flow, the service times in the queueing systems and so on. We apply one for the first case. In the next section standard analysis of such a flow will be performed. A special case will be considered in the Section 3. As an example a single server queueing system with the considered flow is investigated in the Section 5. It allows us to investigate the influence of flow’s correlation on performance characteristics of this queueing system. Concluding remarks ends the paper.
2
Flow Analysis
In fact the sequence X0 , X1 , ... can be considered as partial case of Markov renewal process or Semi-Markov one [7, 9, 11]. For that we use the following interpretation of the relation (2). The event {Xn+1 = x} given the event {Xn =
290
A. Andronov and J. Revzina
z} occurs as follows. At first the distribution hi is chosen with the probability pi (z). Further the value x for Xn+1 is chosen with respect to the density hi (x). In this case we set Ln+1 = i and call it as the label of the random variable Xn+1 (Pacheco, Tang and Prabhu [11] name one the Markov component). The distribution of the first label L1 is calculated as ∞ P {L1 = i} =
pi (x)f0 (x)dx,
i = 1, ..., k.
(3)
0
The sequence of labels L1 , L2 , ... forms an embedded Markov chain with finite state space {1, 2, ..., k} and the transition probabilities per a step ∞ Pi,j = P {Ln+1 = j|Ln = i} =
hi (x)pj (x)dx.
(4)
0
n Xi , n = 1, 2, ... is a Markov renewal process [11]. Obviously, the pair Ln , i=0
Additionally to the transition probability matrix P = {Pi ,j }, the last is defined usually by distribution function Fi,j (x) = P {Xn ≤ x|Ln = i, Ln+1 = j}
(5)
of the holding time in state i ∈ {1, 2, ..., k} till a transition in the state j. In our case x −1 Fi,j (x) = Pi,j hi (z)pj (z)dz = 0
∞ hi (z)pj (z)dz
=
−1
x
hi (z)pj (z)dz, x ≥ 0.
(6)
0
0
Therefore a considered process is a special case of semi-Markov one with the special structure of the transition probabilities (5) and the distribution of holding time (6). It allows us to use known results of the theory. By that the final results will have more simple form than the ones for the total case of semi-Markov processes. Further we assume that the matrix P corresponds to a finite ergodic Markov chain. Then this Markov chain has the unique stationary (limiting) distribution π = (π1 , ..., πk )T that can be found as the unique positive solution of the equation π T = πT P,
(7)
satisfied the normalization condition k i=1
πi = 1.
(8)
Simple Correlated Flow and Its Application
291
Now it is possible to calculate the stationary probability density function of X = X∞ : k
f (x) =
d d F (x) = P {X ≤ x} = πi hi (x), dx dx i=1
x ≥ 0.
(9)
Mean value and variance of X are k
μ = E(X) =
πi μi , σ 2 = D(X) =
i=1
where
∞
μi = 0
k
πi (σi2 + μ2i ) − μ2 ,
(10)
i=1
xhi (x)dx, σi2 =
∞
(x − μi )2 hi (x)dx.
(11)
0
Now our aim is calculating covariance and Kendall-τ [10] for lengths Z and X of two adjacent intervals for the stationary distribution (9) and the transition probability density (2). Corresponding bivariate density function f (z, x) =
=
k
∂2 F (z, x) = f (z)q(x|z) = ∂z∂x
πi hi (z)
i=1
k
pj (z)hj (x),
z, x > 0.
(12)
j=1
Then ∞ ∞ E(ZX) =
∞ ∞ zxf (z, x)dxdz =
0
zx
0
0
k
πi hi (z)
i=1
0
k
pj (z)hj (x)dxdz =
j=1
∞ ∞ k k k k = z πi hi (z) pj (z)μj dz = πi μj zhi (z)pj (z)dz. 0
i=1
j=1
Therefore Cov(Z, X) =
i=1 k
πi
k
i=1
j=1
(13)
0
∞ zhi (z)pj (z)dz − μ2 .
μj
j=1
(14)
0
In order to calculate the Kendall-τ we consider two independent pair (Z, X) and (Z , X ) with distribution (12). Then
∞ ∞
P {Z ≤ Z , X ≤ X } =
F (z, x)f (z, x)dxdz = 0
=
∞ ∞ k 0
0
i=1
πi
k z j=1 0
0
x hi (w)pj (w)dw
hj (v)dv 0
k l=1
πl hl (z)
k m=1
pm (z)hm (x)dxdz =
292
=
A. Andronov and J. Revzina k k ∞ x m=1 j=1 0
∞ hj (v)dvhm (x)dx
0
pm (z)
k
0
πi
i=1
k
z πl hl (z)
l=1
hi (w)pj (w)dwdz. 0
(15) Now the Kendall-τ can be calculated [10] as τ = 4P {Z ≤ Z , Y ≤ Y } − 1.
3
(16)
Flow Analysis: Special Case
Our numerical example of the considered flow is the following: k = 2, h1 (x) =
λ λ e−λx , h2 (x) = e−λ(a−x) , 1 − exp(−λa) 1 − exp(−λa)
0 ≤ x ≤ a. (17)
For probability distribution {pi (z)} we have two variants: p1 (z) =
z z , p2 (z) = 1 − , 0 ≤ z ≤ a, a a
(18)
and
z z = 1 − p1 (z), p˜2 (z) = = 1 − p2 (z), 0 ≤ z ≤ a. (19) a a Let us comment the considered model (17) - (19). There is a mixture of two densities. The first density h1 (x) gives a value x of the random variable, which is closer to zero. The second density h2 (x) gives a value x of the random variable, which is closer to one. Let z be the value of the length of the previous interval. If z is small then probability p1 (z) = az , that the first density has been chosen, is small. Therefore the case (18) gives a negative correlation for two adjacent intervals. On the contrary, the case (19) gives a positive correlation. Firstly we consider the case (18). Calculations with respect to formula (4) give: p˜1 (z) = 1 −
a P1,1 = 0
λ x 1 e−λx dx = 1 − e−λa − λae−λa , 1 − exp(−λa) a λa(1 − exp(−λa)) P1,2 = 1 − P1,1 ,
a P2,1 = 0
λ x λaeλa − eλa + 1 −λa e−λ(a−x) dx = e , P2,2 = 1−P2,1 . 1 − exp(−λa) a λa(1 − exp(−λa)) (20)
Now π1 =
1 λa(1 − exp(−λa)) P2,1 = P2,1 = 1 − P1,1 + P2,1 λa(1 − exp(−λa)) + λa − 2 + 2exp(−λa) + λaexp(−λa) =
1 λa − 1 + e−λa . 2(λa − 1 + exp(−λa))
Simple Correlated Flow and Its Application
293
Finally, 1 1 , π2 = 1 − π1 = , (21) 2 2 −λx −λ(a−x)
1 1 λ f (x) = h1 (x)+ h2 (x) = e +e , 0 ≤ x ≤ a. (22) 2 2 2(1 − exp(−λa)) π1 =
One can see that the equation (21) seems as obvious, but its formal derivation is useful. Further we wish calculating such characteristics of the interarrival times as the expectation, variance and covariance. In order to derive these characteristics, the following values will be used: a
a
μ1 =
xh1 (x)dx =
x
0
0
a μ2 =
λ 1 e−λx dx = 1 − e−λa − λae−λa , 1 − exp(−λa) λ(1 − exp(−λa))
a xh2 (x)dx =
x
0
0
μ1 − μ2 =
=
λ 1 e−λ(a−x) dx = λa + e−λa − 1 , 1 − exp(−λa) λ(1 − exp(−λa))
1 1 − e−λa − λae−λa − λa − e−λa + 1 = λ(1 − exp(−λa))
2(1 − exp(λa)) − λa(1 + exp(−λa)) 2 1 + exp(−λa) = −a . λ(1 − exp(−λa)) λ 1 − exp(−λa)
(23)
Now the expected value of the interarrival time can be calculated by (10): μ = E(X) = π1 μ1 + π2 μ2 =
1 1 (μ1 + μ2 ) = a. 2 2
(24)
In order to calculate the variance (10), at first the second moments must be calculated: a (2) μ1
a 2
=
x2
x h1 (x)dx = 0
0
λ e−λx dx = 1 − exp(−λa)
2λ−2 1 = 1 − e−λa − λae−λa − (λa)2 e−λa . 1 − exp(−λa) 2 a (2) μ2
a 2
=
x2
x h2 (x)dx = 0
0
λ e−λ(a−x) dx = 1 − exp(−λa)
2 1 = λ−2 1 − e−λa − λa + (λa)2 . 1 − exp(−λa) 2 Now we get (2)
μ
2
= E(X ) =
(2) π1 μ1
+
(2) π2 μ2
−2
= 2λ
a 1 + e−λa 1 2 . + a − 2 λ 1 − exp(−λa)
(25)
294
A. Andronov and J. Revzina
Further for the second moment (13) we have E(ZX) =
2
πi
i=1
1 = μ1 2
+
1 2
a
2
∞ μj
j=1
zhi (z)pj (z)dz = 0
z zh1 (z) dz + μ2 a
a
0
0
a
a
μ1
z zh2 (z) dz + μ2 a
0
z zh1 (z) 1 − dz + a
z zh2 (z) 1 − dz = a
0
1 1 (2) 1 (2) 1 (2) (2) 1 = μ1 μ1 + μ2 μ1 − μ1 + μ1 μ2 + μ2 μ2 − μ2 = 2 a a a a 1 11 1 (2) (2) = (μ1 − μ2 )(μ1 + μ2 ) + μ2 (μ1 + μ2 ) = (μ1 − μ2 )μ(2) + aμ2 . 2 a a 2 Now we can use previous formulas (23) - (25). Finally for the case (18) 1 Cov(Z, X) = E(ZX) − a2 . 4
(26)
Let us consider the case (19). The formula (4) gives us ∞ P˜i,j =
∞ hi (x)(1 − pj (x))dx = 1 − Pi,j , i, j = 1, 2
hi (x)˜ pj (x)dx = 0
0
P˜1,1 = 1 − P1,1 , P˜1,2 = 1 − P1,2 = P1,1 , P˜2,1 = 1 − P2,1 , P˜2,2 = 1 − P2,2 = P2,1 . It shows that as earlier π ˜1 = π ˜2 =
1 . 2
Therefore for the stationary distribution of the interarrival time f˜(x) we have the previous expression (22) for f (x). As regards the second mixed moment then ˜ E(ZX) =
2
πi
i=1
=
2 i=1
πi
2 j=1
2 j=1
∞ μj
zhi (z)˜ pj (z)dz = 0
∞ zhi (z)(1 − pj (z))dz =
μj 0
= (μ1 + μ2 )μ − E(ZX) = 2μ2 − E(ZX) =
1 2 a − E(ZX). 2
Therefore 1 1 1
˜ ˜ Cov(Z, X) = E(ZX) − a2 = a2 − E(ZX) − a2 = −Cov(Z, X). 4 2 4
Simple Correlated Flow and Its Application
295
Also the cases (18) and (19) give the opposite correlation. Further if λ → 0 then the distribution (22) tends to the uniform distribution on (0, a) for which the covariance equals zero. Further if λ → ∞ then we have the two-point distribution P {X = 0} = P {X = a} = 1/2, as limiting distribution, for which the correlation coefficient may be -1 or 1. Therefore manipulating by λ makes it possible to choose the arbitrary value for the correlation coefficient.
4
Markovian System
r The considered system has a finite or countable set of the states N+ with N+ = {0, 1, ..., c}, c ≤ ∞. Arrival moments of the above-described flow transfer the r r system from one state Y = i ∈ N+ into another one: j ∈ N+ . Let us consider a time moment immediately after the new arrival, denote one 0+ as a beginning of the new interval and 0− as an ending of the previous interval. Earlier we have denoted L(0+) and L(0−) as those labels. If L(0−) = v then the transfer i → j (v) (v) (v) takes place with probability gi,j , gi,0 + gi,1 + ... = 1. Between the time moments of the new and the consequent arrivals, a dynamic of the system is described [7] by homogeneous Markov process Y (t), t > 0, with transition probabilities r Pi,j (t) = P {Y (t) = j|Y (0+) = i, L(0+) = v}, i, j ∈ N+ ; v = 1, ..., k; t > 0. (27) Let a pair (Yn , Xn , n = 0, 1, ...) means the following: Yn = Y (0+) be a system state at the beginning of n-interval immediately after the new arrival, Xn be a length of the previous, the (n−1)-th interval. We suppose that the stationary distribution of the discrete-time embedded Markov process (Yn , Xn , n = 0, 1, ...) exists, then let (v)
Rj (x) = P {Y (0+) = j, X ≤ x},
rj (x) =
∂ Rj (x), ∂x
r x ≥ 0, i ∈ N+ .
A usual reasoning and formula (2) gives the following equations for x ≥ 0: rj (x) =
∞ 0
r i∈N+
ri (z)
r w∈N+
k v=1
r pv (z)hv (x)Pi,w (x)qw,j dz, j ∈ N+ , x ≥ 0. (28)
Let us denote
(v)
(v)
∞ r˜i,v =
pv (z)ri (z)dz.
(29)
0 r Note r˜i,v means a stationary probability that state i ∈ N+ of Markovian system and label v for new interarrival take place immediately after an arrival. Then instead of (28) we have
rj (x) =
k r v=1 i∈N+
r˜i,v hv (x)
r w∈N+
r Pi,w (x)qw,j , j ∈ N+ , x ≥ 0. (v)
(v)
(30)
296
A. Andronov and J. Revzina
Multiplying both sides of (30) by pm (x) and integrating with respect to x we get ∞ k (v) (v) r r˜j,m = r˜i,v pm hv Pi,w qw,j dx, j ∈ N+ , x ≥ 0. (31) r v=1 i∈N+
Denoting
r w∈N+
0
∞ bi,v,j,m =
pm (x)hv (x)
r w∈N+
0
(v)
(v)
Pi,w (x)qw,j dx
(32)
we get the system of the linear equations r˜j,m =
k
r bi,v,j,m r˜i,v , j ∈ N+ .
(33)
r v=1 i∈N+
As {˜ rj,v } are a stationary probabilities of embedded Markov chain, then the last equation system is analogously to system (7), (8). Its solution allows calculating the distribution (30).
5
Single-Server Queueing System
A widely known queueing system is GI/M/1/∞: claims arrive at a single-server station in accordance with a recurrent flow. Upon arrival, the claim is immediately served if the server is free. Otherwise, one has to wait occupying one place out of an infinite number of places. The service time is assumed to be independent and identically exponentially distributed with intensity β. We consider the following modification of this system. At first, instead of the recurrent, the flow investigated in Sections 2 and 3 will be used. Secondly, a number of the waiting places are restricted and equal to c−1. If all places are busy, then an arrived claim is rejected. Earlier we have denoted X as a length of the current interval between arrivals, v means its label. As above, let us consider a time moment when a new claim arrives at the system. Now Y (t) denotes a number of the claims in the system at the time moment t after the last arrival, Y (0−) - immediately before, and Y (0+) - immediately after new arrival. We are interested in the corresponding stationary distributions. Our special case of the general one has the following characteristics: considered Markovian system is one-dimensional: r = 1; label set (v) has two elements: k = 2; qi,j = δj,min{i+1,c} , i, j ∈ N+ {0, ..., c}, v = 1, 2. The transition probabilities do not depend on v and have the following expressions: P0,j (0) = δ0,j ; Pi,j (t) =
(βt)i−j exp(−βt), (i − j)!
i = 1, ..., c; j = 1, ..., i; t > 0;
(34)
Simple Correlated Flow and Its Application i−1 (βt)v Pi,0 (t) = 1 − exp(−βt) , i = 1, ..., c; t > 0; v! v=0
297
(35)
We have from (32) for i = 1, ..., c; j = 2, ..., min{i + 1, c − 1}: a bi,v,j,m =
a pm (x)hv (x)Pi,j−1 (x)dx =
0
pm (x)hv (x) 0
(βx)i+1−j −βx e dx; (36) (i + 1 − j)!
for i = 1, ..., c; j = 1: a bi,v,1,m = 0
i−1 (xβ)w −βx pm (x)hv (x) 1 − e dx; w! w=0
(37)
for i = c, j = c: a bc,v,c,m =
pm (x)hv (x)(1 + xβ)e−βx dx;
(38)
0
for i = c − 1, j = c: . a bc−1,v,c,m =
pm (x)hv (x)e−βx dx.
(39)
0
Note that it is easy to get explicit formulas substituting the expressions for hi (x) and pi (x) with respect to (17) - (19). Now we must solve linear equation system (33) to calculate the distribution of the random variables Y (0−) and Y (0+): P {Y (0−) = j − 1} = P {Y (0+) = j} =
2
r˜j,m .
(40)
m=1
We perform a numerical analysis to evaluate the influence of various flows on queueing system efficiency. All the three above mentioned systems will be considered: the system GI/M/1/∞ with the distribution (22) of the independent interarrival times; the analogous system with restricted number c of waiting places and dependent interarrival times with the distribution (17) and for two cases: the case (18) and the case (19). We will denote last systems as N 1/M/1/c and N 2/M/1/c. As efficiency criteria, we will use the probability not to wait for beginning of the service and the mean value of the claims at the time moment of a new arrival E(Y (0−)). Let us give some comments. At first, we have chosen a rather big value of c−1 that gives the same results for the systems GI/M/1/∞ and GI/M/1/c with the infinite and restricted number of waiting places. At second, all three systems differs from each other by the interarrival times. They are independent
298
A. Andronov and J. Revzina
for the first system, and they are dependent for the remaining ones. For the second system there is a following tendency: the next interarrival time will be distinguished from the previous interarrival. Note that it is a positive fact for the queueing systems because long and short interarrival times will be alternate. As regards the third system there is an opposite tendency: the next interarrival time will be analogous to the previous interarrival time. It has a negative influence on the queueing systems, as it is highly probable to have long series of short interarrival times. At first we remind some necessary expressions for the system GI/M/1/∞. The probability ri that an arrived claim finds i other claims in the system is calculated by the formula: ri = (1 − u)ui , i = 0, 1, ...,
(41)
where u ∈ (0, 1) is an unique root of the equation ∞ u−
e−βx(1−u) f (x)dx = 0.
0
Further, we give numerical results for the following input data. The intensity of the service times β = 4, the scale parameter from (17) a = 1. Because the mean interarrival time equals to μ = a/2 = 0.5, then the load coefficient of the server ρ = 1/(μβ) = 0.5. The number of the waiting places for the systems with the dependent interarrival times c = 12, because our computational experiments have shown that the greater values do not influence the results. The parameter λ of the distribution (17) will be assuming the following values: 0.1, 0.5, 1, 2, 3, 5, 6, and 7. The tables contain the mean number of claims E(Y (0−)) and the probability of the service without waiting P {Y (0−) = 0}. Table 1. The mean number of claims in the systems E(Y (0−))
λ 0.1 0.5 1 2 3 5 7 9 GI/M/1/∞ 0.564 0.567 0.577 0.611 0.660 0.776 0.883 0.971 N I/M/1/c 0.559 0.539 0.523 0.508 0.506 0.521 0.539 0.556 N 2/M/1/c 0.571 0.600 0.648 0.794 1.018 1.692 2.083 2.459 Table 2. The probability of the service without waiting P {Y (0−) = 0}
λ 0.1 0.5 1 2 3 5 7 9 GI/M/1/∞ 0.639 0.638 0.634 0.621 0.602 0.563 0.531 0.507 N I/M/1/c 0.640 0.643 0.645 0.641 0.631 0.606 0.583 0.564 N 2/M/1/c 0.638 0.632 0.622 0.595 0.561 0.496 0.472 0.457
Let us discuss the represented results. The system GI/M/1/∞ with the recurrent input flow is a ”neutral” one. The rest two systems are the opposite
Simple Correlated Flow and Its Application
299
ones: the case (18) improves the efficiency characteristics of the service, the case (19) makes them worse. For example, if λ = 2, then the probability of the service without waiting P {Y (0−) = 0} and the mean number of the claims in the system E(Y (0−)) consist of: 0.621 and 0.611 for the system GI/M/1/∞; 0.641 and 0.508 for the system N 1/M/1/12 (the case (18)); 0.595 and 0.794 for the system N 2/M/1/12 (the case (19)). Note the efficiency characteristics for the case (19) deteriorate drastically, when the value λ increases and long series of short interarrival times is probable. It seems to us that exactly the same situation occurs in the various telecommunication and financial systems, because the modern researches show the bursty nature of the data flows in such systems [2, 6].
6
Conclusions
In this paper, we have considered a model of the correlated flow, for which interarrival times can be positive or negative correlated. Such flows often appear in the various telecommunication and financial systems. This flow has been used as an input flow for a single-server queueing system with exponential distributed service times. Numerical results show that the dependence between interarrival times exercises great influence on efficiency characteristics of the service. The elaborated approach gives a general tool for a construction of wide flows’ class with correlated interarrival times.
References 1. Abegaz, F., Naik-Nimbalkar, U.V.: Modelling statistical dependence of Markov chains via copula models. J. of Statistical Planning and Inference 138(4), 1131–1146 (2008) 2. Breymann, W., Dias, A., Embrechts, P.: Dependence structures for multivariate high-frequency data in finance. J. Quantitative Finance 3(1), 1–16 (2003) 3. Embrechts, P., Hoeing, A., Juri, A.: Using Copulae to bind the Value-at-Risk for function of dependent risk. J. Finance & Stochasti 7(2), 145–167 (2003) 4. Embrechts, P., Pucetti, G.: Bounds for function of dependent risk. J. Finance & Stochastic 10, 341–352 (2006) 5. Embrechts, P., Lindskog, F., McNeil, A.: Modelling Dependence with Copulas and Applications to Risk Management. Handbook of Heavy Tailed Distributions in Finance, vol. ch. 8, pp. 329–384. Elsevier, Amsterdam (2003) 6. Hernandez-Campos, F., Jeffay, K.F., Park, C., Marron, J.S., Resnick, S.I.: Extremal dependence: Internet traffic applications. In: Stochastic Models, vol. 22(1), pp. 1–35. J. Taylor & Francis, Taylor (2005) 7. Kijima, M.: Markov Processes for Stochastic Modelling. Chapman and Hall, London (1997) 8. Lan, K.C., Hedemann, J.: On the correlation of Internet flow characteristics. Technical report ISI-TR-574, USC/Information Sciences Institute (July 2003) 9. Limnios, N., Ouhbi, B.: Nonparametric Estimation of Integral Functionals for Semi-Markov Processes with Application in Reliability. In: Vonta, F., Nikulin, M., Limnios, N., Huber-Carol, C. (eds.) Statistical Models and Methods for Biomedical and Technical Systems, pp. 405–418. Birkhauser, Boston-Basel-Berlin (2008)
300
A. Andronov and J. Revzina
10. Nelsen Roger, B.: An Introduction to Copulas, 2nd edn. Springer, New York (2006) 11. Pacheco, A., Tang, L.C., Prabhu, U.N.: Markov-Modulated process and Semiregenerative Phenomena. World Scientific, New Jersey (2009) 12. Zhang, Y., Breslay, L., Paxson, V., Shenker, S.: On the Characteristics and Origins of Internet Flow Rates. In: ACM SIGCOMM, Pittsburgh, PA (2002) 13. Pettere, G.: Stochastic Risk Capital Model for Insurance Company. In: Applied Stochastic Models and Data Analysis: Proceedings of the XIIth International Conference, Chania, Crete, Greece, May 29-31 and June 1 (2007)
A Practical Tree Algorithm with Successive Interference Cancellation for Delay Reduction in IEEE 802.16 Networks Sergey Andreev1 , Eugeny Pustovalov2, and Andrey Turlikov2 1
2
Tampere University of Technology (TUT), Finland [email protected] State University of Aerospace Instrumentation (SUAI), St. Petersburg, Russia [email protected], [email protected]
Abstract. This paper thoroughly studies a modification of tree algorithm with successive interference cancellation. In particular, we focus on the algorithm throughput and account for a single signal memory location, as well as cancellation errors of three types. The resulting scheme is robust to imperfect interference cancellation and is tailored to the uplink bandwidth request collision resolution in an IEEE 802.16 cellular network. The mean packet delay is shown to be considerably reduced when using the proposed approach. Keywords: tree algorithm, successive throughput, mean packet delay.
1
interference
cancellation,
Introduction and Background
Contemporary communication networks adopt multi-access techniques to arbitrate the access of the user population to the shared communication link. Multiple access algorithms are specifically designed to effectively control the resource allocation and reside at the Medium Access Control (MAC) layer. They constitute an important component of the widespread wireless protocols, such as IEEE 802.11 (Wi-Fi) and IEEE 802.16 (WiMAX). Random Multiple Access (RMA) algorithms are often used due to their simple implementation and reasonably high performance. We remind that every MAC algorithm comprises a Channel Access Algorithm (CAA) and a Collision Resolution Algorithm (CRA). Whereas the former arbitrates user access to the shared medium, the latter is responsible for the collision resolution, whenever two or more users transmit their packets simultaneously. The most widespread ALOHA-based family of algorithms includes diversity slotted ALOHA, binary exponential backoff, and other popular mechanisms. The main idea of these approaches is to specify CAA and defer the packet retransmission after a collision took place for some random future time. By contrast, tree algorithms independently proposed in [1] and [2], focus on CRA and thus demonstrate higher efficiency. The family of conventional tree K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 301–315, 2011. c Springer-Verlag Berlin Heidelberg 2011
302
S. Andreev, E. Pustovalov, and A. Turlikov
algorithms is represented by Standard Tree Algorithm (STA) and Modified Tree Algorithm (MTA). During the operation of the conventional STA and MTA, it is implicitly assumed that no meaningful information is extracted at the receiver after a collision. However, recent advances in physical (PHY) layer techniques allow using Successive Interference Cancellation (SIC) techniques [3], [4]. During SIC operation the packets involved into a collision may be restored successively. In [3], it was argued that SIC is naturally applicable to the uplink packet transmission in centralized communication networks. As such, in this paper we consider the prominent IEEE 802.16 [5] wireless cellular protocol. The pioneering research work [6] proposes a combination of SIC and a tree algorithm (SICTA) to improve the performance of the conventional tree algorithms. Briefly, the acquired collision signals are stored in the signal memory of the receiver, which is assumed to be unbounded and then processed by SIC. Consequently, the performance of SICTA algorithm is shown to double the performance of the conventional STA. In the subsequent years, several modifications of the baseline SICTA algorithm were proposed [7], [8], [9], including the solutions that take advantage of the bounded signal memory. In particular, [10] proposes a SICTA-based algorithm to replace the standard algorithm at the bandwidth requesting stage in IEEE 802.16 networks. All the existing SICTA-based solutions may be classified into two categories. Firstly, there are algorithms that assume perfect SIC operation and therefore are susceptible to cancellation errors falling into a deadlock. Secondly, there are algorithms that are robust to imperfect SIC operation, but at the same time are unstable when the number of users grows unboundedly. In our previous work [11], we proposed a robust SICTA algorithm that tolerates cancellation errors and demonstrates nonzero performance even when the user population is infinite. In this paper, we extend our algorithm to account for a more realistic SIC operation and conduct its thorough throughput analysis. Finally, we tailor the proposed solution for the uplink bandwidth requesting in the prominent IEEE 802.16 protocol.
2 2.1
System Model and Algorithms Conventional Tree Algorithms
Consider tree multi-access algorithms proposed independently by [1] and [2] in the framework of classical RMA model with infinite user population and Poisson arrivals. We remind that each tree algorithm defines both CAA and CRA, which arbitrate user channel access and collision resolution process respectively. CRA is conveniently illustrated by a binary tree (see Figure 1, a), where a collided user selects right slot with probability p and selects left slot with probability (1 − p). Here the root corresponds to the set of users that collided initially, whereas the remaining nodes correspond to the subsets (possibly, empty) of users that decided to transmit in particular slots of the Collision Resolution Interval (CRI). We note that in the example collision resolution tree (see Figure 1, a) a collision in slot 5 is inevitable, as none of the users which collided in slot 3 select
A Practical Tree Algorithm with Successive Interference Cancellation A,B,C
C
A,B
A,B
B
A
A,B,C
C
B
T im e
1
A,B,C
C
303
T im e A,B
B
A
T im e A ,B ,C
A ,B ,C
3
2
A ,B
C
5
A,B
C
A ,B
C
4
A ,B
A ,B
7
6
A
B
a)
A ,B ,C
A
A ,B
B
b)
A
B
– S lot s k ipped
c)
Fig. 1. Tree algorithms operation: a – STA; b – MTA; c – SICTA
empty right slot 4. As such, it is reasonable to skip the collision slot 5 and proceed immediately to the next tree level. This simple modification is adopted by the conventional MTA (see Figure 1, b) to increase the performance of the conventional STA. Maximum stable throughput is one of the most important performance parameters of tree algorithms. It may be defined as the highest arrival rate, which still results in the bounded value of the mean packet delay. The algorithm is stable for the given arrival rate if its mean packet delay is finite. Conventional STA has the throughput of 0.346, whereas conventional MTA improves throughput up to 0.375 in the framework of the classical model. 2.2
Successive Interference Cancellation
Recent advances in telecommunication equipment allow using SIC at the PHY layer [12], [4]. Generally, SIC is an approach to process a combination of wireless signals having some additional information. Following [7], we show how SIC may improve the performance of a tree algorithm in Figure 2. Assume for simplicity that the channel is error-free. Denote by ys the signal received by the end of slot s. Similarly, denote by xA and xB the signals corresponding to packets A and B respectively. Let two users transmit their packets A and B in the first slot and collide. As such, the receiver acquires the combined signal y1 = xA + xB and decides that a collision occurred. The initial combined signal y1 is then stored in the signal memory of the receiver. After acquiring the signal y2 = xA at the end of slot 2, the receiver successfully extracts signal xA and decodes packet A. Further, SIC procedure processes signal y1 and cancels the extracted signal xA from the stored combination, that is, y˜1 = y1 − xA . Then it is also possible to extract signal xB = y˜1 and to decode
304
S. Andreev, E. Pustovalov, and A. Turlikov
A ,B
y1
y2
A,B
A
B
T im e
B
A
– S lot s k ipped
Fig. 2. Simple SIC example
packet B. Therefore, the subsequent collision resolution is not necessary. In the considered example the CRI duration is one slot less for any tree algorithm. SIC-based algorithms typically exploit extended feedback from the PHY layer. This extra feedback is the result of the SIC operation. The baseline SICTA algorithm proposed in [6] requires the K–EMPTY –COLLISION feedback at MAC, where K is the number of successfully restored packets together with the number of left slots of the collision resolution tree labeled as empty after the SIC operation. Consider example SICTA operation in Figure 1, c, where the CRI duration is only 4 slots. As left subtree may be skipped completely, the throughput is 0.693, that is, twice the STA throughput. More formal analysis is conducted below in subsection 3.2. In Figure 3, we detail the simplified SIC transceiver, which may be used to implement the baseline SICTA algorithm from [6]. Solid lines indicate transmission of data, whereas dashed lines indicate transmission of the control information. As follows from the figure, the unbounded signal memory at the receiver is practically infeasible. To mitigate this limitation, we propose our modification of SICTA that uses only a single signal memory location. As such, the implementation and operation complexity may be considerably reduced.
2.3
Imperfect Interference Cancellation
We note that in practical wireless devices using SIC, the interference cancellation is not perfect [13]. Cancellation errors may occur due to the residual signals after canceling the received signal in the stored combination. For example, after canceling the extracted signal xA from the combined signal xA + xB (see e.g. Figure 2) in slot s, the resulting signal contains y˜s = xB + nA , where nA is the residual signal xA . After subsequent cancellation of xB we analogously obtain y˜˜s = nA + nB . If the power of the residual signal nA + nB is sufficiently high, the receiver mistakenly decides that the corresponding slot is not empty, that is, detects a non-existent collision between the users. For simplicity, we assume that this event occurs with some constant probability that depends on the receiver implementation. As such, due to the imperfect SIC operation, the PHY-MAC feedback is error-prone.
A Practical Tree Algorithm with Successive Interference Cancellation
305
U P P E R LA Y E R S
P a ck et
P ac k et
MA C LA Y E R LO G IC A L E N T IT Y
Ls
Fe ed ba c k
M em ory c ell :
P H Y LA Y E R
S ignal m em ory : C ontrol unit
LO G IC A L E N T IT Y M em ory c ell :
C e ll 1
...
Ms
C e ll n
...
D igital part A nalog part
C OD E R, M O D U LA T O R
D E C OD E R, D E M O D U LA T O R
Internal m em ory
Internal m em ory
D AC
S ig n a l
–
AD C
R F part
S ig n a l
W IR E LE S S C H A N N E L
Fig. 3. SIC transceiver structure
Despite its high throughput, the baseline SICTA algorithm is vulnerable to cancellation errors. Indeed, assume that in the considered example in Figure 1, c the last cancellation operation of the signal xB in the initial stored signal implies the residual signal nB , that is, y˜ ˜1 = y1 − xC − xB + nB . If now the power of nB is high enough, the signal xA may be extracted unsuccessfully and the collision resolution process would continue. Sooner or later, when packet A is decoded successfully, the residual signal power may be too high and the receiver would detect another non-existent collision in the left slot. According to the SICTA rules, the collision resolution process would then continue indefinitely unless it is aborted externally. As such, SICTA falls into a deadlock. Our overview of SICTA-based algorithms indicates that currently there is no algorithm that is robust to imperfect interference cancellation and, at the same time, stable in the framework of the classical RMA model. The proposed robust SICTA (R-SICTA) algorithm tolerates cancellation errors for the cost of some reduction in its throughput. Additionally, it takes advantage of the single signal memory location at the receiver side. The increase in the amount of the available memory will result in growing throughput (still below the throughput of SICTA) and complexity [9]. The main idea of the proposed algorithm (see Figure 4, a) is to refrain from skipping particular collision slots (such as slot 3), which otherwise might result
306 A,B,C
S. Andreev, E. Pustovalov, and A. Turlikov C
A,B
A ,B
B est case A,B,C
C
A,B
B
T im e A ,B
B
W o rst case
A
A ,B
A ,B T im e
A,B ,C A ,B
A ,B A ,B
C
A ,B
A
b)
c)
A,B ,C
A ,B
A,B
C
B
a)
B
d)
A
e)
Fig. 4. Proposed R-SICTA algorithm: a – example operation of R-SICTA; b, c, d, e – some subtrees of R-SICTA
in a deadlock. In Figure 4, a, the time diagram for the best case corresponds to two successful cancellation operations, whereas the time diagram for the worst case corresponds to two unsuccessful operations. The formal description of our R-SICTA algorithm is given below in subsection 3.3. We note that due to cancellation errors the rules 3, 5, and 7 (see Table 1) must not allow skipping a slot of the collision resolution tree. Otherwise, deadlock effect may not be controlled.
3 3.1
Proposed Throughput Calculation Technique General Procedure
Here we describe an approach to obtain the throughput of a tree algorithm with successive interference cancellation. As such, we develop the re-calculation method for the mean collision resolution time from [14] and apply it to SICTAbased algorithms. Denote by v the duration of CRI in slots (time to resolve a collision of size k, or the number of nodes in the respective collision resolution tree), which is a discrete random variable. The conditional mean E[v|collision of size k is being resolved] determines the CRI duration for a collision between k users. Our approach to the throughput calculation of tree algorithms using SIC is based on the following auxiliary assumptions. Proposition 1. Consider tree algorithm A using SIC. Denote by TkA the mean time to resolve a collision of size k for this algorithm. Taking TkA into account, k the following bounds for the throughput of A denoted by RA may be established: lim inf k→∞
k k < RA < lim sup A . A Tk k→∞ Tk
(1)
A Practical Tree Algorithm with Successive Interference Cancellation
307
The proof of this proposition follows immediately from [1]. Consider now STA denoting the respective mean collision resolution time by Tk . Analogously to (1), we may derive the bounds for the throughput of STA omitting the lower index and denoting it simply by R: lim inf k→∞
k k < R < lim sup . Tk k→∞ Tk
(2)
We note that the bounds for R were established in [15] and are equal to: 0.34657320 < R < 0.34657397.
(3)
Proposition 2. Upper and lower bounds for the throughput R of STA may be obtained as: −1 −1 2 2 +c
vc =
v−1 ; 2
ve =
v+1 − k. 2
(5)
The proof of the above relations may be found in [14]. Proposition 4. Consider the collision resolution tree of algorithm A as the collision resolution tree of STA, where the time to pass some tree nodes is zero due to the SIC operation. We establish the number of thus skipped nodes r denoting by u the number of remaining nodes. Coming to the expected values, we may write: E[u] = E[v] − E[r] or TkA = Tk − E[r]. (6) The proof of this proposition follows from Proposition 1 and equation (2). Substituting (6) into (1) and after some transformations, we derive the bounds for the throughput RA as functions of known bounds for the throughput of STA (4). Below we use Proposition 3 to obtain E[r] for the baseline SICTA algorithm, as well as for the proposed R-SICTA algorithm. Also we account for Proposition 4 to establish bounds for their throughputs. 3.2
Baseline SICTA Algorithm
Below we calculate the throughput of the baseline SICTA algorithm from [6] as an example. The following feedback must be available from the SIC receiver for the proper operation of SICTA:
308
S. Andreev, E. Pustovalov, and A. Turlikov
1. COLLISION. 2. EMPTY. 3. K – the number of successfully restored packets together with the number of left slots of the collision resolution tree labeled as empty after SIC operation (K ≥ 1). The operation of the respective PHY layer is detailed in Figure 3. Proposition 5. The mean number of non-skipped nodes in the collision resolution tree of SICTA (TkS ) is established as: 1 1 1 1 1 Tk + 1 TkS = Tk − E[vs ] − (E[vc ] − 1) − E[ve ] = Tk − Tk + = , (7) 2 2 2 2 2 2 where Tk is the mean number of nodes in the collision resolution tree of STA. The thorough proof of this proposition may be conducted using the approach from [14] and describing the performance of SICTA in the framework of the graph theory. Consequently, accounting for (1) and (4), we establish the following bounds for the throughput RS of SICTA:
−1 −1 1 1 +c < RS < −c . ln 2 ln 2
(8)
Concluding our analysis, we note that upper and lower bounds for the throughput of SICTA are sufficiently close to each other due to small value of c. Therefore, SICTA throughput may be written as: RS ≈ ln 2 ≈ 0.693,
(9)
which gives the previously known result from [6]. However, our approach if far simpler and has reduced computational burden. 3.3
Proposed R-SICTA Algorithm
Consider now the proposed R-SICTA algorithm, which is robust to imperfect interference cancellation. This algorithm stores a single collision signal and cancels both success and collision signals (see Figure 4, a). It is also designed to tolerate cancellation errors (see subsection 2.3). The following feedback must be available from the SIC receiver for the proper operation of R-SICTA: 1. 2. 3. 4. 5.
COLLISION and slot skip (contents of the left slot extracted) (C/skip). COLLISION and no slot skip (C/–). SUCCESS /EMPTY and no slot skip (SE/–). SUCCESS and slot skip (contents of the left slot extracted) (S/skip). EMPTY and slot skip (inevitable collision in the following slot) (E/skip).
A Practical Tree Algorithm with Successive Interference Cancellation
309
Ensure: During algorithm operation, account for a particular CAA. 1: Reset position L of a user in collision resolution tree. 2: Generate new arrivals to the user according to a particular arrival flow. 3: if user has pending packets then 4: if position of user L = 0 then 5: Transmit a packet. 6: Wait for end of the current slot. 7: Receive feedback from PHY. 8: if C/skip feedback is received then 9: if L = 1, then 10: Delete the pending packet. 11: else if L = 0, then 0 with probability p, 12: L= 1 with probability 1 − p. 13: else if C/– feedback is received then 14: if L > 0, then 15: L = L + 1. 16: else 0 with probability p, 17: L= 1 with probability 1 − p. 18: else if SE/– feedback is received then 19: if L > 0, then 20: L = L − 1. 21: else 22: Delete the pending packet. 23: else if S/skip feedback is received then 24: if L ≥ 2, then 25: L = L − 2. 26: else 27: Delete the pending packet. 28: else if E/skip feedback is received then 29: if L = 1, then 0 with probability p, 30: L= 1 with probability 1 − p. 31: Go to step 2.
Algorithm 1. R-SICTA MAC operation Algorithm 1 describes the operation of R-SICTA MAC. Denote the received signal by cs, the stored signal by ss, and the extracted signal by ms. The PHY operation is summarized in Table 1. Below we express TkRS according to Proposition 4. As such, the following tree nodes are subtracted from Tk as they are skipped due to SIC operation: – Figure 4, b, when a collision slot is followed by an empty slot. The MTA rules allow to skip a collision slot with probability 1. – Figure 4, c, when a collision slot is followed by a collision slot. The SIC operation allows to skip an empty slot with probability 1 − qce .
310
S. Andreev, E. Pustovalov, and A. Turlikov Table 1. R-SICTA PHY operation Rule Channel – PHY Memory contents PHY – MAC Store 1 2 3 4 5 6 7
COLLISION COLLISION COLLISION SUCCESS SUCCESS EMPTY EMPTY
ss − cs = 0 ss − cs = ms otherwise ss − cs = ms otherwise ss = 0 ss = 0
C/skip C/skip C/S/skip SE/E/skip SE/-
cs cs cs 0 0 ss 0
– Figure 4, d, when a collision slot is again followed by a collision slot. The SIC operation allows to skip a success slot with probability 1 − qcs . – Figure 4, e, when a collision slot is followed by a success slot. The SIC operation allows to skip a success slot with probability 1 − qss . We note that qce , qcs , and qss are the parameters of SIC and depend on its implementation. The following proposition may thus be formulated. Proposition 6. The mean number of non-skipped nodes in the collision resolution tree of R-SICTA (TkRS ) is established as: 1 qce 1 qce k Nk RS Tk = + Tk − + + (1 + qcs − qce ) + (qss − qcs ), (10) 2 4 2 4 2 2 where Tk is the mean number of nodes in the collision resolution tree of STA and Nk is the number of collisions of size 2 in the STA collision resolution tree of initial size k, whereas probabilities qce , qss , and qcs were discussed above. We omit the proof of this proposition due to the space limitations. Finalizing our analysis, it is important to evaluate the relation Nkk for the increasingly large values of k. Clearly, N0 = N1 = 0 as there are no collision nodes in the respective collision resolution trees. Also it is easy to show that N2 = 2. Generally, accounting for the properties of collision resolution trees, for k > 2 it follows that: k−1 k Ni i Nk = i=1k−1 . (11) 2 −1 Equation (11) may be calculated recursively for any chosen value of k. Consider the Poisson transform [16] of the sequence N0 , N1 , . . . , Ni , . . ., which is denoted by: N (s)
k≥0
Nk ·
sk −s e , s ∈ R. k!
(12)
A Practical Tree Algorithm with Successive Interference Cancellation
311
After some derivations, we may obtain the following recursive expression to establish N (s): s
s2 −s e . (13) 2 2 Consider also the normalized Poisson transform analogously to [15], which is denoted by: N (s) = 2N
M (s)
+
N (s) . s
(14)
Using (13), we may rewrite (14) as: s
s + e−s . (15) 2 2 The function M (s) is periodic for large values of its argument, which may be used to evaluate it. We consider the normalized Poisson transform for sufficiently large values of its argument 2n r, where n ∈ Z and r ∈ R. Formally substituting 2n r into (15), we obtain: M (s) = M
M (2n r) = M (2n−1 r) +
2nr −2n r e . 2
(16)
For considerably large n, the variation of M (2n r) from 2n to 2n+1 corresponds to one period of function M (2n r). Therefore, for 1 ≤ r ≤ 2 and some value of n we obtain the highest and the lowest values of the function for all the subsequent values of its argument. Consider the equality (16) in more detail and execute the recursion for n − 1 times: M (2n r) = M (r) +
n 2i r i=1
2
e−2
i
r
= M (r) + Hn (r).
(17)
The series Hn (r) converge fast and easy to evaluate with any required precision. The values of M (r) for low r are easy to obtain accounting for (12) and (14). Further, using (17), we study the behavior of the initial function M (2n r) over one period, when n ≥ 20. It may be shown that the precision of the obtained values is then at least 10−8 . We give these values in the integer points k, that is, M (2n r) = M (k): max
M (k) = lim sup M (k) < 0.72135464 + 1 · 10−8
min
M (k) = lim inf M (k) > 0.72134039 − 1 · 10−8 .
220 ≤k≤221
k→∞
(18)
and 220 ≤k≤221
k→∞
Following the approach from [17] (Theorem 1), it may be shown that the lower and the upper bounds for M (k) (18) also hold for the relation Nkk . We note that as the limit of Nkk does not exist, we inevitably have an interval, where the
312
S. Andreev, E. Pustovalov, and A. Turlikov
behavior of Nkk is not determined. The length of this interval, however, is only 0.00001425. Simplifying the representation of the final result, we note that lim sup Nkk = Nk k→∞ k
lim inf
k→∞
= γ with the precision of at least three decimal digits and γ = 0.721.
Also for the sake of simplicity, we avoid finding the upper and the lower bounds for the throughput of R-SICTA (RRS ) as they are sufficiently close to each other. Then the resulting approximation for the throughput of the proposed algorithm may be obtained as: RRS ≈
2 ln 2 . 2 + qce + 2 ln 2(1 + qcs − qce + (qss − qcs )γ)
(19)
In particular, when qce = qss = qcs = 0, that is, when there are no cancellation errors, RRS ≈ 0.515.
4
IEEE 802.16 Performance Improvement and Conclusions
The combination of successive interference cancellation at PHY and tree algorithms at MAC constitutes a promising direction toward the improvement of the contemporary communication protocols. In particular, it allows for the considerable throughput increase for the moderate cost of implementation and operation complexity. Currently, the family of SIC-based algorithms is known, where the baseline SICTA demonstrates the highest throughput of 0.693 under the classical set of assumptions. However, SICTA requires unbounded signal memory at the receiver side, which is practically infeasible. Moreover, its performance degrades significantly due to the imperfect interference cancellation. We proposed a practical SICTA-based algorithm that mitigates the limitations of the baseline SICTA and has the throughput of 0.515 in case of no cancellation errors. Moreover, our R-SICTA is robust even in case of high cancellation error probability and demonstrates graceful performance degradation. In the worst case, when SIC operation is not possible, R-SICTA converges to MTA with the throughput of 0.375. In order to conclude upon the feasibility of the proposed algorithm, we consider its usage for the uplink bandwidth requesting in the prominent IEEE 802.16 protocol. Below we evaluate the gain after the replacement of the standardized Binary Exponential Backoff (BEB) algorithm [5] with the proposed R-SICTA. We use our own IEEE 802.16 simulator extensively verified over the recent years and referenced by our previous works, e.g. [18]. The simulation parameters are summarized in Table 2. In Figure 5, we plot the reservation delay as the function of the overall arrival rate. Here M stands for the total number of users and N is the number of bandwidth request slots per frame. As expected, the baseline SICTA algorithm with unbounded signal memory demonstrates the lowest delay. However, the proposed R-SICTA algorithm with single signal memory performs closely to SICTA in case of no cancellation errors.
A Practical Tree Algorithm with Successive Interference Cancellation
313
Table 2. Basic simulation parameters IEEE 802.16 network parameter DL:UL PHY type Frame duration Sub-channel bandwidth Contention slot length Data packet size
Value 60:40 OFDM 5 ms 7 MHz 170 µs 4096 bits
60
R e se rva tion d e la y, m s
50
2
1
40
4
3
30 20
5 10 0
0
1
2
3
4
5
O ve ra ll a rriva l ra te, M b p s Fig. 5. IEEE 802.16 reservation delay for M = 6 and N = 1: 1 – BEB, W = W0 , m = 0; 2 – STA; 3 – MTA; 4 – R-SICTA, qce = qss = qcs = 0; 5 – SICTA
In the worst case of imperfect interference cancellation, when qce = qss = qcs = 1, the R-SICTA reservation delay approaches that of MTA. As such, the gap between curves 3 and 4 in Figure 5 demonstrates the range of possible gains from the proposed solution depending on the cancellation error probability. Finally, STA has higher reservation delay than MTA, whereas the standardized BEB algorithm is clearly the worst case even with the optimal operation parameters W and m [18]. Figure 6 plots the overall packet delay in IEEE 802.16. The results generally follow the respective trends as in Figure 5, but show different delay values. In particular, for the case without cancellation errors, the proposed RSICTA has the gain of 50-60% comparatively to the standardized BEB algortihm and depending on the arrival rate. In the worst case of imperfect interference
314
S. Andreev, E. Pustovalov, and A. Turlikov 180
O ve rall pa cke t d ela y, m s
160
1
140 120
2
100 80
4
60 40
3 5
20 0
0
1
2
3
4
5
O ve ra ll a rriva l ra te, M b p s Fig. 6. IEEE 802.16 overall delay for M = 6 and N = 1: 1 – BEB, W = W0 , m = 0; 2 – STA; 3 – MTA; 4 – R-SICTA, qce = qss = qcs = 0; 5 – SICTA
cancellation, when qce = qss = qcs = 1, the gain reduces to 25-56%, but still remains considerable. Summarizing, we have thoroughly analyzed the proposed practical R-SICTA algorithm with successive interference cancellation. We established its throughput, as well as tailored it to the uplink bandwidth requesting in the contemporary IEEE 802.16 protocol. Our results indicate significant delay gains after the replacement of the standardized BEB algorithm with the proposed R-SICTA. As such, the proposed solution is attractive to improve the performance of modern cellular networks.
Acknowledgments This work is supported by the Russian Foundation for Basic Research (project # 10-08-01071-a).
References 1. Tsybakov, B.S., Mikhailov, V.A.: Free synchronous packet access in a broadcast channel with feedback. Problems of Information Transmission 14(4), 32–59 (1978) 2. Capetanakis, J.I.: Tree algorithms for packet broadcast channels. IEEE Transactions on Information Theory 25(4), 505–515 (1979) 3. Pedersen, K., Kolding, T., Seskar, I., Holtzman, J.: Practical implementation of successive interference cancellation in DS/CDMA systems. In: Proceedings of IEEE ICUPC, vol. 1, pp. 321–325 (1996)
A Practical Tree Algorithm with Successive Interference Cancellation
315
4. Weber, S., Andrews, J., Yang, X., Veciana, G.: Transmission capacity of wireless ad hoc networks with successive interference cancellation. IEEE Transactions on Information Theory 53(8), 2799–2814 (2007) 5. IEEE Std. 802.16m (D9), Amendment to IEEE Standard for Local and metropolitan area networks. Advanced Air Interface 6. Yu, Y., Giannakis, G.B.: SICTA: A 0.693 contention tree algorithm using successive interference cancellation. In: Proceedings of IEEE INFOCOM, vol. 3, pp. 1908–1916 (2005) 7. Yu, Y., Giannakis, G.B.: High-throughput random access using successive interference cancellation in a tree algorithm. IEEE Transactions on Information Theory 53(12), 4628–4639 (2007) 8. Wang, X., Yu, Y., Giannakis, G.B.: A robust high-throughput tree algorithm using successive interference cancellation. IEEE Transactions on Communications 55(12), 2253–2256 (2007) 9. Peeters, G.T., Houdt, B.V.: Interference cancellation tree algorithms with k-signal memory locations. IEEE Transactions on Communications 58(11), 3056–3061 (2010) 10. Wang, X., Yu, Y., Giannakis, G.B.: Combining random backoff with a cross-layer tree algorithm for random access in IEEE 802.16. IEEE Wireless Communications and Networking Conference 2, 972–977 (2006) 11. Andreev, S., Pustovalov, E., Turlikov, A.: SICTA modifications with single memory location and resistant to cancellation errors. In: Balandin, S., Moltchanov, D., Koucheryavy, Y. (eds.) NEW2AN 2008. LNCS, vol. 5174, pp. 13–24. Springer, Heidelberg (2008) 12. Agrawal, A., Andrews, J., Cioffi, J., Meng, T.: Iterative power pontrol for imperfect successive interference cancellation. IEEE Transactions on Wireless Communications 4(3), 878–884 (2005) 13. Andrews, J., Hasan, A.: Analysis of cancellation error for successive interference cancellation with imperfect channel estimation. Tech. Rep. EE–381K: Multiuser Wireless Communications (2002) 14. Evseev, G.S., Turlikov, A.M.: A connection between characteristics of blocked stack algorithms for random multiple access system. Problems of Information Transmission 43(4), 345–379 (2007) 15. Gyorfi, L., Gyori, S., Massey, J.L.: Principles of stability analysis for random accessing with feedback. NATO Security through Science Series: Information and Communication Security 10, 214–250 (2007) 16. Szpankowski: Average Case Analysis of Algorithms on Sequences. Wiley, Chichester (2001) 17. Gyorfi, L., Gyori, S.: Analysis of tree algorithm for collision resolution. In: Proceedings of AofA, pp. 357–364 (2005) 18. Andreev, S.D., Turlikov, A.M., Vinel, A.V.: Contention-based polling efficiency in broadband wireless networks. In: Al-Begain, K., Heindl, A., Telek, M. (eds.) ASMTA 2008. LNCS, vol. 5055, pp. 295–309. Springer, Heidelberg (2008)
A Probabilistic Energy-Aware Model for Mobile Ad-Hoc Networks Lucia Gallina, Sardaouna Hamadou, Andrea Marin, and Sabina Rossi Universit` a Ca’ Foscari, Venezia, Italy {lgallina,sh,marin,srossi}@dais.unive.it
Abstract. We propose a probabilistic, energy-aware, broadcast calculus for the analysis of mobile ad-hoc networks. The semantics of our model is expressed in terms of Segala’s probabilistic automata driven by schedulers to resolve the nondeterministic choice among the probability distributions over target states. We develop a probabilistic observational congruence and a energy-aware preorder semantics. The observational congruence allows us to verify whether two networks exhibit the same observable probabilistic behaviour (connectivity), while the preorder is used to compare the energy consumption of different, but behaviourally equivalent, networks. As an application, we analyse and compare the energy consumption of two well-known automatic repeat request (ARQ)based error control protocols: stop-and-wait (SW) and go-back-N (GBN).
1
Introduction
Mobile ad-hoc networks (MANETs) consist of a collection of nodes that communicate with each other through wireless links without a pre-established networking infrastructure. A common feature of most of these networks is free node mobility: each device in a MANET is free to move independently in any direction, and will therefore change its links to other devices frequently. These changes in the network topology can cause the nodes to continuously enter and exit each other transmission area and hence highly dynamic routing algorithms are needed to ensure the connectivity. Moreover, mobile devices may have strict requirements on the energy consumption because their expected life-time often depends on the energy stored in a battery or other exhaustible power sources. Hence, the communication protocols must face the problem of providing a full connectivity among the network devices while maintaining good performance both in terms of throughput and of energy conservation (see, e.g., [11,13]). The definition of a general formalism capable of expressing both qualitative (connectivity) and quantitative (power consumption and throughput) analysis is a challenging topic of research. In this paper we define a calculus, named Probabilistic E-BUM, for formally reasoning about probabilistic energy-aware broadcast, unicast and multicast communications of mobile ad-hoc networks. This is an extension of the E-BUM calculus [3] where probability distributions are used to describe the movements of nodes. Our calculus allows us to model the ability of a node to broadcast a K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 316–330, 2011. c Springer-Verlag Berlin Heidelberg 2011
A Probabilistic Energy-Aware Model for Mobile Ad-Hoc Networks
317
message to any other node within its physical transmission range, and to move in and out of the transmission range of other nodes in the network. The connectivity of a node is represented by a location and a transmission radius. Broadcast communications are limited to the transmission cell of the sender, while unicast and multicast communications are modelled by specifying, for each output action, the addresses of the intended recipients of the message. Moreover, the possibility for a node to control its transmission power is modeled by enabling nodes to modify the transmission radius of their communications. Probabilistic E-BUM calculus deals with both nondeterministic and probabilistic choices. Its semantics is expressed in terms of Segala’s probabilistic automata [10] driven by schedulers to resolve the nondeterministic choice among the probability distributions over target states. In this paper we propose a notion of probabilistic observational congruence in the style of [8] and also define a labelled semantics to model the interactions of the system with the surrounding environmnet. We provide a labelled bisimilarity as an efficient proof method for the observational congruence. Intuitively, two networks are deemed equivalent if they exhibit the same probabilistic behaviour (connectivity) relative to the corresponding set of intended recipients and to a specific set of schedulers. Moreover, based on the labelled semantics we define an energy-aware preorder over networks which allows us to compare the average energy cost of different networks but exhibiting the same connectivity behaviour. This property can be used to replace a network component with a less energy consuming one while maintaining connectivity. As an application we analyse and compare the energy consumption of two well-known automatic repeat request (ARQ)-based error control protocols: stop-and-wait (SW) and go-back-N (GBN). Related works. Probabilistic and stochastic models are nowadays widely used in the design and verification of complex systems. Song and Godskesen [12] proposed a probabilistic broadcast calculus for mobile and wireless networks whose connections are unreliable. The peculiarity of this calculus is the introduction of a probabilistic mobility function which defines the mobility rules of the connections. Palamidessi et al. [4] defined an extension of the applied pi-calculus with nondeterministic and probabilistic choice operators, while Priami [7] introduced a stochastic extension of the pi-caluclus which allows one to describe dynamically reconfigurable or mobile networks. Another important stochastic process algebra for performance evalutation is PEPA [5], introduced by Jane Hillston at al. which is used for modelling systems composed of concurrently active components which co-operate and share work. Here cooperation is modelled in a CSP style, using share names. Bernardo et al. introduced EMPAgr [1], an extended Markovian process algebra including probabilities, priority and exponentially distributed durations. The peculiarity of this calculus is the modelling of exponentially timed as well as immediate actions, whose selection is control by a priority level associated with them. As far as energy consumption is concerned, several papers address the problem of studying the energy consumption of a specific communication protocol for wireless networks. For instance, in [13] the authors define a Markov Reward
318
L. Gallina et al. Table 1. Syntax
Networks
Processes
M,N ::= 0 Empty network | M1 |M2 Parallel composition | n[P ]l Node (or device)
P,Q,R ::= 0 | c(˜ x).P | c¯L,r w.P ˜ | [w1 = w2 ]P, Q | Aw ˜
Inactive process Input Output Matching Recursion
process [9] modelling some protocols for pairwise node communications. Quantitative analysis in steady-state is then derived and hence the average performance indices computed. In [11] the authors define a set of metrics on the energy consumption which are then estimated through simulation and show how some changes in the protocols can improve the efficiency. With respect to the above mentioned works, the model we propose here aims at provididing a common framework for both qualitative and quantitative analysis. Plan of the paper. Section ?? introduces the Probabilistic E-BUM calculus and its observational semantics. In Section 3 we show how to exploit the observation semantics for measuring the energy consumption of ad-hoc networks and comparing the average energy cost of networks exhibiting the same connectivity behaviour. In Section 4 we analyse the energy consumption of two well-known automatic repeat request (ARQ)-based error control protocols: stop-and-wait (SW) and go-back-N (GBN). Finally, Section 5 concludes the paper.
2
The Calculus
We introduce the Probabilistic E-BUM calculus, an extension of E-BUM (a calculus for Energy-aware Broadcast, Unicast, Multicast communications in mobile ad-hoc networks) [3] that models mobile ad hoc networks as a collection of nodes, running in parallel, and using channels to broadcast messages. Our calculus supports multicast and unicast communications. Moreover, it allows us to model the possibility for a node to administrate energy consumption by choosing the optimal transmission radius to communicate with the desired recipients. Syntax. We use letters c and d for channels; m and n for nodes; l, k and h for locations; r for transmission radii; x, y and z for variables. Closed values contain nodes, locations, transmission radii and any basic value (booleans, integers, ...). Values include also variables. We use u and v for closed values and w for (open) values. We write v˜, w ˜ for tuples of values. We write Loc for the set of all locations. The syntax of our calculus is shown in Table 1. This is defined in a two-level structure: the lower one for processes, the upper one for networks. Networks are collections of nodes (which represent devices), running in parallel, using channels to communicate messages. As usual, 0 denotes the empty network and M1 |M2 represents the parallel composition of two networks. Processes are sequential and
A Probabilistic Energy-Aware Model for Mobile Ad-Hoc Networks
319
live within the nodes. Process 0 denotes the inactive process. Process c(˜ x).P can receive a tuple w ˜ of (closed) values via channel c and continue as P {w/˜ ˜ x}, i.e., as P with w ˜ substituted for x ˜ (where |˜ x| = |w|). ˜ Process c¯L,r w.P ˜ can send a tuple of (closed) values w ˜ via channel c and continue as P. The tag L is used to maintain the set of locations of the intended recipients: L = ∞ represents a broadcast transmission, while a finite set of locations L denotes a multicast communication (unicast if L is a singleton). The tag r represents the power of the transmission: we assume that the choice of the transmission power may depend on precise strategies which are implemented in the communication protocol; hence it is reasonable considering the transmission radius of a communication as an information given by the process running in the sender node. Syntactically, the tags L and r associated with the channel c in an output action may be variables, but they must be instantiated when the output prefix is ready to fire. Process [w1 = w2 ]P, Q behaves as P if w1 = w2 , and as Q otherwise. We write def Aw ˜ to denote a process defined via a (possibly recursive) definition A(˜ x) = P , with |˜ x| = |w| ˜ where x ˜ contains all channels and variables that appear free in P . In the process c(˜ x).P , the variables in x ˜ are bound in P . We identify processes up to α-conversion and we assume that there are no free variables in a network. We write cl for c{l} , c¯L,r w for c¯L,r w.0, and [w1 = w2 ]P for [w1 = w2 ]P, 0. Nodes cannot be created or destroyed. We write n[P ]l for a node named n located at the physical location l, and executing a process P . Each node n is associated with a pair < rn , Jn >, where rn is a non negative real number denoting the maximum transmission radius that n can use to transmit, while Jn is the transition matrix of a discrete time Markov chain, where Jnlk is the probabilty that the node n located at l, after executing a movement action, will be located at k. Hence, k∈Loc Jnlk = 1 for all locations l ∈ Loc. Static nodes are associated with the identity Markov chain, i.e., the identity matrix Jnll = 1 for all l ∈ Loc and Jnlk = 0 for all l = k. Therefore, if the initial location of a static node is l, then l is the only location reachable according to the node’s Markov chain. In the following, we denote by N the set of all networks. Nodes connectivity is verified by looking at the physical location and the transmission radius of the sender: if a node broadcasts a message, this information will be received only by the nodes that lie in the area delimited by the transmission radius of the sender. In the definition of the operational semantics we then assume the possibility of comparing locations so to determine wether a node lies or not within the transmission cell of another node. We do so by means of a function d(·, ·) which takes two locations and returns the distance separating them (the function d can be simply the euclidian distance between two locations, or a more complex function considering the possible obstacles of the surrounding environment). Probability distributions. A network M is defined as the parallel composition of pairwise-distinct nodes moving independently from each other. We denote by i∈I Mi the parallel composition of the networks Mi , for i ∈ I. In our framework, the mobility of the nodes is the only source of probability. We associate probability distributions with located nodes and model the probabilistic
320
L. Gallina et al. Table 2. Structural Congruence
n[[v = v]P, Q]l ≡ n[P ]l n[[v1 = v2 ]P, Q]l ≡ n[Q]l v1 = v2
(Struct Then) (Struct Else)
def
n[A˜ v ]l ≡ n[P {˜ v/˜ x}]l if A(˜ x) = P ∧ |˜ x| = |˜ v | (Struct M |N ≡ N |M (Struct (M |N )|M ≡ M |(N |M ) (Struct M |0 ≡ M (Struct
Rec) Par Comm) Par Assoc) Zero Par)
evolution of the network according to these distributions. More formally, we denote by μnl the probability distribution associated with the node n located at l, that is a function over the set Loc of locations such that, for all k ∈ Loc, μnl (k) = Jnlk denoting the probability that the node n located at l moves at the location k. Let M = i∈I ni [Pi ]li be a network, then for all k in I, M μnk denotes the lk
probability distribution over the set of networks induced by μnlkk and defined as follows: for all network M : nk μlk (lk ) if M = i∈I ni [Pi ]li with li = li ∀i = k M μnk (M ) = lk 0 otherwise
Note that M μnk (M ) is the probability that the network M evolves to M due lk
to the movement of the node nk located at lk . We say that M is in the support of M μnk if M μnk (M ) = 0. We write M Δ for the Dirac distribution on the lk
lk
network M , namely the probability distribution defined as: M Δ (M ) = 1 and M Δ (M ) = 0 for all M such that M = M . Finally, we let θ, θ range over {μnl | n is a node and l ∈ Loc} ∪ {Δ}. Reduction Semantics. The dynamics of the calculus is specified by the probabilistic reduction relation over networks (− →), described in Table 3. As usual in process calculi, it relies on an auxiliary relation, called structural congruence (≡), which is the least contextual equivalence relation satisfying the rules defined in Table 2. The probabilistic reduction relation takes the form M − →M θ , which describes a transition that leaves from network M and leads to a probability distribution M θ . Rule (R-Bcast) models the transmission of a tuple of messages v˜ to the set of intended recipients L using channel c and transmission radius r. Indeed, nodes communicate using radio frequencies that enable only message broadcasting (monopolizing channels is not permitted). However, a node may decide to communicate with a specific node (or group of nodes), this is the reason why we decided to associate with each output action a set of transmission recipients. The cardinality of this set indicates the kind of communication that is used: if L = ∞ then the recipients set is the whole network and a broadcast transmission is
A Probabilistic Energy-Aware Model for Mobile Ad-Hoc Networks
321
Table 3. Reduction Semantics
(R-Bcast)
n[¯ cL,r ˜ v .P ]l |
xi ).Pi ]li − →n[P ]l i∈I ni [c(˜
|
vi /˜ xi }]li Δ i∈I ni [Pi {˜
where 0 < r ≤ rn , ∀i ∈ I.d(l, li ) ≤ r and |˜ xi | = |˜ vi | (R-Move)
n[P ]l − →n[P ]l μnl (R-Struct)
(R-Par)
M− →M θ M |N − →M |N θ
M− →M θ M ≡ N M− →N θ
performed, while if L is a finite set (resp., a singleton) then a multicast (resp., a unicast) communication is realized. The recipients set indicates which are the nodes really interested in receiving that particular message, but we know that every message sent from a node will be potentially received by all the devices lying within the transmission cell of the sender. If two nodes want to share a secret, they must use cryptography to hide the message. A radius r is also associated with the channel c, indicating the transmission radius required for that communication which may depend on the energy consumption strategy adopted by the surrounding protocol. In our calculus transmission is a non-blocking action: transmission proceeds even if there are no nodes listening for messages. Rule (R-Move) deals with node mobility. A node n located at l and executing a moving action will reach a location with a probability described by the distribution μnl that depends on the Markov chain Jn statically associated with n. Movements are atomic actions: while moving, a node cannot do anything else. Since we are dealing with a probabilistic reduction semantics, which reduces networks into probability distributions, we need a way of representing the steps of each probabilistic evolution of a network. Formally, given a network M , we write M − →θ N if M − →M θ , and N is in the support of M θ . Following [4], an execution for M is a (possibly infinite) sequence of steps M − →θ1 M1 − →θ2 M2 .... In the rest of the paper, we write ExecM for the set of all possible executions starting from M , last(e) for the final state of a finite execution e, ej for the prifix execution M − →θ1 M1 ...− →θj Mj of lenght j of the execution e = M− → θ1 M 1 · · · − → θj M j − →θj+1 Mj+1 · · · , and e ↑ for the set of e such that e≤pref ix e . Given a network M and a probability distribution M θ , we write ∗ M− → M if there exists a finite execution e ∈ ExecM such that last(e) = M . Observational Semantics. The central actions of our calculus are transmission and reception of messages. However, only the transmission of messages can be observed. An observer cannot be sure whether a recipient actually receives a given value. Instead, if a node receives a message, then surely someone must have sent it. Following [8], we use the term barb as a synonymous of observable.
322
L. Gallina et al.
However our calculus presents both non-deterministic and probabilistic aspects, where the non-deterministic choices are among the possible probability distributions that a process may follow and arise from the possibility for nodes to perform arbitrary, unpredicatble, movements. → M θ } the set of the possible We denote by behave(M ) = {M θ | M − behaviours of M . In order to solve the non-determinism in a network execution, we consider each possible probabilistic transition M − → M θ as arising from a scheduler (see [10]). A scheduler is a total function F assigning to a finite execution e a distribution N θ ∈ behave(last(e)). Given a network M and a scheduler F , we define the set of executions starting from M and driven by F as: →θ 1 M 1 − →θ2 M2 ... | ∀j, Mj−1 − → Mj θj , Mj θj = F (ej−1 ) ExecF M = {e = M − and Mj θj (Mj ) > 0}. Formally, given a finite execution e = M − →θ1 M1 ...− →θk Mk starting from a network M and driven by a scheduler F we define F (e) = M1 θ1 (M1 ) · ... · Mk θk (Mk ) PM
where ∀j ≤ k, Mj θj = F (ej−1 ). We define the probability space on the executions starting from a given network M as follows. Given a scheduler F , σF ieldF M is the smallest sigma field on ExecF M that contains the basic cylinders e ↑, where F F e ∈ ExecF M . The probability measure P robM is the unique measure on σF ieldM F F such that P robM (e ↑) = PM (e). Given a measurable set of networks H, we denote by ExecF M (H) the set of executions starting from M and crossing a state in F j H. Formally ExexF M (H) = {e ∈ ExecM | last(e ) ∈ H for some j}. We denote the probability for a network M to evolve into a network in H according to the F F policy given by F as P robF M (H) = P robM (ExecM (H)). The notion of barb introduced below denotes an observable transmission with a certain probability according to a fixed scheduler. In our definition, a transmission is observable only if at least one location in the set of the intended recipients is able to receive the message. Definition 1 (Barb). We say that a network M has a barb on a channel c for a given scheduler F , written M ↓F c , if v .P ]l | N i) M ≡ n[¯ cL,r ˜ ii) there exists k ∈ L such that d(l, k) ≤ r iii) ∀e ∈ ExecF M such that last(e) = M F (e) = n[P ]l | N Δ . Definition 2 (Probabilistic Barb). We say that a network M has a probabilistic barb with probability p on a channel c according to the scheduler F , ∗ F written M ⇓F → M , M ↓F c }. p c, if P robM (H) = p where H = {M | M − Intuitively, for a given network M and scheduler F , if M ⇓F p c then there is a positive probability that M , driven by F , performs a transmission on channel c and at least one of the intended recipients is able to correctly listen to it. Hereafter, we introduce a probabilistic observational congruence, in the style of [4], which is parametric with respect to a set of schedulers F and is defined
A Probabilistic Energy-Aware Model for Mobile Ad-Hoc Networks
323
as the largest F-relation as follows. Let RF be a relation over networks: Barb preservation. RF is barb preserving if M RF N and M ⇓F p c for some F ∈ F
implies that there exists F ∈ F such that N ⇓F p c.
Reduction closure. RF is reduction closed if M RF N implies that for all F ∈ F, F there exists F ∈ F such that for all classes C ∈ N /RF , P robF M (C) = P robN (C). Contextuality. RF is contextual if M RF N implies that for every context C[·], it holds that C[M ] RF C[N ], where a context is a network term with a hole [·] defined by the grammar: C[·] ::= [·] | [·]|M | M |[·] . Definition 3 (Probabilistic observational congruence w.r.t. F ). Probabilistic observational congruence w.r.t. a set F of schedulers, written ∼ =F p , is the largest symmetric F-relation over networks which is reduction closed, barb preserving and contextual. Two networks are related by ∼ =F p if they exhibit the same probabilistic behaviour (communications) relative to the corresponding sets of intended recipients and the fixed set of schedulers F. In [2] we have developed a bisimulation-based proof technique for ∼ =F p . It provides an efficient method to check whether two networks are related by ∼ =F p .
3
Measuring Energy Consumption
In this section we define a preorder over networks which allows us to compare the average energy cost of different networks but exhibiting the same connectivity behaviour. For this purpose we associate an energy cost with the probabilistic reductions as follows: ⎧ → N Δ , M ≡ n[¯ cL,r ˜ v.P ]l | M ⎪ ⎨ r if M − and N ≡ n[P ]l | N for some c, L, v, l Cost(M, N ) = ⎪ ⎩ 0 otherwise. In other words, the energy cost to reach N from M in one single step is r if M can reach N after firing on a channel of radius1 r regardless of the message being transmitted is observable or not (or even lost). In the same way, if e = M0 − → θ1 M 1 − → θ2 M 2 · · · − →θk Mk is an execution then Cost(e) = k1=i Cost(Mi−1 , Mi ). Let H be a set of networks, we denote by Paths F M (H) the set of all executions from M ending in H and driven by F which are not prefix of any other exeF cution ending in H. More formally, Paths F M (H) = {e ∈ ExecM (H) | last(e) ∈ F H and ∀e such that e <pref ix e , e ∈ PathsM (H)}. Now, we are ready to define the average energy cost of reaching a set of networks H from the initial network M according to the scheduler F . 1
Note that considering the radius of the communication channel as the energy cost of the transmitted data is standard.
324
L. Gallina et al.
Definition 4. Let H be a set of networks. The average energy cost of reaching H from M according to the scheduler F is F e∈Paths F (H) Cost(e) × PM (e) F M CostM (H) = . F e∈Paths F (H) PM (e) M
The average cost is computed by weighting the cost of each execution by its probability according to F and normalized by the overall probability of reaching H. Definition 5. Let H be a countable set of sets of networks and F be a set of schedulers. We say that N is more energy efficient than M w.r.t. F and H, N F ,H M, if N ∼ =F p M and, for all schedulers F ∈ F and for all H ∈ H, there exists a F scheduler F ∈ F such that CostF N (H) ≤ CostM (H).
4
Analysing the SW-ARQ and GBN-ARQ Protocols
High speed data transmission is rapidly becoming an essential requirement of today’s wireless networks. Consequently, adaptive modulation and coding (AMC) techniques are increasingly being used in most of 2.5/3g wireless networks in order to increase the transmission rate. At the same time, a wireless channel is error prone due to fading and other propagation impairments. To address this issue, many control schemes have been proposed. In particular the automatic repeat request (ARQ)-based error control is considered as very attractive to counteract the residual errors without using costly error correction codes at the physical layer (see, e.g., [13,6]). However, portable communication devices must rely on batteries with limited energy to conduct communication. There are three main ARQ protocols: stop-and-wait (SW), go-back-N (GBN) and selective repeat (SR). In this section, we use our framework to analyse both SW-ARQ and GBN-ARQ protocols. First, we show that the protocols exhibit the same observational behaviour, that is they are bisimilar. Then, we compute and compare their energy consumption under various scenarios depending on the stability of the wireless channel. With respect to SW protocols, GBN takes advantage of the pipelining of the packets, i.e., a sequence of N packets can be sent without receiving any confirmation. This widely used technique is known to highly improve the throughput of the sender, but it is expensive from the energy consumption point of view [6] since correctly received packets may be required to be resent. Modelling the Protocols. We consider a single transmitter node using ARQ-based error recovery to communicate with a receiver node over a wireless channel. Transmissions occur in fixed-size time slots. Moreover, we restrict to a one time
A Probabilistic Energy-Aware Model for Mobile Ad-Hoc Networks
325
p l1
1-p
1-q
k
l2
q
Fig. 1. Topology of the network and mobility of s
slot. The SW-ARQ-based protocol transmits one packet per slot while the GBNARQ-based one transmits n packets (i.e., the full capacity of the channel). For both protocols, the transmitter continuously sends packets until it detects a transmission error through a NACK feedback. Here, we consider an error-free feedback channel2 and assume that the acknowledgment (ACK) or negative acknowledgment (NACK) of each transmitted packet arrives at the sender node one slot after the beginning of its transmission slot. Therefore, the feedback of a packet is received exactly after its transmission for the SW-protocol and in case of a failure (NACK), the packet is automatically resent. Instead for the GBNprotocol, a feedback for the ith packet arrives exactly after the transmission of the (i + n − 1)th packet and in case of a failure the transmission restarts from the ith packet. We model both SW-ARQ and GBN-ARQ-based protocols for a communication channel of capacity n = 3 in our framework. We consider a unique static receiver. In order to take into account the two states nature of the channel, we model the transmitter as a mobile node send (r, J s ) whose reachable locations are l1 , which represents the ”good state” of the channel, where the receiver lies within the transmission radius of the channel and l2 the ”bad state”, where the destination is no longer reachable (see Figure 1). The mobility of the sender is modelled by the two state Markov chain with the following transition probability matrix: p 1 − p J s = 1−q q where p and q are the probabilities of the stability of the node in its good and bad states respectively. In our analysis, we assume that the energy consumption of the feedback messages is negligible. Therefore, they are sent over channels with zero radius. For this reason the static receiver rec is located at l1 , i.e., at the same location of the sender in its good state, so that the feedback will be received with no cost. Note 2
A very standard assumption [6].
326
L. Gallina et al.
c ACK
rec
Sender bad
ci pi
c NACK
p1
ci pi
good
p2 p
p3 p3
p3 p3
p4 p4
p2
p3
p4 p 4
p5 p5
Receiver
send
Sender p1 send
rec
(a) Structure of the communications
p3
Receiver
(b) Example of GBN and SW behaviour
Fig. 2. Description and example of the network communications
that the sender still transmits over channels with radius r and thus consuming r energy for each fired packet. The process executed by rec, the receiver node, is the same for both protocols and modelled as the process RECi = ci (x).¯ cl1 ,0 ACK(i).RECi + 1 which upon receiving packet pi over the channel ci , sends ACK(i) over the channel c, then waits for the next packet on ci+1 . For each channel ci , we use a static auxiliary node bi (0, I) located at l2 , the bad state of the sender, capturing bad transmissions over ci . It executes the following process which upon receiving packet pi over the channel ci , sends N ACK(i) over the channel c: BADi = ci (x).¯ c∅,0 N ACK(i).BADi which upon receiving packet pi over the channel ci , sends N ACK(i) over the channel c. GBN-ARQ. Now we introduce the full model of the protocol GBN-ARQ. We start by modelling its sender node. Recall that, as a simplifying assumption, the channel capacity is 3. It executes the following process: GBi = c¯i ∅,r pi .c(x1 )ci+1 ¯ ∅,r pi+1 .c(x2 )ci+2 ¯ ∅,r pi+2 .c(x3 ) [x1 = N ACK(i)]GBi, SEN Di + 3, x2 , x3 where the process SEN D is defined as follows. SEN Di, x, y = c¯i∅,r pi .c(z)[x = N ACK(i − 3)]GBi − 3, SEN Di + 1, y, z Though that the feedback of a packet is received after the transmission of its two successors, for practical reason, we read a feedback of a packet right after sending it. Indeed, since we do not want feedback to be costly, both sender and receiver must be located at the same place when the feedback is sent. However, the sender node will verify it only after having sent the following two packets.
A Probabilistic Energy-Aware Model for Mobile Ad-Hoc Networks
327
Recall that the receiver node in our modelling above, reads each packet p1 on its specific channel ci . Thus, in the GBN, if the transmitter sends p1 while being in its good state, then moves to bad and sends p2 and finally moves back to the good state and sends p3 , then the later packet will not be read by the receiver as it is blocked on c2 . Then, the firing on c3 is lost and this models the fact that packets sent after a bad packet is just a wasting of energy. But since the sender process GBi is blocked on the feedback channel c, we introduce a static auxiliary node loose (0, I) located at l1 and executing the process: W AST = c¯∅,0 LOST .W AST The full model of GBN protocol is as follows. GBN = send[GB1]l1 | rec[REC1]l1 | loose[W AST ]l1 |
bi [BADi]l2 .
i≥1
SW-ARQ. Now on to the SW-ARQ-based protocol. This is very simple since it always sends one packet and waits for its feedback. The sender process is defined as follows. SW i = c¯i∅,r pi .c(x)[x = N ACK(i)]SW i, SW i + 1. The full protocol is then modelled as the network SW = send[SW 1]l1 | rec[REC1]l1 |
bi [BADi]l2 .
i∈I
Measuring the Energy Cost of the Protocols. This section presents the energy consumption of the above ARQ-based protocols. In order to compare the observational behaviours of the protocols, we assume that the communications over the feedback channel are observable for any observer node located at l1 . Thus the protocols are equivalent w.r.t. a set of schedulers F if for all schedulers F in F driving one of the protocols, there exists a scheduler F in F driving the other one such that both protocols correctly transmit the same packets with the same probabilities. Schedulers constitute an essential feature for modelling communication protocols as they provide freedom in modelling implementation and incomplete knowledge of the system. However, many schedulers could be in fact unrealistic. Consider for example schedulers giving priority to communication actions over movements of the nodes. Such schedulers cancel the two states nature of the communication channel since the latter remains in the same state until there is no longer available communication action. Thus, if the network started with a good channel then all the messages will be transmitted correctly without enduring any lost. In contrast, if it started with a bad channel, then it will be retransmitting indefinitely the first packet since the channel remains always bad. Though, that under such schedulers, both SW-ARQ and GBN-ARQ protocols behave exactly the same way in terms of our observability, they represent however unrealistic implementation scenarios. Therefore, we consider the following set of schedulers denoted Falt which:
328
L. Gallina et al.
1. always alternates between sending packets and node’s movement so that at each interaction of the transmitter with the channel, the later can be either good or bad; 2. gives priority to acknowledgment actions (ACK and NACK) to model the standard assumption of an error-free feedback channel; 3. allows interaction with the outside environment only through its observable actions so that we capture exactly the observable behaviour of the protocol. Under these assumptions, we can prove the following result which shows that both protocols exhibit the same observable behaviour. alt Proposition 1. GBN ≈F SW . p
We compare their energy efficiency in the context of the set H = {Hk | k ≥ 1} where Hk means that all the packets up to k have been correctly transmitted 2 and is defined as Hk = Hk1 ∪ HK where Hk1 = {M | M ≡ send[ck+1 ¯ ∅,r pk+1 .P ]l1 | rec[RECk + 1]l1 | loose[W AST ]l1 | i≥1 bi [BADi]l2 } for some process P and Hk2 = {N | N ≡ send[SW i + 1]l1 | rec[RECk + 1]l1 |
bi [BADi]l2 }.
i∈I
Then, we compute the energy consumption of the protocols assuming that we start by a move action at the good state so that the first message could be lost if it moves to the bad state3 . The results are summarized in the following propositions and illustrated in Figure 3. Proposition 2. If q = 1 then for all F ∈ Falt 1−p F CostSW (Hk ) = 1 + kr 1−q Proposition 3. If q = 1 then for all F ∈ Falt
CostF (H ) = kr p+ k GBN
(p − 1) (−1 + q)(1 + p2 − q + q 2 − p + 2pq) 1 − 2p2 + 2p2 q + 4q − 4q 2 + 2q 3 + 2p − 6pq + 4pq 2 · −p2 + p2 + (−p + pq)(−1 + 2q) + q(2 + −2q + q 2 )
These results can be derived by applying the Chapman-Kolmogorv’s forward equations to compute the probability of consecutive failures in the sending of the same packet. Each of these failures (except the first) causes the waste of a number of sent packets equals to the window size. It can be observed that the 3
The analysis for the other case is similar.
A Probabilistic Energy-Aware Model for Mobile Ad-Hoc Networks
(a) SW protocol
329
(b) GBN protocol
(c) costGBN (p, q) − costSW (p, q) Fig. 3. Energy cost functions for SW and GBN protocols and their comparison
number of wasted windows has a geometric distribution. Then, the mean of total packets sent to obtain a success, can be straightforwardly derived. To conclude this section, we note that while both protocols increasingly enjoy bad performance in term of energy consumption when the channel deteriorates, i.e., when q is increasing (see Figures 3-(a) and 3-(b)), the GBN protocol deteriorates faster. Indeed, as illustrated by Figure 3-(c) as the channel deteriorates the additional energy required by GBN protocol to correctly transmit the same number of packets increases to infinite. Thus, the gain of having a high throughput results in a very high energy consumption.
5
Conclusion
We presented the Probabilistic E-BUM calculus for modeling both connectivity and energy-aware properties of mobile ad-hoc networks. As a future work we plan to develop an observational preorder which, in one bisimulation step, checkes both observational equivalence and energy-aware preordering. We also plan to extend the model with different metrics and apply it for measuring the level of both sender- and receiver-centered interference.
330
L. Gallina et al.
References 1. Bernardo, M., Bravetti, M.: Performance measure sensitive congruences for markovian process algebras. Theoretical Computer Science 290(1), 117–160 (2003) 2. Gallina, L., Hamadou, S., Marin, A., Rossi.S.: A probabilistic energy-aware model for mobile ad-hoc networks. Research Report DAIS-2011-3, Department of Computer Science. University Ca’ Foscari of Venice (2011) 3. Gallina, L., Rossi, S.: Sender- and receiver-centered interference in wireless ad hoc networks. In: Proc. of IFIP Wireless Days 2010. IEEE Computer Society Press, Los Alamitos (2010) 4. Goubault-Larrecq, J., Palamidessi, C., Troina, A.: A probabilistic applied pi– calculus. In: Shao, Z. (ed.) APLAS 2007. LNCS, vol. 4807, pp. 175–190. Springer, Heidelberg (2007) 5. Hillston, J.: A Compositional Approach to Performance Modelling. Cambridge University Press, Cambridge (1996) 6. Le, L.B., Hossain, E., Zorzi, M.: Queueing analysis for gbn and sr arq protocols under dynamic radio link adaptation with non-zero feedback delay. IEEE Transactions on Wireless Communications 6(9), 3418–3428 (2007) 7. Priami, C.: Stochasticπ-calculus. The Computer Journal 38(7), 578–589 (1995) 8. Milner, R., Sangiorgi, D.: Barbed bisimulation. In: Kuich, W. (ed.) ICALP 1992. LNCS, vol. 623, pp. 685–695. Springer, Heidelberg (1992) 9. Ross, S.M.: Stochastic Processes, 2nd edn. John Wiley & Sons, Chichester (1996) 10. Segala, R., Lynch, N.A.: Probabilistic simulations for probabilistic processes. In: Jonsson, B., Parrow, J. (eds.) CONCUR 1994. LNCS, vol. 836, pp. 481–496. Springer, Heidelberg (1994) 11. Singh, S., Woo, M., Raghavendra, C.S.: Power-aware routing in mobile ad hoc networks. In: Proc. of the 4th annual ACM/IEEE International Conference on Mobile Computing and Networking (MobiCom 1998), pp. 181–190. ACM Press, New York (1998) 12. Song, L., Godskesen, J.C.: Probabilistic mobility models for mobile and wireless networks. In: Calude, C.S., Sassone, V. (eds.) TCS 2010. IFIP Advances in Information and Communication Technology, vol. 323, pp. 86–100. Springer, Heidelberg (2010) 13. Zorzi, M., Rao, R.R.: Error control and energy consumption in communications for nomadic computing. IEEE Transactions on Computers 46(3), 279–289 (1997)
Size-Based Flow-Scheduling Using Spike-Detection Dinil Mon Divakaran1, , Eitan Altman2 , and Pascale Vicat-Blanc Primet3, 1
IIT Mandi; Phone: +91-1905237921, Fax: +91-1905237942 [email protected] 2 INRIA; Phone: +33-492387786, Fax: +33-49238785 [email protected] 3 LYaTiss; Phone: +33-472728802, Fax: +33-472728080 [email protected]
Abstract. Size-based scheduling is a promising solution to improve the response time of small flows (mice) that have to share bandwidth with large flows (elephants). To do this, one important task is to track the size of the ongoing flows at the router. However, most of the proposed size-based schedulers either employ the trivial way of tracking the size information of all flows, or require changes at end-hosts. Hence, either they are not scalable or they increase complexity. This paper proposes a new way of performing size-based scheduling in a practical and scalable fashion, by identifying and ‘de-prioritizing’ elephants only at times of high load. We exploit TCP’s behaviour by using a mechanism that detects a window of packets — called spikes — when the buffer length exceeds a certain threshold. This spike-detection is used to identify elephant flows and thereafter de-prioritize them. Two-level processor-sharing (TLPS) scheduling is employed to schedule flows in two queues, one with the highpriority flows, and the other with the de-prioritized flows. We perform studies, using both analyses and simulations, to highlight the properties of the spike-detection mechanism. We show that, the proposed mechanism not only improves the response time of mice flows in a scalable way, but also gives better response times to other flows by treating them preferentially as long as they do not overload the high-priority queue. Keywords: Queueing, Scheduling, Flows, Networks, Performance modelling.
1
Introduction
The flow-size statistics in the Internet reveal strong heavy-tail behaviour — a small percentage of flows (large in size) contribute to a large percentage of the
Corresponding author. This work was carried out when the author was affiliated with INRIA. This work was done in the framework of the INRIA and Alcatel-Lucent Bell Labs Joint Research Lab on Self Organized Networks.
K. Al-Begain et al. (Eds.): ASMTA 2011, LNCS 6751, pp. 331–345, 2011. c Springer-Verlag Berlin Heidelberg 2011
332
D.M. Divakaran, E. Altman, and P. Vicat-Blanc Primet
Internet’s traffic volume. It is also referred to as the mice-elephant phenomenon, where 80% of the flows that contribute to 20% of the traffic are called mice flows, and the remaining 20%, the elephant flows. Examples of mice (small) flows include tweets, chats, web queries, HTTP requests, etc., for which users expect very short response times; while elephant (large) flows are usually the downloads that run in the background (say, a kernel image or a movie), the response times for which are expected to be higher than that for the mice flows by orders of magnitude. The current Internet architecture has a FCFS server and a drop-tail buffer at most of its nodes (routers and switches). This along with the fact that most of the flows in the Internet are carried by TCP [7], hurt the response times of mice flows adversely. Specifically, it can be argued that the current TCP/IP architecture is biased against small TCP flows, for the following reasons: – As mice flows do not have much data, they almost always complete in the slow-start (SS) phase, never reaching the congestion-avoidance phase; and thus typically having a small throughput. – A packet loss to a small flow most often results in a time-out due to the small congestion window (cwnd) size; and time-outs increase the completion time of small flow many folds. – The increase in round-trip-time (RTT) due to large queueing delays hurts the small flows more than the large flows. For the large flows, the large cwnd makes up for the increase in RTT; whereas, this is not the case for small flows and is quite perceivable. The biases against mice flows become more relevant today, with recent studies showing an increase in the mice-elephant phenomenon, with a stronger shift towards a 90-10 rule [3]. Solutions to this problem can be grouped into a class of priority scheduling mechanisms based on flow size. These size-based schedulers give priority to ‘potential’ small flows over the large flows. An important task in size-based scheduling systems, is therefore, to identify and distinguish between mice and elephant flows. The trivial way of tracing the sizes of all flows is simply not scalable with increasing traffic, as flow-size tracking requires the maintenance of a flow-table, with the size-counter being updated/initialized on the arrival of every packet. Hence, the existing solutions face a roadblock when it comes to implementation, as most of them depend on tracing the sizes of all flows. Other known alternative is complex — [2] proposed a an implementation of the PS+PS strategy, by modifying the TCP protocol at end-hosts. This leads to other complications and unintended consequences, like reducing the randomness of initial sequence numbers, besides making it depend on end-host adaptations. This work proposes a new way to perform size-based scheduling in a scalable way, taking a deviation from the conventional way of needing to track the size of flows. The proposed mechanism exploits the TCP behaviour during SS phase to detect and de-prioritize large flows, so as to give preference to small flows. We call the burst of packets in a congestion window that arrives at a bottleneck router a spike. This paper explores a mechanism to detect large flows, by detecting spikes with corresponding large sizes — indeed we call it spike-detection. The
Size-Based Flow-Scheduling Using Spike-Detection
333
spike-detection mechanism detects large flows at times of ‘high’ load, and deprioritizes them instantly. We show that, this along with a TLPS scheduling of flows, improve the response time of small flows, and also of other flows as long as the buffer length is below a certain threshold. We detail on how to perform size-based scheduling using the new spikedetection mechanism in section 2, before discussing on the related works in section 3. The spike-detection mechanism is elaborated in section 4. In section 5, we present an integrated spike/packet model using fixed point approach. The performance of this new system is analyzed using simulations, the goals and settings of which are stated in section 6. The performance analysis and discussion of results are done in section 7.
2
Size-Based Scheduling Using Spike-Detection
We assume that a TCP flow either – completes in its exponential-growth phase without any loss until completion (i.e., in the SS phase), or, – experiences loss(es) and reduces its cwnd. In the latter case, it will complete in either the SS phase or the congestionavoidance phase depending on the kind of loss experienced. The emphasis here is that, the initial exponential growth of a flow is not limited by the value of ssthresh, but due the network bandwidth. As the capacity of the network core and that of the access links increase, it is reasonable to assume end-hosts will tune the TCP parameters lest the exponential-growth phase is clamped due to a limiting value of ssthresh. Next we explain the system, referred from now on as TLPS/SD, with two important modules: (1) spike-detection (SD) mechanism, and (2) two-levelprocessor-sharing (TLPS) scheduling. The physical queue at the router is divided into two virtual queues, Q1 and Q2 . Each queue schedules flows using processor-sharing (PS) discipline. Strict priority scheduling is assumed between the two queues, with Q1 having the higher priority. The queue Q1 is served at line capacity C; whereas, Q2 is served only when Q1 is empty. The decision on where to queue an arriving packet is based on the following — if it belongs to a large flow, it is sent to Q2 ; or else to Q1 . The mechanism for classifying a flow as large is using the spike-detection mechanism. The spikedetection mechanism is triggered only when the length of Q1 , in packets, exceeds a certain pre-defined value β. Once a flow is detected as large, it is de-prioritized, and all the further packets of the flow are sent to the low-priority queue, Q2 .
3
Related Work
Size-based scheduling strategies can be classified into two, based on whether the strategies have knowledge of the flow size (flow service demand) in advance or not. They are anticipating and non-anticipating strategies.
334
D.M. Divakaran, E. Altman, and P. Vicat-Blanc Primet
Anticipating Strategies: These assume knowledge of flow size on its arrival to the system. One such policy is the shortest-remaining-processing-time (SRPT) policy, which always serves the flow in the system that needs the shortest remaining service time. SRPT is known to be optimal among all policies with respect to the mean response time1 [12]. The improvement of the response time brought by SRPT, over PS, becomes striking with the variability in the service time distribution. SRPT scheduling has been used effectively in web servers [6]. The disadvantage of the policy comes from the need to anticipate the flow size. While this information is available in web servers, schedulers in routers do not have prior knowledge of the size of an arriving flow. Non-Anticipating Strategies: These policies instead use the ongoing size, or age, of a flow for taking scheduling decisions. The ongoing size of the flow is the size it has attained until the current scheduling instance. In the following, we review some important non-anticipating scheduling strategies. Foreground-Background (FB) or LAS Scheduling: FB policy gives priority to the flow that has the minimum ongoing size among all the competing flows, and serves it before serving any other flow [9]. FB policy is shown to be optimal with respect to the mean response time when the distributions have decreasing hazard rate (DHR) [13]. The policy has been studied for flows at a bottleneck queue, in the name of LAS (least-attained-service) [11]. LAS not only decreases the delay and the loss rate of small flows compared to an FCFS packet scheduler with drop-tail buffer, but causes negligible increase in delay for large flows. But the implementation of LAS requires the knowledge of the running number of the packets of each flow, so as to find the youngest ongoing flow. This, along with the other drawbacks, such as unfairness and scalability issue, have motivated researchers to explore other means of giving priority to small flows, one such being the PS+PS model proposed in [2]. PS+PS Scheduling: The PS+PS scheduling uses two PS queues, with priority between them [2]. The first θ packets of every flow are served in the high-priority queue, say Q1 , and the remaining packets (if any) are served in the low-priority queue, say Q2 . Hence all flows of size less than or equal to θ get served in the high-priority queue. Q2 is served only when Q1 is empty. The mean of the flow size distribution thus turns out to be the mean of the truncated distribution. It is proved that the PS+PS model reduces the mean overall response time (E[T ]) in comparison to PS, for the DHR class of distributions. In addition, the authors proposed an implementation of this model; but it relies on TCP sequence numbers, requiring them to start from a set of possible initial numbers. This not only makes the scheme TCP-dependent, but also reduces the randomness of initial sequence numbers that TCP flows can have. MLPS Discipline: The PS+PS model can be seen as a specific case of the multilevel-processor-sharing (MLPS) discipline [8]. In the context of prioritizing small flows, [1] demonstrates that the mean delay of a two-level MLPS can be close to 1
We often use ‘mean completion time’ to refer to the same’.
Size-Based Flow-Scheduling Using Spike-Detection
335
that of FB in the case of Pareto and hyper-exponential distributions, belonging to the DHR class. An ideal implementation of an MLPS discipline would require the size information of flows in the system. Sampling and Scheduling: An intuitive way to track large flows is is to use (real-time) sampling to detect large flows (thus classifying them), and use this information to perform size-based scheduling. SIFT, proposed in [10], uses probabilistic sampling [14], along with the PS+PS scheduler. A flow is ‘small’ as long as it is not sampled. All such undetected flows go to the higher priority queue until they are sampled. This system was analyzed using ‘average delay’ (average of the delay of all small flows, and all large flows) for varying load, as a performance metric. Though it is an important metric, it does not reveal the worst-case behaviours in the presence of sampling. This is more important here, as the sampling strategy has a disadvantage: there can be false positives; i.e., small flows if sampled will be sent to the lower priority queue. Deviating from this simple strategy, [4] proposed to use a threshold-based sampling, derived from the well-known ‘Sample and Hold’ strategy [5], along with PS+PS scheduling. In this policy, the size of a sampled flow is tracked until it crosses a threshold. This threshold can be the same as used in PS+PS scheduling to ensure that there are no false positives, but only false negatives. Though this reduces the number of packet processing required to track flows, by an order of magnitude, we later show that the performance attained by flows are better under TLPS/SD policy.
4
Spike-Detection Mechanism
As discussed earlier, we exploit the behaviour of TCP flows during SS phase to detect large flows. We refer to cwnd, the congestion window of a TCP flow, during the SS phase as ‘spike’. That is, the size of a spike is the size of cwnd during the SS phase. The size of a TCP flow with spike size 2η , is at least η i η+1 − 1. We define a large flow as a flow that has a spike size greater i=0 2 = 2 η than 2 packets. That is, all flows with size greater than or equal to 2η+1 packets are large flows. Note that (irrespective of whether the spike is detected or not) this definition of elephant flows is similar to that found in literature; i.e., flows with sizes beyond a pre-defined threshold are elephant flows. The next question is, ‘how is a spike of size 2η detected?’. We focus on an outgoing bottleneck link at a router. For the model, we assume the queue Q1 to be of infinite size. Further, we assume that a TCP sender sends an entire cwnd at one go. This is a fair assumption for windows of moderate sizes. On parameters η and β, the values are such that, 0 < 2η < β. To understand the system, consider the end of an idle period in Q1 . Let η = 4. A new (TCP) flow joins the system. The flow is initially sent to Q1 , where it comes with one packet in the first round. The packet is not dropped at the bottleneck in focus (as β > 2η ); therefore (and assuming it does not get dropped anywhere else in the path), the sender receives acknowledgement for the packet. So, in the next round (the next RTT), it sends two packets, in the third round
336
D.M. Divakaran, E. Altman, and P. Vicat-Blanc Primet
four packets, and so on and so forth until Q1 starts building up. In the case of a single flow, the sender has to have a higher capacity than the bottleneck link for the queue to build up. Once the queue length exceeds β packets, the detection mechanism inspects the packets in the queue. Since β > 2η , the single flow contributed to more than 2η packets, and hence gets classified as a large flow, and is de-prioritized. This de-prioritization involves two steps: (i) the flow is tagged as ‘large’, and (ii) all the further packets of this large flow will be directed to Q2 . If there were multiple new flows that entered the system, then there is a possibility that no flow has more than 2η packets in the buffer even when the buffer length exceeded β packets. In this scenario, none of the flows get classified as large flow. Out of these, the small flows will complete before being able to send more than 2η packets. But, the large flows will continue (in their SS phases) coming with double the window size every round, thereby increasing the probability of getting detected. In the worst case, a large flow will go undetected until a maximum window size of β is reached. After that, it single-handedly causes the queue length to exceed β packets, thereby getting detected and de-prioritized. Observe that, if all the flows that cause the queue build-up were small, then they would share the bandwidth equally and complete in Q1 . In reality, a large burst of small flows might cause a finite-size queue to overflow. For large buffers this can be taken as a rare event; otherwise, the flow whose packet gets dropped switches to congestion-avoidance phase, and continues in Q1 , until its window size gets detected. Now, let us trace the cwnd of a new flow. The cwnd increases exponentially every RTT interval. If the size of the flow is less than 2η+1 , the cwnd does not go higher than 2η (even if it enters congestion-avoidance phase). Every flow that has a size greater than or equal to 2η+1 , will fall in either of the following: – Completes in Q1 : In this scenario, the flow does not cause the buffer to exceed β packets; or in other words, the flow never gets tagged as large. Hence it continues and completes in the SS phase. Obviously, this set of flows do not have cwnd greater than β packets. Therefore the maximum size of flows that complete during the SS phase is 2β − 1. – Completes in Q2 : This happens when the flow gets detected as large at some point during its life-time in Q1 , and henceforth gets its remaining packets to be queued in Q2 . No flow of size less than 2η+1 comes to this queue. Besides, the first 2η+1 packets (and possible more) of every flow that arrived at Q2 , were served in Q1 . Note that, for de-prioritizing a flow detected and tagged as ‘large’, a flow-table is essential. This flow-table contains a flow identifier — a hash function of the common five-tuple of source and destination IP addresses, source and destination port addresses and protocol — and a field called on, a boolean, indicating if the flow is ‘on’ and not completed, in the considered interval. At the beginning of every interval, for each entry in the table, the on field is set to 0. An arriving packet that has a matching flow-id in the table, sets the corresponding on field to 1, if not already so. At the end of the interval, only those flows with on = 1,
Size-Based Flow-Scheduling Using Spike-Detection
337
are retained; others are removed. The length of the interval should be set to a value that corresponds to the mean off-time of flows.
5
Integrated Packet/Spike Model
In this section, we model the high-priority queue using fixed point approach. First, we formulate the throughput of the queue Q1 where arrivals and services are in spikes. Next, we model Q1 at packet level; and finally, we integrate both the models to obtain solution for throughput at Q1 as a function of the threshold β for Q1 . 5.1
Spike Level
Here we model Q1 , as a ‘spike queue’, where data arrive and get serviced as spikes. The spike arrivals are correlated, as the arrival of a spike of size 2x of a flow is possible only if none of the previous sizes (2i , i = 0 . . . x − 1) is not detected (and hence sent to Q2 ). Similarly, the spike-size distribution is also dependent on the detection process. For simplicity, we assume β to be a power of 2. Let P1 (y) denote the probability that a spike of size 2y packets is not detected. Similarly, let P2 (y) denote the probability that none of the spikes with sizes greater than 2η packets and less than or equal to 2y packets is detected. Let F denote the cumulative distribution of flow sizes (in packets). The spikeˆ can be derived from the flow-arrival rate λ, and the number of arrival rate, λ, spikes brought by the flows. ˆ =λ× λ
η+1 F (2i − 1) − F (2i−1 − 1) .i + (1 − F (2η+1 − 1)).η i=1
2β−1
+
⎛
(F (x) − F (x − 1)) ⎝
+
2β−1
⎞ P2 (j).(j − η)⎠
j=η
x=2η+1
+
log(x+1)
(F (x) − F (x − 1)) P2 (log(x + 1))P1 (γ)
x=2η+1 ∞
α
x=2β
j=η
(F (x) − F (x − 1))
P2 (j).(j − η)
(1)
where α = log(β), and γ = x − 2log(x+1) . The first term in the above equation is the number of spikes contributed by all flows with sizes not greater 2η+1 −1. All flows with sizes greater than 2η+1 −1 will contribute at least η spikes, and is accounted in the second term. The last three terms take the correlation of spikes into consideration. The third and fourth terms account for the spikes generated by flows of size between 2η+1 − 1 and
338
D.M. Divakaran, E. Altman, and P. Vicat-Blanc Primet
2β − 1, conditioned that a spike of a specific size arrives at Q1 only if all the spikes of lower sizes also arrived at Q1 . The same applies to the last term. The mean spike-size, E[S], is obtained from the flow-size distribution, with dependence on when the flow gets detected; as once a flow is detected no more spike from that flow arrives at Q1 .
2η+1 −1
E[S] = 0
2β−1
+ 2η+1 −1
F (x).xdx + 1 − F (2η+1 − 1) .(2η+1 − 1) ⎛ ⎞ log(x+1) F (x) ⎝ 2y .P2 (y)⎠ dx y=η+1
2β−1
+ 2η+1 −1
α
+
F (x) (P2 (log(x + 1)).P1 (γ).γ) dx ∞
2y .P2 (y)
F (x)dx
(2)
2β−1
y=η+1
The throughput at Q1 , given the line capacity C, can be written as,
tT = 5.2
λ E[S] . C
(3)
Packet Level
The queue Q1 is modeled at the packet-level as an M X /M/1 queue. That is, services are in packets, and arrivals are in batches, where a spike is taken as a batch of packets. The batch size X being geometrically distributed; P r(X = k) = q(1 − q)k−1 ,
(4)
where 0 < q < 1. The value for q is set such that, 1/q = E[S]. The batch-arrival ˆ the spike-arrival rate. The mean packet-arrival process is Poisson with rate λ, ˆ rate is λ/q. Therefore, the load of this queue, ρ = tT . The probability that the length of the buffer exceeds l packets, P(Q > l), is a function of pi , the probability that there are i packets in the queue. P(Q > l) =
∞ i=l+1
pi =
∞
ρ {q(1 − ρ)} {1 − q(1 − ρ)}
i−1
i=l+1 l
= ρ{1 − q(1 − ρ)} .
(5)
Given η and β, the probability of not detecting a spike of size 2y packets, ⎧ if 2y ≤ 2η ; ⎨1 y P1 (y) = 1 − P(Q > β − 2 ) if 2η < 2y ≤ β; (6) ⎩ 0 if 2y > β.
Size-Based Flow-Scheduling Using Spike-Detection
339
Next, the probability that none of the spikes of sizes greater than 2η and less than or equal to 2y gets detected is, y 0 if 2 > β; (7) P2 (y) = y k k=η+1 1 − P(Q > β − 2 ) otherwise. 5.3
Integrated Model
Equations (1) and (2) increase in (both) P1 and P2 ; and P1 and P2 decreases in P(Q > l). Therefore, tT is a decreasing function, say g, of P; tT = g(P). Now, P in Eq. (5) can be re-written as, P(Q > l) = tT {1 − q(1 − tT )}l To solve by iteration, the above two equations can be written as, m tm T = g(P ),
and,
l
m P m+1 (Q > l) = tm T {1 − q(1 − tT )} .
Therefore the throughput in Q1 , and hence the mean response times of flows completing on Q1 , is dependent on the parameter β, besides the arriving load.
6 6.1
Simulations: Goals and Settings Goals
The goal of the simulations is mainly to evaluate the performance of the TLPS scheduler using spike-detection mechanism. Precisely, we would like to compare it with the following policies: – FCFS: A router today usually has a FCFS scheduler serving packets arriving at the drop-tail buffer. We use ‘FCFS’ to denote this system. – PS+PS: This policy uses a threshold θ, to differentially serve large and small flows (as discussed in section 3). – SB-TB: This mechanism uses both sampling and PS+PS scheduling. It uses the threshold parameter θ, as well as the per-packet sampling probability ps . Unlike most previous works, where the performance was analyzed using just one metric (usually the conditional mean response time), we consider the following different metrics: 1. Conditional mean completion time of small flows; 2. Number of time-outs encountered by small flows; 3. Number of times the congestion windows were reduced (congestion cuts) by all flows; 4. Mean completion time for range of flow sizes; 5. Mean completion time for small flows, large flows and all flows; 6. Maximum completion time of small flows.
340
6.2
D.M. Divakaran, E. Altman, and P. Vicat-Blanc Primet
Settings
Simulations are performed using NS-2. A dumbbell topology as seen in Fig. 1(a) was used throughout. The bottleneck link capacity was set to 1 Gbps, and the capacities of the source nodes were all set to 100 Mbps. The delays on the links were set such that the base RTT (consisting of only propagation delays) is equal to 100 ms. The size of the bottleneck queue is set in bytes, as the bandwidth delay product (BDP) for 100 ms base RTT. There were 100 node pairs, with the source nodes generating flows according to a Poisson traffic. The flow arrival rate is adapted to have a packet loss rate of around 1.25% with FCFS scheduler and drop-tail buffer. Flow sizes are taken from a Pareto distribution with α = 1.1, and mean flow size set to 500 KB. 20, 000 flows are generated during each run, all carried by TCP, in particular, using the SACK version. Packet size is kept constant and is equal to 1000 B. For simplicity, we keep the parameters of TLPS/SD mechanism η and β, as well as the threshold θ used in PS+PS and SB-TB policies, in packets. η is set to 4. The other parameter of interest, θ, of both PS+PS and SB-TB policies, is set to 31 packets. Packet sampling probability (used in SB-TB policy), ps = 1/100. The value of β was set to 200 packets to reduce the number of packet processing required for the mechanism, and this is discussed in Section 7.1. For post-simulation analysis, we define ‘small flow’ as a flow with size less than or equal to 20 KB, and ‘large flow’ as one with size greater than 20 KB. Here the flow size is the size of data generated by the application, not including any header or TCP/IP information. Also note that, a small flow of 20 KB can take more than 25 packets to transfer the data, as it includes control packets (like SYN, FIN etc.) and retransmitted packets.
7 7.1
Performance Analysis Efficiency
In this section, we analyze the efficiency of the TLPS/SD mechanism. For now, in the SD mechanism, we assume the following sequence order at an equipment: arriving spikes are queued, the queue length is observed, if its greater than β, the spike-detection mechanism is triggered. That is, the mechanism is triggered only at instants of spike-arrivals causing actual length to exceed β packets. This means, the maximum number of packets before the spike arrived is not greater than β. The spike that arrived just then, has packets that belong to a single flow; hence header processing is done only once, and so is the creation/update of flow-table entry. But, for each of the packets in the queue, which is not greater than β, flow-table lookup and creation/update has to be done. At the packet level, the probability that the queue length exceeds l packets is P(Q > l). Due to PASTA property, an arriving batch in M X /M/1 queue, finds the queue length greater than l with the same probability, P(Q > l). Triggering of the SD mechanism will result in the processing of (headers of) all the packets
Size-Based Flow-Scheduling Using Spike-Detection 0.35
ρ = 0.1 ρ = 0.2 ρ = 0.3 ρ = 0.4 ρ = 0.5
Router
Router src 1 src 2
C2
C1
dst 1
C2
dst 2
C C n−1
src
n−1 C n
Bottleneck
Mean packets processed
0.3
C1
C n−1 Cn
341
0.25 0.2 0.15 0.1 0.05
dst
0 100
n−1
dst n
src n
150
200
250 300 350 β (in packets)
400
450
500
(a) Topology used for simulations (b) Mean number of packets processed as a function of β Fig. 1.
in the queue as well as the arriving batch. Given the probability of batch size as in in Eq. (4), the mean number of packets processed per arriving batch is, ⎛ ⎞ i=∞ ∞ P r(X = i) × ⎝ π(j)⎠ (j + i) (8) E[N ] = i=1
j=β
We take the mean number of packets processed (per arriving packet) as E[N ]/E[X], where E[X] is the mean batch size. Fig. 1(b) plots the mean number of packets processed per packet, during the spike-detection process, for varying values of β. The batch size was set to 20. Observe that, the mean number of packets processed can be brought down by increasing the value of β for a given load. For example, for β = 200 packets, the number of packets processed is less by at least an order of magnitude in comparison to the number of packets that arrive to the system. Validation Using Simulations: Simulations were carried out to validate the analysis above, with the scenario as described in Section 6.2. η was set to 4; and the value of β was set to 100, 200, 300 and 400 packets, in different runs. It was noted that 29.93% of the packets that arrived were processed for spike detection, when β was 100; whereas, only less than 3.1% of arriving packets were processed for β = 200, and the percentage remained close for the other values of β (300 and 400 packets). We therefore set β = 200 for analysing the performance of small flows. The figures following are obtained from simulations. 7.2
Analysis Using Flow Metric
Fig. 2(a) shows the conditional mean response time for small flows. Observe that, all policies perform better than FCFS with respect to this metric. TLPS/SD performs similar to PS+PS for small flows. Another important observation is that
342
D.M. Divakaran, E. Altman, and P. Vicat-Blanc Primet
TLPS/SD performs better than both PS+PS and SB-TB policies, for medium size flows with size greater than the threshold θ. PS+PS policy soon approaches FCFS with increasing flow size, though the flow sizes are not large. This happens as PS+PS serves all flows with size greater than θ in the low-priority queue, once the first θ packets are served in the high-priority queue. SB-TB policy serves a flow in the high-priority queue until the flow not only gets sampled but also sends θ packets after being sampled; hence giving better performance to medium-size flows in comparison to PS+PS. On the other hand, in TLPS/SD, a flow can be served in the high-priority queue as long as the queue Q 1 does not build up to greater than β packets. Therefore, some of the medium-size flows may get served in the high-priority queue, decreasing the corresponding mean response time. FCFS PS+PS SB-TB TLPS/SD
3
Mean completion time (in seconds)
Mean completion time (in seconds)
3.5
2.5 2 1.5 1 0.5 0 0
50 100 150 200 Flow sizes (in packets of 1000 B)
(a) small flows
250
160
FCFS PS+PS SB-TB TLPS/SD
120
80
40
0 100
1000 10000 100000 Flow sizes (in packets of 1000 B)
1e+06
(b) large flows
Fig. 2. Conditional mean completion time for large flows
Fig. 2(b) shows that large flows are not harmed by giving priority to small flows. But, from Fig. 3, which plots the mean response time for different ranges of flow sizes, it can be seen that TLPS/SD gives improved response time to small flows at the expense of large flows. Large flows experience the worst mean delay in TLPS/SD policy. This is expected, as the scheduling policies used here are work-conserving in nature. Once again, note that TLPS/SD gives reduced completion time for small and medium-size flows, in comparison to the rest. Next we show the maximum completion time faced by flows of a given size. For clarity, it is displayed in two figures: Fig. 4(a) and Fig. 4(b). Fig. 4(a) compares FCFS with TLPS/SD. Evidently, flows under FCFS experience high variance in the maximum completion time. In Fig. 4(b) (along with Fig. 4(a)) we see that TLPS/SD performs better than not only FCFS, but also PS+PS and SB-TB policies, when it comes to the worst-case delay faced by small flows. Observe that, under PS+PS policy, flows with sizes near to, but greater than the threshold can experience maximum delays that are not better than in FCFS. This happens as the last few packets of these flows are queued in the low-priority queue Q1 once the threshold is exceeded. If Q2 has large queue length, it can cause time-outs to these small flows, thereby increasing the response times many fold. Similar explanation goes for SB-TB policy, in particular for flows that get sampled early in their life-times.
Mean completion time (in seconds)
Size-Based Flow-Scheduling Using Spike-Detection
343
FCFS PS+PS SB-TB TLPS/SD 10
1
0.1 <20
20-200 200-2000 2000-20000 >20000 Range of flow sizes (in packets of 1000 B)
7
FCFS TLPS/SD
14
Maximum completion time (in seconds)
Maximum completion time (in seconds)
Fig. 3. Mean completion time
12 10 8 6 4 2
PS+PS SB-TB TLPS/SD
6 5 4 3 2 1 0
0 0
20
40
60
80
100
Flow sizes (in packets of 1000 B)
(a) FCFS and TLPS/SD
120
0
20
40
60
80
100
120
Flow sizes (in packets of 1000 B)
(b) PS+PS, SB-TB and TLPS/SD
Fig. 4. Maximum completion time
Table 1 compares other metrics. For each policy, the table lists the number of timeouts faced by small flows in the first column, the total number of cwnd cuts in the second column, and the mean completion times (indicated by CT ) for small, large and all flows in the remaining three columns. A note on the second metric: sum CC (standing for ‘Congestion Cuts’) gives the total number of times all the flows reduced their congestion windows during their lifetimes. The table shows that TLPS/SD policy reduces the number of timeouts encountered by small flows, in comparison to other policies. The reason for this is, in the spike-detection mechanism, many flows that have sizes near, but greater than 2η+1 also enjoy service in Q1 . For example, all flows of size below 48 packets, are served in Q1 even if some of them have size greater than 2η+1 for η = 4. This is because such flows do not have a spike greater than 2η packets. One may get comparable performance using PS+PS by increasing its threshold θ. Now, observe the values of the second metric — sum CC — for the policies. As congestion cuts are equivalent to congestion signals, we can say that, flows face the largest number of congestion signals in PS+PS policy, even more than
344
D.M. Divakaran, E. Altman, and P. Vicat-Blanc Primet Table 1. Comparison of different metrics small TOs FCFS 579 PS+PS 416 SB-SH 460 TLPS/SD 311 Metrics
sum CC 9988 12710 8949 7110
small CT 0.8432 0.4355 0.4377 0.4246
large CT 2.3294 2.0627 1.6299 1.6504
all CT 1.9022 1.5950 1.2872 1.2981
FCFS. The reason for this is the same as said earlier — all the medium-size (and even small-size) flows with size starting from just above θ, join the tail of the low-priority queue soon after having sent the first θ packets. During high-loads, when the low-priority queue is building up, they may face packet drops. This does not happen so deterministically in neither SB-TB nor in TLPS/SD. In SBTB policy, it depends on when the flow gets sampled, and in TLPS/SD such flows will be de-prioritized only when the length of Q1 exceeds β packets; and the build-up of Q1 is not influenced by the load at Q2 . This performance gain is also emphasized in Fig. 3. TLPS/SD is also seen to give the minimum overall mean completion time for small flows.
8
Conclusions
Size-based flow-scheduling is a solution to improve the response times of mice flows, which will otherwise be adversely hurt due to the presence of large elephant flows. In the absence of sampling, the existing mechanisms are far from being practical, as they are either complex or have scalability issues. In this paper, we proposed a new way of detecting large flows without the need to track all flows. The number of packets processed (for performing size-based scheduling) in this new system is less by at least an order of magnitude in comparison to the number of packets that arrive. Large flows are detected only at times when they cause the queue length to grow beyond a pre-determined threshold, using the TLPS scheduling along with spike-detection mechanism. We also presented an integrated packet/spike model for the high-priority queue in such a system, and showed the existence a fixed-point for the throughput that depends on the queue-length threshold β. The TLPS/SD has a number of good properties. The response time achieved by the small flows in the TLPS/SD system is even better than that achieved in PS+PS scheduling, as the latter de-prioritizes flows using just one information — the threshold θ — in a deterministic manner. Though SB-TB policy is better (than PS+PS) in this aspect, still the flows getting detected early would be treated similarly, and this was highlighted while comparing the maximum delay faced by small flows. On the other hand, TLPS/SD uses the queue-length information to de-prioritize flows, and hence gives improved response times to not only small flows, but all medium-size flows. This is a more ‘natural’ approach, as
Size-Based Flow-Scheduling Using Spike-Detection
345
flows need to be treated differentially only when the system is near overload. The improvement brought by the TLPS/SD system was highlighted by comparing a number of metrics. In addition, it should be noted that, while the PS+PS policy as well as the SB-TB policy de-prioritize even constant-bit-rate flows, TLPS/SD will not do so, as long as they do not cause queueing. Similarly, large flows that are too slow will not have large spike-size (as packets may be dispersed in time), and hence will not be de-prioritized either. But, PS+PS and SB-TB policies will de-prioritize even such flows, further slowing them down. While exploring and analyzing this new approach of performing size-based scheduling in a practical way, we also revealed the performance of both PS+PS and SB-TB policies using a number of metrics not studied earlier. The integrated packet/spike model developed here can be used to analyze the performance of flows in both the queues. As part of future work, we intend to work on this.
References 1. Aalto, S., Ayesta, U.: Mean delay analysis of multi level processor sharing disciplines. In: INFOCOM (April 2006) 2. Avrachenkov, K., Ayesta, U., Brown, P., Nyberg, E.: Differentiation Between Short and Long TCP Flows: Predictability of the Response Time. In: Proc. IEEE INFOCOM (2004) 3. Collange, D., Costeux, J.L.: Passive estimation of quality of experience. J. UCS 14(5), 625–641 (2008) 4. Divakaran, D.M., Carofiglio, G., Altman, E., Vicat-Blanc Primet, P.: A Flow Scheduler Architecture. In: IFIP/TC6 Networking 2010, pp. 122–134 (May 2010) 5. Estan, C., Varghese, G.: New directions in traffic measurement and accounting. SIGCOMM Comput. Commun. Rev. 32(4), 323–336 (2002) 6. Harchol-Balter, M., Schroeder, B., Bansal, N., Agrawal, M.: Size-based scheduling to improve web performance. ACM Trans. Comput. Syst. 21(2), 207–233 (2003) 7. John, W., Tafvelin, S., Olovsson, T.: Trends and Differences in ConnectionBehavior within Classes of Internet Backbone Traffic. In: PAM, pp. 192–201 (2008) 8. Kleinrock, L., Muntz, R.R.: Processor sharing queueing models of mixed scheduling disciplines for time shared system. J. ACM 19(3), 464–482 (1972) 9. Kleinrock, L.: Queueing Systems: Computer Applications, vol. II. Wiley Interscience, Hoboken (1976) 10. Psounis, K., Ghosh, A., Prabhakar, B., Wang, G.: SIFT: A simple algorithm for tracking elephant flows, and taking advantage of power laws. In: 43rd Annual Allerton Conf. on Control, Communication and Computing (2005) 11. Rai, I.A., Biersack, E.W., Urvoy-Keller, G.: Size-based scheduling to improve the performance of short TCP flows. IEEE Network 19(1), 12–17 (2005) 12. Schrage, L.: A proof of the optimality of the Shortest Remaining Processing Time Discipline. Operations Research 16, 687–690 (1968) 13. Yashkov, S.F.: Processor-sharing queues: some progress in analysis. Queueing Syst. Theory Appl. 2(1), 1–17 (1987) 14. Zseby, T., et al: RFC 5475: Techniques for IP Packet Selection. Network Working Group (March 2009), http://www.rfc-editor.org/rfc/rfc5475.txt
Author Index
Altman, Eitan 331 Andreev, Sergey 301 Andronov, Alexander 288 Balsamo, Simonetta 70 Barbierato, Enrico 257 Begin, Thomas 85 Brandwajn, Alexandre 85 Bruneel, Herwig 14, 113 Buchholz, Robert 159 Bushehrian, Omid 43 De Cuypere, Eline 175 Dei Rossi, Gian-Luca 70 De Vuyst, S. 113 Divakaran, Dinil Mon 331 Dudin, Alexander 99 Fiems, Dieter 113, 175 Fourneau, Jean-Michel 204 Gallina, Lucia 316 Gaujal, Bruno 189 Gorgo, Ga¨el 189 Gribaudo, Marco 257 Hamadou, Sardaouna 316 Hasslinger, Gerhard 234 Horton, Graham 159 Iacono, Mauro
Krull, Claudia 159 Kulvietis, Genadijus
249
Marin, Andrea 70, 316 Marrone, Stefano 257 M´elange, Willem 14 Minkeviˇcius, Saulius 249 Nechval, Konstantin 132 Nechval, Nicholas 132 Nickelsen, Anders 55 Olsen, Rasmus L.
55
Pileggi, Paolo 219 Purgailis, Maris 132 Pustovalov, Eugeny 301 Quessette, Franck
204
Revzina, Jelena 288 Rossi, Sabina 316 Rozevskis, Uldis 132 Saffer, Zsolt 28 Schwefel, Hans-Peter 55 Sousa-Vieira, Maria-Estrella 149 Stavrinides, Georgios L. 273 Steyaert, Bart 14
257
Karatza, Helen D. 273 Kempa, Wojciech M. 1 Kim, Che Soong 99 Klimenok, Valentina 99 Krasts, Juris 132 Kritzinger, Pieter 219
Telek, Mikl´ os 28 Turlikov, Andrey 301 Vicat-Blanc Primet, Pascale Vincent, Jean-Marc 189 Walraevens, Joris
14
331