Title: Altiok / Melamed Simulation Modeling and Analysis with Arena
1SIMULATION MODELING AND ANALYSIS WITH ARENA T.
Altiok and B. Melamed Chapter 13 Modeling
Computer Information Systems
2Computer Networks
- 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
3Client/Server Networks
- 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
4Capacity of Web-Based Services
- 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?
5 Client/Server System Architectures
- 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)
6Three-Tier Client/Server Systems
- 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
7Message-Based Communications
- 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
8Client Hosts
- 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)
9Server Hosts
- 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
10Communications 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
11Example 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
12HR Transactions Attributes
- 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
13HR Transactions Attributes (Cont.)
- 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
bytes - 4. 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
14HR Client Request Arrival Profiles
- 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
15HR Server Profiles
- 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
16 Arena Model of the 2-Tier Client/Server HR System
17Client Nodes Segment
- The client nodes segment models the arrivals of
requests - by client request type
- by destination server
18Client Nodes Segment Modules
Dialog box of the Assign module Assign Service
Requested_1
19Network 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 - ((Type1) Request_Size(Service_Requested)
(Type2) 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
20Communications Network Modules
Dialog box of the Process module Com_Network
21Communications Network Modules (Cont.)
Dialog boxes of the Expression module specifying
message by type (bottom) and their sizes by
service type (top)
22Server Node Segment
- The server node segment models the server node
- It uses a Decide module to dispatch requests to
the appropriate server process
23Server Node Modules
Dialog box of the Process module Transaction
Monitor
24Server Node Modules (Cont.)
Dialog box of the Decide module Dispatch
Requests for Services in Server Node
25Server Node Modules (Cont.)
- 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
26Server Node Modules (Cont.)
Dialog box of the Process module Server Process_1
27HR System Simulation Results
28HR System Simulation Results (Cont.)
29HR System Simulation Results (Cont.)
30Example 3-Tier Client/Server System
- Consider a booksellers 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 clusters 4
client nodes - client nodes with traffic flows shown in the
schematic below
31Service 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)
32Server Process Profiles
- Services are allocated to server processes
within server nodes - The table below displays this allocation
33 TP Monitor Operation
- 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
34Service Request Profiles
- The table below displays
- request inter-arrival time distributions
- request mix distributions by server node
35 Reply Profiles
- 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
36 Performance Statistics
- We wish to estimate
- response times of service requests by type
- delays in server process queues
- resource utilization
37Arena Model of Request Arrivals and the
Transmission Network Segments
38Request Arrival Modules
Dialog box of the Create module Client Requests
Node 1
39 Request Arrival Modules (Cont.)
- 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
40Transmission Network Modules
Dialog box of the Station module Com_Net Entrance
41 Transmission Network Modules (Cont.)
Dialog box of the Process module Network
42Transmission Network Modules (Cont.)
- 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
- ((TypeReq)Req_Mes_Size (TypeRep)Rep_Mes_Si
ze) / 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 BWC0.80, where 0.80 is the
MTE (Message Transfer Efficiency) parameter
43 Transmission Network Modules (Cont.)
Dialog box of the Decide module Routing Map
44Transmission Network Modules (Cont.)
Dialog box of the Route module Message
Transmission
45 Transmission Network Modules (Cont.)
Dialog box of the Record module Response Time
Tally
46 Transmission Network Modules (Cont.)
Dialog box of the spreadsheet view of the Set
module (bottom) for the members of set Response
Times (top)
47Arena Model of Server Node 1
48Server Node 1 Modules
- 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
Dialog box of the Decide module Is It a
Dispatched Job_1
49Node 1 TPM Modules
Dialog box of the Process module TPM_1
50 Node 1 TPM Modules (Cont.)
- In the Search Condition field below,
SP_Queue_Occupancy is an expression, to be
defined next
Dialog box of the Search module BB_1
51Node 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
Dialog box of the spreadsheet view of the
Expression module (bottom) for the expression
SP_Queue_Occupancy
52Node 1 TPM Modules (Cont.)
Dialog box of the Assign module Assign Dest_1
53 Node 1 TPM Modules (Cont.)
Dialog box of the Decide module Process Here_1
54 Server Process 11 Service Modules
Dialog box of the Process module S_Proc_11
55Server Process Modules
Dialog box of the spreadsheet view of the Queue
module for server-process queues and the
transmission network queue
56Server Node Reply Modules
Dialog box of the Assign module Assign Dest_1
57 Server Node Reply Modules (Cont.)
Dialog box of the Route module Route to Network_1
58Booksellers E-business Simulation Results
- The Arena model of the booksellers e-business
system was simulated for a 1-hour period
(3,600,000 milliseconds) of operation - Simulation results are shown next
59Booksellers E-business Simulation Results
(Cont.)
60Booksellers E-business Simulation Results
(Cont.)
61Booksellers E-business Simulation Results
(Cont.)
62Booksellers E-business Simulation Results
(Cont.)
- 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
63Booksellers E-business Simulation Results
(Cont.)
- 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
64Booksellers E-business Simulation Results
(Cont.)
- This booksellers 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