simulation modeling and analysis with arena t. altiok and b. melamed chapter 13
DESCRIPTION
SIMULATION MODELING AND ANALYSIS WITH ARENA T. Altiok and B. Melamed Chapter 13 Modeling Computer Information Systems. Computer Networks. Computer networks consist of computer nodes, called hosts transmission lines, called communications links System attributes - PowerPoint PPT PresentationTRANSCRIPT
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
1
SIMULATION MODELING AND ANALYSIS SIMULATION MODELING AND ANALYSIS WITH ARENAWITH ARENA
T. Altiok and B. MelamedT. Altiok and B. Melamed
Chapter 13Chapter 13 Modeling Computer Information Modeling Computer Information
SystemsSystems
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
2
• Computer networks consist of • computer nodes, called hosts• transmission lines, called communications links
• System attributes• usability is the ease with which a user can learn to operate, prepare inputs for, and interpret outputs from a system or component• flexibility is the ease with which a system or component can be modified for use in applications or environments other than those for which it was specifically designed• interoperability is the ability of two or more systems or components to exchange information and use it• scalability is the ease with which a system or component can be modified to fit larger problems
Computer Networks
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
3
• A common computer-network architecture is the Client/Server configuration
• a client is a host playing the role of a requestor of services• a server is a host providing the requisite service• the two interact over a communications network• Client/Server architecture is versatile, message-based and modular
• Example: web services implemented in the Client/Server architecture
• the Internet/Web infrastructure has placed increasingly larger demands on servers as well as the networks connecting them• a crowded Internet can slow the delivery of responses (latency) to customer queries and transactions, resulting in poor quality of service (QoS) and disappointed users and loss of business• thus, performance evaluation of distributed Client/Server and web-based applications has become extremely important
Client/Server Networks
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
4
• As the Web keeps growing, applications will have to be designed with capacity issues in mind• For example, businesses must often formulate and answer “what-if” questions such as the following:
• what is the impact of a 20% increase in customer transactions on the response time of the system?• how would the response time be changed if part of the workload were shifted from one hard disk to another?• what good would it do to move a database to a remote host?
Capacity of Web-Based Services
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
5
• In a Client/Server system, • a client computer sends requests for specific services• a server computer listens to client requests, processes them, and sends the response back to the client
• Client/Server system architectures:• In a two-tier Client/Server architecture, the client side utilizes a user interface that permits direct communication with the server host• In a three-tier Client/Server architecture, a middle tier is added between the client side and the server side (typically for transaction processing, or monitoring)
Client/Server System Architectures
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
6
• A schematic representation of a three-tier Client/Server system is shown below
• The transaction processing (TP) monitor receives the transactions, queues them up for service, manages their path to completion, and finally, sends the reply back to the client
TransmissionNetwork
TPMonitor
Server NodesClient Nodes
Request
Reply
Three-Tier Client/Server Systems
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
7
• Clients and servers communicate via messages• a client request is a message requesting a specific service from a server (e.g., a database service)• a server reply is packaged as another message, and sent back to the client (e.g., a database result set)• each message has origination and destination information, as well as a message body• thus, there are as many request types as there are services
• Example: Online banking • users query their account status at an ATM (Automatic Teller Machine) or access a secure Web site for the same
• example: “show me the balance of my account” • example: “show me the last 15 cashed checks”
• the reply is printed on paper or displayed on a computer monitor
Message-Based Communications
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
8
• Client hosts are computers that issue service requests initiated by computer programs or by customers connected to the host• A schematic representation of a client host is shown below
• a generated request undergoes local preprocessing at the client host• it is then is transmitted to a server host usually over a communications network (unless the client and server are on the same host)• on service completion, the reply is transmitted back to the client host and undergoes local post-processing, thereby completing the request/reply cycle
• The most critical performance measure is response time • the total time elapsed from the moment of submitting a request (just before local preprocessing) up until the reply becomes available (just after local post-processing)
MessageTraffic
ClientProcess
LocalCPU
CPUQueue
Client Hosts
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
9
• Server hosts perform the bulk of request processing • A schematic representation of a server host is shown below
• in its simplest form, a server node consists of one or more processors (CPUs) and a number of server processes that actually execute the code for the services requested by clients• the server processes and the CPU have each a message queue in front of them • each server process is enabled to perform a specific set of services
CPU
TransactionMonitor
MessageTraffic
Server Processes
Server Hosts
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
10
Communications Networks• Nodes in the transmission network
• consist of hardware and software • interoperate and interact via transmission protocols
• A schematic representation of an abstraction of a single-server queue of a transmission node is shown below
• a finite buffer precedes a transmission server operating at a given transmission speed (rate), known as the bandwidth capacity (BWC)• as not all of this capacity is available to messages, the message transfer efficiency (MTE) is the ratio of available BWC to total BWC (typically in the range 60%-80%) • message transmission time is proportional to message size, for example, a BWC of 10 Mbps (equivalent to 1250 bytes/millisecond) at 70% MTE transmits a 1024-byte message in 1024 / (1250 * 0.7) = 1.17 milliseconds
BWC = 1250 bytes/ms
Replies
Requests
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
11
Example: 2-Tier Client/Server System • Consider a Human Resources (HR) application, configured as a two-tier Client/Server system, consisting of
• 4 client nodes • 1 server node• traffic flows as shown in the schematic below
Network
ClientNodes
Requests Replies
Monitor
Server Node
Server Processes
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
12
• The HR system supports a number of services (request types) • services relate to company employee records• a database server maintains an HR database (HRDB) of employee-related information• the table below lists the attributes of supported HR services
HR Transactions Attributes
4
Request Type No.
Request
Type Name
Service Requested
Request Size
(in bytes)
Reply Size
(in bytes)
1 Add Add employee 1024 256
2 Delete Delete employee 1024 512
3 Find Find employee 256 512
{(0.2,64),(0.3,512),
(0.3,1024),(0.2,2048)}
Disc()
Search Search for employees 512
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
13
• Service requests in the table belong to the following types:1. a request of type Add adds a new employee with all his/her information (name, address, phone, expertise, etc.) to the HRDB in a message size of 1024 bytes, and the system returns a confirmation message of size 256 bytes. 2. a request of type Delete deletes an employee entry (with all related information) from the HRDB, and the system returns a confirmation message of size 512 bytes 3. a transaction of type Find finds the complete employee information in the HRDB, based on partial data (e.g., the name alone), and the system returns a reply message of size 512 bytes4. a transaction of type Search searches the HRDB for all employees with given characteristics (e.g., same expertise, same department, etc.), and the system returns a reply of random size, whose (discrete) distribution is given in the preceding table
HR Transactions Attributes (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
14
• To characterize the traffic patterns in the system, we specify the arrival processes of all request types at each client node
• the table below specifies client-side service request arrival profiles
HR Client Request Arrival Profiles
1/30Expo( ) {(0.2,1),(0.15,2),(0.4,3),(0.25,4)}Disc( )
1/60Expo( ) {(0.4,1),(0.6,2)}Disc( )
1/120Expo( ) {(0.6,3),(0.4,4)}Disc( )
1/80Expo( ) {(0.2,1),(0.2,2),(0.4,3),(0.2,4)}Disc( )
Client
Node
Request Inter-arrival Distribution
(in messages / millisecond)
Request TypeDistribution
1
2
3
4
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
15
• To characterize the service in the system, we specify the servers and the time it takes to execute a service on them (elapsed times)
• there are two server processes, called and , where the former provides services of types Add and Delete, and the latter provides services of types Find and Search.
• the table below specifies server-side profiles of elapsed times
1sp
HR Server Profiles
sp2
Request Type No.
Request Type Name
Elapsed Time (in milliseconds)
1 Add 10
2 Delete 8
3 Find 15
4 Search {(0.2,10),(0.3,25),(0.3,32),(0.2,45)}Disc( )
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
16
Arena Model of the 2-Tier
Client/Server HR System
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
17
• The client nodes segment models the arrivals of requests• by client request type• by destination server
Client Nodes Segment
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
18
Client Nodes Segment Modules
Dialog box of the Assign module Assign Service Requested_1
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
19
Network Segment• The network segment provides a simplified model of the entire communications network that performs message transmission• It consists of
• a Process module to model transmission delay• a Decide module to model transaction routing
• The Expression field specifies the delay time in the Process module (to be shown next) as the expression
((Type==1) * Request_Size(Service_Requested) + (Type==2) * Reply_Size(Service_Requested)) / ( 0.7 * 200)
where • Request_Size is used in the expression above to retrieve the associated request size as function of the service type • Reply_Size is used in the expression above to retrieve the associated reply size as function of the service type
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
20
Communications Network Modules
Dialog box of the Process module Com_Network
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
21
Dialog boxes of the Expression module specifying message by type (bottom) and their sizes by service type (top)
Communications Network Modules (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
22
Server Node Segment• The server node segment models the server node• It uses a Decide module to dispatch requests to the appropriate server process
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
23
Server Node Modules
Dialog box of the Process module Transaction Monitor
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
24
Dialog box of the Decide module Dispatch Requests for Services in Server Node
Server Node Modules (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
25
• The Decide module dispatches requests to a server process based on the outcome of an N-way condition as follows:
• the Type attribute is checked first:if Type == 2, then this entity is a reply;otherwise, if Type == 1, then the entity is a request transaction
• in the latter case (Type == 1), the Service_Requested attribute is checked next:
if Service_Requested == 1 (Add request), then the transaction is dispatched to server process 1
if Service_Requested == 2 (Delete request), then the transaction is dispatched to server process 1
if Service_Requested == 3 (Find request), then the transaction is dispatched to server process 2
if Service_Requested == 4 (Search request), then the transaction is dispatched to server process 2
Server Node Modules (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
26
Dialog box of the Process module Server Process_1
Server Node Modules (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
27
HR System Simulation Results
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
28
HR System Simulation Results(Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
29
HR System Simulation Results (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
30
• Consider a bookseller’s e-business network, configured as a three-tier Client/Server system, consisting of
• a cluster of 2 server nodes (bold circles), each hosting 2 server processes with FIFO priority queues and providing multiple services • a transmission network that links the server nodes (yellow rectangle)• transaction processing (TP) middleware (purple circles) that dynamically balances the queue sizes of server processes in the cluster’s 4 client nodes • client nodes with traffic flows shown in the schematic below
ServerNode 1
ClientNodes
ClientNodes
Server Cluster
Transmission
Network
ServerNode 2
Example: 3-Tier Client/Server System
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
31
Service Profiles • Server processes provide a number of services, each with a random elapsed (service) time• The table below displays
• elapsed-time distributions by services• service priorities (lower priority numbers indicate higher priorities)
ServiceNo.
ServiceName
ServicePriority
Elapsed Time at Server Node 1(in milliseconds)
1 Best Sellers (BS) 5 Unif(10,20)2 New Releases (NR) 43 Book Search (BE) 34 View Cart (VC) 25 Go to Cashier (GC) 1
Elapsed Time at Server Node 2(in milliseconds)
Unif(13,23)Unif(4,14)Unif(2,12)Unif(1,11)
Unif(18,28)Unif(21,31)Unif(10,20)Unif(7,17)Unif(5,15)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
32
Server Process Profiles • Services are allocated to server processes within server nodes• The table below displays this allocation
Client Node /Server Process (SP)
ServiceName
Node 1 / SP_11 BS, NR ,BE
Node 1 / SP_12 VC, GC
Node 2 / SP_21 BS, NR
Node 2 / SP_22 BE, VC, GC
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
33
• A number of client nodes are connected to each server node• however, when a service request arrives at a server node, it is not necessarily processed there• rather, the TP monitor decides where it would be processed by selecting a server process (anywhere in the system) with the minimal queue size
• In reality, dynamic load balancing aims to equalize the queue workload (the total service time needed to serve all transactions in the queue, usually excluding the one in service)
• however, for the sake of modeling simplicity, this model will balance only queue sizes
TP Monitor Operation
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
34
• The table below displays• request inter-arrival time distributions • request mix distributions by server node
Service Request Profiles
Best Sellers (BS)New Releases (NR)Book Search (BE)View Cart (VC)Go to Cashier (GC)
Node 1 Node 2Distribution of Request Inter-Arrival Times (in milliseconds)
Expo(1/12)
Distribution of Requests in Arrival Streams (Percentages in Mix)
0.20 0.230.15 0.250.30 0.250.05 0.070.30 0.20
Expo(1/18)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
35
• Once a service request completes processing, a reply is sent back to the client node• Reply messages have
• a random size of 1024 bytes or 8096 bytes• the reply size distribution is
Reply Profiles
{(0.45,1024),(0.55,8096)}Disc( )
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
36
• We wish to estimate • response times of service requests by type• delays in server process queues• resource utilization
Performance Statistics
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
37
Arena Model of Request Arrivals and the Transmission Network Segments
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
38
Request Arrival Modules
Dialog box of the Create module Client Requests Node 1
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
39
• Generated request transaction entities proceed to a corresponding Assign module (Request Attributes 1 or Request Attributes 2) to assign values to attributes, as illustrated below
Dialog box of the Assign module Request Attributes 2
Request Arrival Modules (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
40
Dialog box of the Station module Com_Net Entrance
Transmission Network Modules
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
41
Dialog box of the Process module Network
Transmission Network Modules (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
42
• Since transmission times are size dependent, transmission delays are computed as an expression utilizing the message size attributes Req_Mes_Size and Rep_Mes_Size in the Expression field above
• The expression is((Type==Req)*Req_Mes_Size + (Type==Rep)*Rep_Mes_Size) / BWC / 0.8
where• the message size is selected by the message type• the requisite service time is obtained by dividing the message size by the effective bandwidth capacity BWC*0.80, where 0.80 is the MTE (Message Transfer Efficiency) parameter
Transmission Network Modules (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
43
Dialog box of the Decide module Routing Map
Transmission Network Modules (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
44
Dialog box of the Route module Message Transmission
Transmission Network Modules (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
45
Dialog box of the Record module Response Time Tally
Transmission Network Modules (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
46
Dialog box of the spreadsheet view of the Set module (bottom)for the members of set Response Times (top)
Transmission Network Modules (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
47
Arena Model of Server Node 1
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
48
Server Node 1 Modules
Dialog box of the Decide module Is It a Dispatched Job_1
• The Decide module in server node 1 • examines incoming transactions • separates those arriving directly from client nodes from those dispatched from server node 2 by the TP monitor, since the logic sequences of transactions depend on the origination node
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
49
Dialog box of the Process module TPM_1
Node 1 TPM Modules
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
50
Dialog box of the Search module BB_1
Node 1 TPM Modules (Cont.) • In the Search Condition field below, SP_Queue_Occupancy is an expression, to be defined next
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
51
Dialog box of the spreadsheet view of the Expression module (bottom)for the expression SP_Queue_Occupancy
Node 1 TPM Modules (Cont.) • The expression SP_Queue_Occupancy below is a vector of 4 rows,
each holding a separate expression which are functions of sever process queues
• each row returns the queue size of a specific server process, provided the service request of a transaction belongs to a subset of services• otherwise, it returns a large number (1000), larger than any queue size
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
52
Dialog box of the Assign module Assign Dest_1
Node 1 TPM Modules (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
53
Dialog box of the Decide module Process Here_1
Node 1 TPM Modules (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
54
Server Process 11 Service Modules
Dialog box of the Process module S_Proc_11
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
55
Dialog box of the spreadsheet view of the Queue module for server-process queues and the transmission network queue
Server Process Modules
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
56
Dialog box of the Assign module Assign Dest_1
Server Node Reply Modules
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
57
Dialog box of the Route module Route to Network_1
Server Node Reply Modules (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
58
• The Arena model of the bookseller’s e-business system was simulated for a 1-hour period (3,600,000 milliseconds) of operation• Simulation results are shown next
Bookseller’s E-business Simulation Results
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
59
Bookseller’s E-business Simulation Results (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
60
Bookseller’s E-business Simulation Results (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
61
Bookseller’s E-business Simulation Results (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
62
• Observe that the network resource Net_Server is busy some 85% off the time
• average network delay of around 13 milliseconds across all transactions• these delays are quite insignificant, and entirely acceptable
• Observe that the utilizations of server processes SP_11 through SP_22 vary widely
• each first server process at each server node (SP_11 and SP_21) is much busier (over 58% utilization) than the second process in that node
(SP_21 and SP_22)• this is due to the fact that services with longer elapsed times are allocated to the first server process at each server node
Bookseller’s E-business Simulation Results (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
63
• Observe that delays in server process queues are fairly proportional to the corresponding server process utilization
• the average delay in the queue of server process SP_21 is over 21 milliseconds• the average delay in in the queue of server process SP_22 is a mere 2.65 milliseconds
• Observe that these delays directly affect the response times of customer requests
• for example, BS and NR services have longer elapsed times than the other services• consequently, the server processes providing these services are the busiest, and the corresponding response times (about 73 and 63 milliseconds, respectively) are significantly larger than those of the other services
Bookseller’s E-business Simulation Results (Cont.)
Altiok / Melamed Simulation Modeling and Analysis with ArenaChapter 13
64
• This bookseller’s e-business example clearly shows the importance of workload allocation in Client/Server systems, and especially in mission-critical applications• Delays in server-process queues and transmission network queues constitute major components of the response times
• clearly, it is desirable to minimize these delays in order to reduce the overall response times• A more balanced allocation of workload to servers would help reduce server-process delays, and in turn reduce response times
• On the other hand, to improve the transmission network performance, one may have to upgrade the network by adding additional equipment (routers, switches, etc.) to reduce network delays
• this is a far more expensive proposition than workload balancing
Bookseller’s E-business Simulation Results (Cont.)