CS556 Course Project
Performance Analysis of M-NET using GSPN
Jinchun Xia
1. Introduction
Performance is a crucial factor in software system. For many software development groups, it remains easier to wait until a system has been built before evaluating its performance. Among the three most used techniques, measurement, simulation and analytic modeling [7], measurement is believed to be the most accurate method. But it is only feasible after system is implemented. Most organizations rely solely on performance testing and regularly incur the cost of redesign when performance problems arise. Situation would become better if we can evaluate system performance before we physically build up that system. That’s why simulation and analytic modeling become useful. Simulation tends to be expensive due to large computation time and can’t prove properties. Many analytic performance models are proposed by different researchers, including Queueing Network model, Markov chain model, and Markov reward models, etc.
As a mathematical and graphic tool, Petri Net can be used to describe a large variety of different systems [9]. It has been proven to be able to model system behaviors
[6]
. Based on that model, Petri Net provides approaches for the formal analysis, including performance analysis. Because of those benefits, applications of Petri Net range from informal systems to formal systems, from software systems to hardware systems, and from systems with concurrent processes to systems without any concurrency.
Various extensions to Petri net models have been proposed. Among them, we chose Generalized Stochastic Petri Nets (GSPN) over other techniques because of their ability to randomize arrival and processing delays and of their capacity to model complex interactions. A good property of GSPNs is they are isomorphic to continuous time Markov chains (MCs)[2]. This makes it easier to apply performance analysis based on GSPNs.
1.1 Work in this paper
M-Net is a web based meeting net, which enables people in remote areas to hold virtual meetings through the internet [1, 8]. This system has been developed by Professor Carl K. Chang’s students. We intend to build up an analytic model for M-Net and analyze its performance. This paper is organized as follows: section 2 gives a brief overview to GSPN, section 3 introduces M-NET which will be modeled in this paper. In section 4, GSPN models for M-NET are described. Section 5
applies some performance analysis based on those GSPN models. Section 6 evaluates and concludes this paper.
2. Generalized Stochastic Petri Net (GSPN)
2.1 Introduction to GSPN
Murata [4] described Petri Nets (PN’s) as a promising tool for describing and studying information processing systems that are characterized as being concurrent, asynchronous, distributed, parallel, nondeterministic, and/or stochastic. PN can be formally defined as [Peterson]:
PN = (P, T, A, M) (1) where P, T, A, M are the sets of place, transition, arc, and marking.
One of the important developments in the theory of PN’s is the introduction of enhancements that make PN’s more useful in performance evaluation studies. One such enhancement is the Stochastic Petri Net (SPN) which associates a random firing time to each transition. The reachability graph of an SPN can be turned into a continuous-time Markov chain (CTMC) by assigning to each edge a weight equal to the firing rate of the associated SPN transition. A SPN is defined formally as a tuple:
SPN = (P, T. A, M, R) [2] (2) where P, T, A, M are as in (1), and R = {r1, r2, …, rm} is the set of firing rates
associated with the PN transitions.
GSPN’s [10] are timed Petri nets in which the transitions are classified into two groups: immediate and timed transitions. Immediate transitions have higher priority than timed transitions, fire in zero time and are labeled with a marking-dependent firing probability. Associated with timed transitions there are random, exponentially distributed firing times. A marking in which immediate transitions are enabled is known as a vanishing marking, while a marking in which only timed transitions are enabled is known as a tangible marking. Vanishing states have sojourn times which are zero, while tangible states have nonzero exponentially distributed sojourn times.
2.2 Performance analysis based on GSPN
Smith defined “performance” [11] as “the degree to which a system or component accomplishes its designated functions within given constraints, such as speed, accuracy, or memory usage”.
transient-state distribution probability derived from CTMC, most performance analysis can be handled.
3. Introduction to M-NET
3.1 Overview of M-NET
M-Net is a web based meeting net, which enables people in remote areas to hold virtual meetings through the internet. M-Net System was built on a communication platform which manages communication among different users. It also includes various applications to support collaborative meetings. These applications include chat, which supports test based discussions; slideshow, which displays slides; IxiFtp, which allows file operations and browser operations; layered whiteboard, which supports the exchange of the visual pictures drawn in the browser. M-Net also includes features like secure control, user registration, and so on.
In the M-Net System, everybody can apply to be a member, and can then launch a meeting and invite other members to attend. In a meeting, all attendee can share ideas through M-Net applications, and those ideas are broadcasted to all the other meeting members.
3.2 M-NET system architecture
M-Net can be considered as a three-tier client/server system. The three tiers are client, server, and database. M-Net client is actually a Java Applet that is downloaded from a Server, and run in any browser. It communicates directly with servers through socket connections. M-Net mainly includes interfaces that need to communicate with servers and applications. Figure 1 shows how M-Net communicates [1]:
Figure 1: Top level system architecture of M-Net Client Side Server Side M-Net AppServer (Java Application) Central Server (Java application) MS- Access JDBC M-Net AppServer (Java Application) M-Net AppServer (Java Application) App Client App Client … App Client App Client App Client App Client … … Central Client Central Client Central Client Central
Client Database Server
(Java application)
4. Modeling M-NET by scenarios
Due to its client/server structure and its complex applications, it’s very difficult and tedious to describe the whole M-NET system by GSPN. Also because M-NET is a real-time system with random user requests, it’s very difficult to analyze performance for the whole system. In this case, performance analysis based on scenarios is alternative and can still be very useful. System behaviors can be divided into different scenarios. So it’s possible to get whole system performance evaluation by systematic scenario performance analysis. This paper will use one scenario: Floor control as example to illustrate this procedure. Its state diagram and GSPN are depicted as below.
4.1 Floor Control
Requested. Transitions are represented as probability variables, which enables close
integration with Petri Net modeling and Markov modeling. A delay is introduced into the FloorHeld state so that once a person enters the state they will remain in that state for a time period equal to TimeToWrite, unless the floor is prematurely removed by the chair. These transitions are all represented as variables that can be used to support numerical performance analysis.
Figure 2: Floor Control represented as a State transition diagram
Figure 3 is a Petri Net that models the behavior of meeting members requesting the “floor” to gain access to the whiteboard. We assume that there’re one chairman and five members in this meeting. In order to gain a Markovian model of this scenario, the following assumptions are made:
¾ Members request floor at exponentially distributed random rate with average
1
1
γ ;
¾ Members cancel their requests at exponentially distributed random rate with average
1
1
γ ;
¾ The request may not immediately served, either because the floor is held by another member, or because the chairman denies this request;
¾ Floor can be prematurely removed from a floor-holder by the chairman. ¾ Floor-holder writes to whiteboard for an exponentially distributed random
rate with average
5
1
5 γ 4 γ 3 γ 2 γ P3 · ··· ·· P1 P2 P4 · P5 t2 t1 t3 t4 t5 1 γ ·m1
Figure 3: Floor Control represented as a GSPN
Table 1: Legend for the GSPN in Figure 3 P1: Active member
P2: Member waiting for floor
P3: Chairman
P4: Floor free
P5: Member holds floor
T1: Member requests floor
T2: Member cancel floor request
T3: Chairman assign floor to member
T4: Chairman removes floor from member
T5: Member releases floor
5. Performance analysis based on GSPN models
Response time is one of the most important performances, especially for network based applications. In this paper, only response time analysis is proposed.
5.1 Derive CTMC
Based on the Petri Net in Figure 3, we can draw reachability graph as Figure 4:
t4/t5 t /t t4/t5 t3 t4/t5 t3 t4/t5 t3 t3 t3 t2 t1 t2 t1 t2 t1 t2 t1 t2 t1 50110 41110 32110 23110 14110 05110
It has been proved that there is a one-to-one correspondence between the reachability graph and the continuous-time Markov Chain (CTMC) [2]. Figure 5 shows the CTMC corresponding to the GSPN of Figure 4.
5 4 γ γ + 5 4 γ γ + 5 4 γ γ + 5 4 γ γ + 5 4 γ γ + 3 γ 3 γ 3 γ 3 γ 3 γ 2 γ 2 γ 2 γ 2 γ 2 γ 1 γ 1 γ 1 γ 1 γ 1 γ M1:50110 M2:41110 M3:32110 M4:23110 M5:14110 M6:05110 M7:40101 M8:31101 M9:22101 M10:13101 M11:04101
Figure 5: Continuous time Markov Chain for the GSPN in Figure 3
Without loss of generality, we assume γ 1 = 2, γ 2 = 5, γ 3 = 2, γ 4 = 5, γ 5 = 1.
For this CTMC, we generate matrix:
⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ − − − − − − − − − − − = 6 6 6 6 6 6 6 6 6 6 2 7 5 2 2 9 5 2 2 9 5 2 2 9 5 2 2 9 5 2 2 Q
Solve this CTMC, we can get
π = [0.6526, 0.1865, 0.0532, 0.0152, 0.0043, 0.0012, 0.0622, 0.0178, 0.0051, 0.0014, 0.0004]
5.2 Response time analysis
Let n denote the average number of tokens in a place, λ denote the average arrival rate of tokens, and w denote the average wait of a token in a place. So we can derive
n = λw (3)
Our goal is to gain the mean response time tf that elapses from a floor request is
generated until the floor is assigned to that member. If we can get the average number of token (by steady state) in a place, which is the n in (3), we can easily compute w, which is the mean wait time of a token in that place. As for our goal, the response time tf is the time of waiting for floor. From Figure 3, we can see that is the
waiting time in place 2. So we gain:
tf = w2. (4)
Then n2 = 0*0.6526 + 1*0.1865 + 2*0.0532 + 3*0.0152 + 4*0.0043 + 5*0.0012 +
= 0.3955 λ2 = γ1 = 2
⇒ w2 = 0.19775
⇒ tf = 0.19775
Hereby we know that the mean response time from a member request the floor till the member release that floor is 0.19775 s.
5.3 Evaluate performance against original requirements
After we calculate those numerical results, the next step is to evaluate those performances against the original requirements. According to the related requirement item “Each floor request should be responded within 5 second”, obviously this requirement is satisfied.
6. Evaluation, Conclusion and Future work
The example in this paper is a very simple one since only one scenario and only response time are considered. Values used in this example are fictitious. But from the numerical result, we can see that early performance evaluation is feasible. Actually GSPN can be very useful for most performance evaluation, like throughput, server load, CPU utilization, etc. All those work can be future work.
Real-time Server-Client structure is difficult to model by even high-level Petri Net, but we can capture system behaviors by different scenarios, and analyze different system performances upon those scenarios. In doing this work, a major factor should be considered: those scenarios can completely capture system behaviors.
References:
[1] Jian Zhang, “M-Net Server Enhancement and NT Service”, Master’s Project
Report, Apr. 2002
[2] Marco Ajmone, et al., “A Class of Generalized Stochastic Petri Nets for the Performance Evaluation of Multiprocessor Systems”, ACM Trans. Computer
Systems, Vol. 2, No. 2, May 1984, pp. 93-122
Upper Saddle River, NJ, 1981
[6] Kurt Jensen, “An Introduction to the Theoretical Aspects of Coloured Petri Nets”, de Bakker, J.W.; de Roever, W.-P.; Rozenberg, G.: Lecture Notes in Computer
Science, vol. 803; A Decade of Concurrency, Springer-Verlag, Jun. 1993, pp.
230-272.
[7] O.C. Ibe, et al., “Performance Evaluation of Client-Server Systems”, IEEE Trans.
Parallel & Distributed System, vol. 4, no. 11, Nov. 1993, pp. 1217-1229.
[8] Rong Qian, Meeting Net Real 1.0 Server Design and Implementation, Master Project Report. Int’l Center for Software Eng., Computer Science Dept., Univ. of Illinois at Chicago, April 1999.
[9] J.L. Peterson, Petri nets. ACM Comput. Surv. 9, 3 (Sept. 1977), 223-252.
[10] M. A. Marsan, G. Balbo, and G. Conte, Performance Models of Multiprocessor Systems. Cambridge, MA: MIT Press, 1986.
[11] C.M. Woodside and C. U. Smith, "Performance Validation at Early Stages of