Distributed Response Time Analysis of GSPN Models with MapReduce Oliver J. Haggarty William J. Knottenbelt Jeremy T. Bradley Department of Computing, Imperial College London, 180 Queen’s Gate, London, SW7 2BZ, United Kingdom {ojh06, wjk, jb}@doc.ic.ac.uk Abstract Generalised Stochastic Petri nets (GSPNs) are widely used in the performance analysis of computer and communica- tions systems. Response time densities and quantiles are of- ten key outputs of such analysis. These can be extracted from a GSPN’s underlying semi-Markov process using a method based on numerical Laplace transform inversion. This method typically requires the solution of thousands of systems of complex linear equations, each of rank n, where n is the num- ber of states in the model. For large models substantial pro- cessing power is needed and the computation must therefore be distributed. This paper describes the implementation of a Response Time Analysis module for the Platform Independent Petri net Editor (PIPE2) which interfaces with Hadoop, an open source implementation of Google’s MapReduce distributed programming environment, to provide distributed calculation of response time densities in GSPN models. The software is validated with analytically calculated results as well as sim- ulated ones for larger models. Excellent scalability is shown. Keywords: Generalised Stochastic Petri nets, MapReduce, Response Time Analysis 1 INTRODUCTION The complexity of modern distributed systems continues to rise rapidly. It is therefore increasingly important to model these systems prior to their implementation to ensure they be- have correctly. In this context, Generalised Stochastic Petri nets (GSPNs) are a popular graphical modelling formalism which are both intuitive and flexible. GSPNs have an under- lying semi-Markov process which can be analysed for many qualitative and quantitative factors. The focus of the present paper is on techniques for extract- ing response time densities and quantiles from GSPN models. Given their increasing use in Service Level Agreements, these are important performance measures for many computer and communication systems, such as web servers, communica- tion networks and stock market trading systems. In particular, we describe the creation of a new Response Time Analysis module for the Platform Independent Petri net Editor (PIPE2) [3]. PIPE2 1 is an open source Petri net editor and analyser de- veloped by several generations of students at Imperial College 1 Available from http://pipe2.sourceforge.net. London as well as several external contributors. The module accepts a set of start and target markings (defined by logical expressions which describe the number of tokens that should be present on selected places) and outputs graphs of the cor- responding response time density and (optionally) the cumu- lative distribution function of the time taken for the system to pass from the start markings into any of the target mark- ings. The analysis makes use of a method based on numerical Laplace transform inversion, whereby we convolve the state sojourn times along all paths from the set of start markings to the target markings [8]. This involves the solution of many systems of complex linear equations, each of rank n, where n is the size of the GSPN’s state space. For large n the calcula- tions require a great deal of processing power. Consequently, we distribute the processing over a cluster of computers by interfacing PIPE2 with Hadoop, an open source implemen- tation of Google’s MapReduce distributed programming en- vironment. This paradigm offers excellent scalability and ro- bust fault tolerance. The remainder of this paper is organised as follows. Sec- tion 2 presents relevant background material relating to Gen- eralised Stochastic Petri nets and their response time analysis. Section 3 describes Hadoop, an open source implementation of the MapReduce distributed programming model. Section 4 describes the design and integration of an Hadoop-based Re- sponse Time Analysis module into the PIPE2 Petri net edi- tor. Finally, Section 5 validates the module using small mod- els with known analytical results, as well as larger models where results had been produced by simulation. The software is shown to work with model sizes with in excess of two mil- lion states, and to scale well with increasing analysis cluster size. Section 6 concludes. 2 BACKGROUND THEORY Petri nets are a graphical formalism for describing con- currency and synchronisation in distributed systems. In their simplest form, they are also known as Place-Transition nets. These consist of a number of places, which may contain to- kens, connected by transitions. A transition is enabled and can fire if the input places of the transition contain a cer- tain number of tokens. These numbers are defined in a back- wards incidence matrix whose rows correspond to places and columns to transitions. In so firing, the specified number of tokens are then removed from each place. A forward inci-