Você está na página 1de 84

Session 1586

Building Realistic Application Models


for Discrete Event Simulation
R&D Solutions for Commercial
and Defense Networks
CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any
CONFIDENTIAL format
RESTRICTED
ACCESS:
This information
may not Technologies,
be disclosed, copied,
or transmitted in any
without the
prior written
consent of OPNET
Inc.
format without
the
priorOPNET
written Technologies,
consent of OPNET
2007
Inc. Technologies, Inc.
2010 OPNET Technologies, Inc.

1586 Building Realistic Application Models for Discrete Event Simulation

What Can You Expect from This Session?


Application Modeling
Modeling methodologies
z Transaction Whiteboard in Real Application Simulation Module
z

Prediction studies and model validation


Prerequisites
z Familiarity

with OPNET Modeler

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

1586 Building Realistic Application Models for Discrete Event Simulation

Agenda
Application modeling methodologies
Creating application model in Transaction Whiteboard
Lab 1
Application modeling basics
Introduction to scripting in Transaction Whiteboard
Lab 2
Sophisticated application logic
Application model analysis
Lab 3
How do I
Review

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

1586 Building Realistic Application Models for Discrete Event Simulation

Application Modeling Can Answer


Questions
How will my application perform on my network?
z Setting

response time expectations for new applications, baselines for existing


applications

How will changes to existing applications affect my network?


z Will

the existing network infrastructure support the changes?

How will changes to my network affect my existing applications?


z How

will server consolidations and link upgrades affect response times?

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

1586 Building Realistic Application Models for Discrete Event Simulation

Application Modeling Options


Standard applications

More information available in session 1418 (OPNK08)

Custom applications

Multi-tier applications
Tasks and Phases

Application Demands

Similar to IP flows
Model simple request response transactions

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

1586 Building Realistic Application Models for Discrete Event Simulation

Application Modeling Options (cont.)


Real Application Simulation Module

New

Transaction Whiteboard
Capture and import real world traffic
Model real applications from capture data

Transaction Whiteboard

Use an existing trace file


Build from scratch (greenfield design)
Model complex applications

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

1586 Building Realistic Application Models for Discrete Event Simulation

Using Transaction Whiteboard in


Application Modeling
What is Transaction Whiteboard?
z Environment

for creating application definitions for planning / prediction

When should you use Transaction Whiteboard?


z Modeling

new applications
From scratch (greenfield design)
Using sophisticated application logic
From real world application captures
In a service-oriented architecture (SOA) environment using Web Service
Definition Language (WSDL) files
z Modifying an existing application captured with ACE Analyst Real
Application Simulation Module
Edit/modify existing trace
Chain applications

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

1586 Building Realistic Application Models for Discrete Event Simulation

Real Application Modeling Methodology


Understand the applications behavior
Perform captures (existing application)
Get specifications (new application)

Create/refine the application model


Import application (existing)
Build from scratch (new)
Create from WSDL file(s) (new)

Predict/Validate
QuickPredict
AppDoctor/Application Delay Tracking
Discrete Event Simulation (DES)

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

1586 Building Realistic Application Models for Discrete Event Simulation

Agenda
Application modeling methodologies
Creating application model in Transaction Whiteboard
Lab 1
Application modeling basics
Introduction to scripting in Transaction Whiteboard
Lab 2
Sophisticated application logic
Application model analysis
Lab 3
How do I
Review

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

1586 Building Realistic Application Models for Discrete Event Simulation

Creating Application Models from


Packet Captures
Capturing real world application traffic using ACE Live or
OPNET Application Capture agents

New
Real
Application
Simulation
Module

Transaction
Whiteboard

Capture Agent

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

10

1586 Building Realistic Application Models for Discrete Event Simulation

What Happens When You Open a


Web Page in a Browser?

z HTTP

GET (rfc1945.html)
z HTTP response
z Request / response for each image on the page
HTTP GET
(100 bytes)

Tier Processing Delay


(0.05 seconds)

Response
(2000 bytes)

Client

Web Server

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

11

1586 Building Realistic Application Models for Discrete Event Simulation

HTTP Example
In Transaction Whiteboard

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

12

1586 Building Realistic Application Models for Discrete Event Simulation

HTTP Example
What Did We Really Do?
What are you defining?
z Tiers
z Messages
z Dependencies

Created a logical definition of an application


z Independent

of any particular network


z Sequence of message sends glued together by dependencies
z Deployment to DES maps logical tiers to physical nodes

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

13

1586 Building Realistic Application Models for Discrete Event Simulation

Data Exchange Chart


Primary editing space
z Graphical

representation of

Tiers
Messages
Dependencies
z Timeline

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

14

1586 Building Realistic Application Models for Discrete Event Simulation

Message Editor
Tabular interface for editing message properties
z Only

selected messages appear

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

15

1586 Building Realistic Application Models for Discrete Event Simulation

What Types of Delays Does a Message See


as it Crosses a Network?
Bandwidth delay
z Time

it takes to stream all bits onto the link


z This number varies with message size
z Can be calculated from message size and link bandwidth

Latency delay
z Time

it takes for signal (1 bit) to travel across network


Distance / speed of light
z This is a constant number for all messages

Protocol delay
z Protocol

effects such as TCP slow start

Congestion delay
z Queuing

on devices
z Can vary from message to message
z Unknown prior to running the application, can vary for each run

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

16

1586 Building Realistic Application Models for Discrete Event Simulation

Network Delays (Example)


Example: Sending a 30,000-bit packet
z Bandwidth

= 1,000 bps
z Latency = 5 seconds

T=0

10

20

30

40

50

Client

30,000 bits

Bandwidth Delay
30 seconds
Latency Delay
5 seconds

Server

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

17

1586 Building Realistic Application Models for Discrete Event Simulation

Slope
Convenience when creating the application model
z Bandwidth

and latency delays only

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

18

1586 Building Realistic Application Models for Discrete Event Simulation

QuickPredict
Deploy application model
on a virtual network
z Answer

what-if questions
z Compare several virtual
network conditions
simultaneously

Refine the application


model

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

19

1586 Building Realistic Application Models for Discrete Event Simulation

Review
Application Modeling
z Why?
z How?

Application Modeling basics in Transaction Whiteboard


z Tiers
z Messages
z Dependencies
z Data

Exchange Chart
z Message Editor
z Simple Network Estimation
z QuickPredict

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

20

1586 Building Realistic Application Models for Discrete Event Simulation

Agenda
Application modeling methodologies
Creating application model in Transaction Whiteboard
Lab 1
Application modeling basics
Introduction to scripting in Transaction Whiteboard
Lab 2
Sophisticated application logic
Application model analysis
Lab 3
How do I
Review

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

21

1586 Building Realistic Application Models for Discrete Event Simulation

Lab 1: Overview
Goal
z To

determine the expected


response time for downloading a
large file
Unable to perform a packet
capture

Steps
z Represent

the application model


in Transaction Whiteboard
z Use QuickPredict to estimate the
response time

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

22

1586 Building Realistic Application Models for Discrete Event Simulation

Lab 1: Review
Modeled the file download in Transaction Whiteboard
Used QuickPredict to understand the expected response time
Didnt need an ACE file to perform this study

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

23

1586 Building Realistic Application Models for Discrete Event Simulation

Agenda
Application modeling methodologies
Creating application model in Transaction Whiteboard
Lab 1
Application modeling basics
Introduction to scripting in Transaction Whiteboard
Lab 2
Sophisticated application logic
Application model analysis
Lab 3
How do I
Review

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

24

1586 Building Realistic Application Models for Discrete Event Simulation

Connections
Why is it important to model connections?
Applications use connections in specific ways
z FTP

Control connection
Data connection

z HTTP

Single connection (HTTP 1.0)


Multiple connections (HTTP 1.1)

In Transaction Whiteboard
z Every

message belongs to a connection


Source / destination ports are assigned at run time

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

25

1586 Building Realistic Application Models for Discrete Event Simulation

TCP Connections
How are connections handled during simulation?
z Opening

connections
A TCP three-way handshake occurs in simulation the first time a
connection is used
z Closing connections
By default, connections are closed when the task is complete
z You can explicitly close a connection using the Transaction
Whiteboard scripting APIs

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

26

1586 Building Realistic Application Models for Discrete Event Simulation

UDP Connections
UDP connections are fundamentally different than TCP connections
z UDP

does not provide reliable delivery of messages

Modeling challenge
z How

does the application know when a packet is lost?


z What should happen if a packet is lost?

How should this application behave? Is message 4 sent? When?


1

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

27

1586 Building Realistic Application Models for Discrete Event Simulation

Drop Response
Ignore packet drop
z The

application resumes after a timer expires


Parameters: timeout, continue flag

Acknowledgement based
z ACKs

are sent to indicate that a packet was received


z Packets are retransmitted if an ACK is not received within a timeout period
z Parameters: timeout, ACK size, max number of retransmissions, continue flag

Negative acknowledgement based


z NACKs

are sent to indicate that a packet was not received


z Packet is retransmitted if an NACK is received
z Parameters: timeout, NACK size, max number of retransmissions, continue
flag
CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

28

1586 Building Realistic Application Models for Discrete Event Simulation

Drop Response Configuration


Per Connection:

Per Message:

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

29

1586 Building Realistic Application Models for Discrete Event Simulation

Distributions
Introduce variability
z Message

size
z Tier processing time
z User think time

Distribution types
z Exponential
z Uniform
z Normal
z Pareto

Note: QuickPredict uses the mean value of the distribution

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

30

1586 Building Realistic Application Models for Discrete Event Simulation

Modeling Repeated Request / Response


Patterns
How would you model the following chatty application
turns between web_server db_server
Each request is 50 bytes
Each request is sent 0.002 seconds after receiving a response
Each response is 200 bytes
Each response is sent 0.013 seconds after receiving a request

z 1400

Options
z Draw

~1400 messages
z Copy and paste ~1400 times
z Use message groups

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

31

1586 Building Realistic Application Models for Discrete Event Simulation

Message Groups
Quickly define a request/response pattern
z Converted

simulation

to individual messages prior to

Defining a message
group
z

Total application turns

Total application bytes

z
z

Total application bytes


Total processing at source
tier
Total processing at
destination tier

Colors represent the


message size in each
direction
CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

32

1586 Building Realistic Application Models for Discrete Event Simulation

How is a Message Group Converted to


Messages?

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

33

1586 Building Realistic Application Models for Discrete Event Simulation

Creating and Modifying Messages


Rapid message entry

Multi-level undo/redo
Tag
Multi-message editing mode

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

34

1586 Building Realistic Application Models for Discrete Event Simulation

Multi-Message Editing

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

35

1586 Building Realistic Application Models for Discrete Event Simulation

Agenda
Application modeling methodologies
Creating application model in Transaction Whiteboard
Lab 1
Application modeling basics
Introduction to scripting in Transaction Whiteboard
Lab 2
Sophisticated application logic
Application model analysis
Lab 3
How do I
Review

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

36

1586 Building Realistic Application Models for Discrete Event Simulation

Modifying the Sequence of Actions


Dynamically
What have we really defined in an application model?
z Sequence

of message send actions glued together by dependencies


z Static definition of an application
z Sequence of steps are always executed in the same order

But applications are complex


z Application

behavior isnt always known in advance


z Sequence of steps vary with each simulation run
z Network conditions can affect application behavior

Logic scripts can be used to model dynamic applications

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

37

1586 Building Realistic Application Models for Discrete Event Simulation

Logic Scripts
Python code
z Modify

or add to the sequence of actions

Other opportunities to write Python code


z Header

Block
z Initialization Block
z Function Block

Logic scripts are interpreted during


simulation
z QuickPredict
z Discrete

event simulation (DES)

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

38

1586 Building Realistic Application Models for Discrete Event Simulation

Example:
Home-Grown Calendar Application
Consider the following home-grown calendar application
z Users

can request to view by


Day (10K)
Week (100K)
Month (500K)
z Same application, the only difference is the size of the response

Modeling options
z Create

three Transaction Whiteboard files


z Import one of the ACE files into Transaction Whiteboard and then
parameterize the response size
We will take this approach

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

39

1586 Building Realistic Application Models for Discrete Event Simulation

Adding Parameters to an Application


Why?
z Change

the applications behavior in the project editor


z Model reuse
z Save time

What can be parameterized?


z Message

size
z Wait time
z Anything

Methodology
z Declare

the parameter
z Write logic script
z Give the parameter a value during deployment
CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

40

1586 Building Realistic Application Models for Discrete Event Simulation

Declare the Parameter


Scripting / Declare Parameters
z Name
z Type
z Default

value
z Description

Value can be
changed in the
project editor

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

41

1586 Building Realistic Application Models for Discrete Event Simulation

Write Logic Script


Insert a logic script
z Right-click

on dependency
z Add Logic Script

Write code that uses the parameter

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

42

1586 Building Realistic Application Models for Discrete Event Simulation

Give the Parameter a Value During


Deployment
Application deployment in DES
z Task

Definition object
z Task Specification
z Edit ACE Parameters

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

43

1586 Building Realistic Application Models for Discrete Event Simulation

Review:
Adding Parameters to an Application
Why?
z Change

the applications behavior in the project editor


z Model reuse
z Save time

Anything can be parameterized


Methodology
z Declare

the parameter
z Write logic script
z Give the parameter a value during deployment

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

44

1586 Building Realistic Application Models for Discrete Event Simulation

Agenda
Application modeling methodologies
Creating application model in Transaction Whiteboard
Lab 1
Application modeling basics
Introduction to scripting in Transaction Whiteboard
Lab 2
Sophisticated application logic
Application model analysis
Lab 3
How do I
Review

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

45

1586 Building Realistic Application Models for Discrete Event Simulation

Lab 2: Introduction
Overview
z Study

a web page which erroneously sends a large image file


z Given a capture for above page being downloaded by client

Objective
z Use

Transaction Whiteboard to model the corrected size of big image


z Using QuickPredict compare the download time for dial-up and broadband
users.

Steps
z Import

capture file into Real Application Simulation Module


z Create a Transaction Whiteboard file from packet capture
z Parameterize the size of the big image in the web page
z Use QuickPredict to determine the download time
CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

46

1586 Building Realistic Application Models for Discrete Event Simulation

Lab 2: Review
Summary:
z Created

application model by capturing real world traffic using Real


Application Simulation Module
z Parameterized the size of the big image transaction
Declared the parameter
Wrote logic script that used the parameter
z Determined the response time for HTTP transaction

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

47

1586 Building Realistic Application Models for Discrete Event Simulation

Agenda
Application modeling methodologies
Creating application model in Transaction Whiteboard
Lab 1
Application modeling basics
Introduction to scripting in Transaction Whiteboard
Lab 2
Sophisticated application logic
Application model analysis
Lab 3
How do I
Review

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

48

1586 Building Realistic Application Models for Discrete Event Simulation

What Can You Do in a Logic Script?


Basic
z Access

parameters
z Modify unsent messages
Size
CPU time
User time
z Collect custom statistics

For more information


z Transaction

Whiteboard Scripting API section of the ACE Analyst User Guide

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

49

1586 Building Realistic Application Models for Discrete Event Simulation

What Can You Do in a Logic Script?


(cont.)
Advanced
z Create

messages on the fly


z Schedule interrupts (timeout,
message received)
z Loop (for loop, goto)
z Invoke a child task
z Dynamic tier mapping (ie: custom
load balancing)
z Trigger server and mainframe jobs
in a discrete event simulation

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

50

1586 Building Realistic Application Models for Discrete Event Simulation

Supported Classes and Methods


To obtain information
about an executing
task
Create or modify
actions
Manage child tasks

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

51

1586 Building Realistic Application Models for Discrete Event Simulation

Example:
Modeling a Chatty Database Application
Modeling the performance of
a customer tracking database

ACE Trace

z You

have a capture of the


application
z Simple query results in many
repeated SQL requests

Number of customers is
expected to triple in 2012
z So

will the number of requests!

How does the response time


vary if we change the number
of SQL requests?
z Will

the application scale?

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

52

1586 Building Realistic Application Models for Discrete Event Simulation

Chatty Database Application (Approach #1)


Dynamically repeat a portion of the
application definition (goto)
z Tag

first and last messages of pattern


z Declare a parameter for the number of
times we want to loop
z When the last message is received,
goto the first message
Increment our loop count
z Only loop back if the loop count is less
than our parameter
def last_message_received (self):
num_rows = self.get_parameter ('num_rows')
if (self.loop_count < num_rows):
self.loop_count = self.loop_count + 1
first_message = self.get_message ('first_message')
self.goto_action (first_message)

last_message = self.get_message ('last_message')


self.register_receipt_callback (last_message, self.last_message_received, ())

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

53

1586 Building Realistic Application Models for Discrete Event Simulation

Chatty Database Application (Approach #2)


Dynamically create the pattern of
messages
Nest the pattern within a for loop
z

Declare a parameter for the number of times


we want to loop

Messages do not appear in the Data


Exchange Chart num_requests = self.get_parameter ('num_rows')
message = None
for i in num_requests:
message = self.create_message
message = self.create_message
message.cpu_time = .000752
message = self.create_message
message.cpu_time = .000737
message = self.create_message
message.cpu_time = .001170
message = self.create_message
message.cpu_time = .001109
message = self.create_message
message.cpu_time = .001591
message = self.create_message
message.cpu_time = .000719
message = self.create_message
message.cpu_time = .000764
message = self.create_message
message.cpu_time = .0001176
message = self.create_message
message.cpu_time = .0000930

size

sender

receiver

parent action

(21, 'Oracle_Client', 'Oracle_Server' message)


(16, 'Oracle_Server', 'Oracle_Client' message)
(111, 'Oracle_Client', 'Oracle_Server' message)
(56, 'Oracle_Server', 'Oracle_Client' message)
(258, 'Oracle_Client', 'Oracle_Server' message)
(124, 'Oracle_Server', 'Oracle_Client' message)
(17, 'Oracle_Client', 'Oracle_Server' message)
(11, 'Oracle_Server', 'Oracle_Client' message)
(17, 'Oracle_Client', 'Oracle_Server' message)
(11, 'Oracle_Server', 'Oracle_Client' message)

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

54

1586 Building Realistic Application Models for Discrete Event Simulation

Chatty Database Application (Review)

Accessed a parameter

Scheduled a message received interrupt


z

Looped using goto

Created messages on the fly


z

Looped a for loop

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

55

1586 Building Realistic Application Models for Discrete Event Simulation

Example: Adding a Front-End to an


Existing Database Application
Extend analysis of customer
tracking database to study
deployment over a WAN

Front-end application model

z New

front-end
z Back-end exists as a separate file

Modeling goals
z Network

impact
z Response time

How should we model this


application?

Back-end application model

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

56

1586 Building Realistic Application Models for Discrete Event Simulation

Stitching in Child Task


Invoke the existing file
z Child

is stitched into
the parent file
z Parent can pass
parameters down to the
child

action

task name

is blocking

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

parameters
57

1586 Building Realistic Application Models for Discrete Event Simulation

Combining Two Transactions


What would the composite application look like?
client

app_server

app_server

db_server
CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

58

1586 Building Realistic Application Models for Discrete Event Simulation

Blocking vs. No-Blocking Mode


Blocking:

Non-blocking:

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

59

1586 Building Realistic Application Models for Discrete Event Simulation

Invoking Child Task: Declare Child Tasks


Declare the child task
z Required

step
z Map tier names
Actual tier name doesnt need to
exist in the parent task

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

60

1586 Building Realistic Application Models for Discrete Event Simulation

Three-Tier SQL Application (Review)


Example of application chaining
z Allows

one task file to invoke another


z Reusability of existing files
z Blocking vs. non-blocking

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

61

1586 Building Realistic Application Models for Discrete Event Simulation

Agenda
Application modeling methodologies
Creating application model in Transaction Whiteboard
Lab 1
Application modeling basics
Introduction to scripting in Transaction Whiteboard
Lab 2
Sophisticated application logic
Application model analysis
Lab 3
How do I
Review

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

62

1586 Building Realistic Application Models for Discrete Event Simulation

Custom Statistics
Modeling studies are not limited to response time analysis
z Analyze

response time of sub-components of an application


z Track the number of times a particular event happens

Logic scripts allow user to define custom statistics

Statistic are selectable and can be collected in discrete event simulation


(DES) see Lab 3

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

63

1586 Building Realistic Application Models for Discrete Event Simulation

Application Delay Tracking


AppDoctor for discrete event simulation (DES)
Tells the story of a packet
z Analyze

components of delay
z Identify problems quickly

Answers the following questions


z Did

my application spend more time processing at the application layer or in


the network layer?
z What intermediate nodes or links were the largest bottlenecks?
z Where were application packets dropped?
z What are my slowest applications?

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

64

1586 Building Realistic Application Models for Discrete Event Simulation

Application Delay Tracking (cont.)


Selective enable on a per profile basis on client workstations

Interactive tree with drill down capabilities

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

65

1586 Building Realistic Application Models for Discrete Event Simulation

Packet Analyzer and AppDoctor


Capture in DES environment (creates .csv file)
Import the CSV trace (into Real Application Simulation Module)
Analyze the delay components that contribute to the total response
time of the application
Real
Application
Simulation
Module
Packet Analyzer

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

AppDoctor

66

1586 Building Realistic Application Models for Discrete Event Simulation

Agenda
Application modeling methodologies
Creating application model in Transaction Whiteboard
Lab 1
Application modeling basics
Introduction to scripting in Transaction Whiteboard
Lab 2
Sophisticated application logic
Application model analysis
Lab 3
How do I
Review

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

67

1586 Building Realistic Application Models for Discrete Event Simulation

Lab 3
Goal
z To

find out how much of the total response time is due to the big image for
broadband users

Steps
z Write

logic scripts to define custom statistics


z Import the model into DES
z Run simulation and analyze results

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

68

1586 Building Realistic Application Models for Discrete Event Simulation

Defining and Deploying Application


Task Definition
Application Definition
Profile Definition
Supported Profiles, Supported Services
Destination Preferences, ACE Tier Configuration
Application deployment wizard
More info in Session 1418 (OPNETWORK 08)

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

69

1586 Building Realistic Application Models for Discrete Event Simulation

Lab 3: Review
Comparison: Original Vs Corrected

Parameters give you the flexibility to re-use whiteboard file in multiple scenarios
Custom statistics provides greater control in how you study your application
CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

70

1586 Building Realistic Application Models for Discrete Event Simulation

Agenda
Application modeling methodologies
Creating application model in Transaction Whiteboard
Lab 1
Application modeling basics
Introduction to scripting in Transaction Whiteboard
Lab 2
Sophisticated application logic
Application model analysis
Lab 3
How do I
Review

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

71

1586 Building Realistic Application Models for Discrete Event Simulation

How Do I Model Custom Load Balancing?


Deploying an application in the Project Editor
z Issue:

you may not know which physical node to map a given logical tier to
when the application begins

What happens if you try to


go to www.google.com from
Chile?

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

72

1586 Building Realistic Application Models for Discrete Event Simulation

How Do I Model Custom Load Balancing?


(cont.)
What happens if you try to go to www.google.com from Chile?
z Automatically

redirected to www.google.cl

HTTP global load balancing


z Three-tier

application
Similar to DNS

Client doesnt pick its server until mid-way through the transaction

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

73

1586 Building Realistic Application Models for Discrete Event Simulation

How Do I Model Custom Load Balancing?


(cont.)
Declare and set the attribute in the Project Editor

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

74

1586 Building Realistic Application Models for Discrete Event Simulation

How Do I Model Custom Load Balancing?


(cont.)
Use a logic script to determine the physical deployment for the logical
tier web_server

client_node = self.get_tier_node ('client')


client_location = client_node.get_attr ('Location', 'USA')
server_nodes = self.get_nodes_compatible_with_tier ('web_server')
for i in range (server_nodes):
server = server_nodes [i]
server_location = server.get_attr ('Location', 'Unknown')
if (client_location == server_location):
self.set_tier_node ('web_server', server)
break
CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

75

1586 Building Realistic Application Models for Discrete Event Simulation

How Do I Create Flows From My


Transaction Whiteboard Files?
Deployed ACE traffic can be converted into IP traffic flows
Toggle to convert ACE
traffic to IP traffic flows
The IP traffic flow will
replace the ACE discrete
traffic
Can be converted back to
ACE traffic (discrete). This
removes the IP traffic flows
that were converted earlier.

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

76

1586 Building Realistic Application Models for Discrete Event Simulation

How Do I Add Back-End Traffic?


Four-tier application
Only able to capture traffic from the first three tiers
Delay due to interaction with fourth tier is attributed as tier processing
on the third tier

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

77

1586 Building Realistic Application Models for Discrete Event Simulation

How Do I Add Back-End Traffic? (cont.)


Import into Whiteboard
Insert Tier
Insert Message Group
Change the parent
dependency of the
response from app server
to web server
Change the processing
time of the response

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

78

1586 Building Realistic Application Models for Discrete Event Simulation

Agenda
Application modeling methodologies
Creating application model in Transaction Whiteboard
Lab 1
Application modeling basics
Introduction to scripting in Transaction Whiteboard
Lab 2
Sophisticated application logic
Application model analysis
Lab 3
How do I
Review

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

79

1586 Building Realistic Application Models for Discrete Event Simulation

What Have We Learned?


Approaches for modeling real world applications
Real Application Modeling
Basic concepts
z Advanced concepts
z Transaction Whiteboard
z Logic scripts
Parameterize a portion of an application model
z Complex application logic
Looping
Application chaining
Dynamic message creation
z

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

80

1586 Building Realistic Application Models for Discrete Event Simulation

Whats New in 16.0


New

Real Application Simulation Module


Extends Modeler with new application design and
analysis features
Provides a complete end-to-end solution for real world
application modeling
Adds ability to capture real traffic
AppDoctor

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

81

1586 Building Realistic Application Models for Discrete Event Simulation

Documentation References
Product documentation
z

Help / Product Documentation (F1)


Transaction Whiteboard Tutorials
ACE Analyst User Guide

OPNET Support Center


http://www.opnet.com/support
z Contributed models
z FAQs
1379: What are some tips for getting started with the ACE Whiteboard?
z

Sample Transaction Whiteboard Files


z

Sys / examples /ACE Analyst / examples /_*

TAs will be available following the session


CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

82

1586 Building Realistic Application Models for Discrete Event Simulation

Related OPNETWORK Sessions


OPNET Application Modeling courses
z 1418:

Modeling Applications using the "Standard Application" Models (from


OPNETWORK 2008)
z 1402: Planning Application Deployments with ACE Analyst
z 1396: Introduction to Python Programming Language

Other related sessions


z 1443:

Customizing Analysis and Visualization in ACE Analyst


z 1404: Troubleshooting and Predicting the Impact of TCP on Application
Performance with ACE
z 1701: ACE Analyst User Feedback Forum
z 1433: Troubleshooting and Predicting the Performance of Web Services
(SOAP, XML-RPC, REST) with ACE (from OPNETWORK 2008)

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

83

1586 Building Realistic Application Models for Discrete Event Simulation

Take-Away Points
Real Application Simulation Module capabilities
What is Transaction Whiteboard?
z Environment

analysis

for creating application definitions for planning, simulation and

What can I do with Transaction Whiteboard?


z Create

an application from scratch (greenfield design)


z Modify an application captured with Real Application Simulation Module
z Model sophisticated application logic

AppDoctor
z Provides

time

insight into various delays which contribute to application response

CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. 2010 OPNET Technologies, Inc.

84

Você também pode gostar