Upload
naiemece
View
241
Download
1
Embed Size (px)
DESCRIPTION
Building Realistic Application Models in optnet using custom application.
Citation preview
CONFIDENTIAL RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc.
2007 OPNET Technologies, Inc.
Building Realistic Application Models for Discrete Event Simulation
R&D Solutions for Commercial and Defense Networks
Session 1586
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.
2
1586 Building Realistic Application Models for 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.
What Can You Expect from This Session?
Application ModelingModeling methodologiesTransaction Whiteboard in Real Application Simulation Module
Prediction studies and model validation
PrerequisitesFamiliarity with OPNET Modeler
3
1586 Building Realistic Application Models for 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.
Agenda
Application modeling methodologiesCreating application model in Transaction WhiteboardLab 1Application modeling basicsIntroduction to scripting in Transaction WhiteboardLab 2Sophisticated application logicApplication model analysis Lab 3How do I Review
4
1586 Building Realistic Application Models for 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.
Application Modeling Can Answer Questions
How will my application perform on my network?Setting response time expectations for new applications, baselines for existing applications
How will changes to existing applications affect my network?Will the existing network infrastructure support the changes?
How will changes to my network affect my existing applications?How will server consolidations and link upgrades affect response times?
5
1586 Building Realistic Application Models for 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.
Application Modeling Options
Standard applicationsMore information available in session 1418 (OPNK08)
Custom applications Multi-tier applicationsTasks and Phases
Application DemandsSimilar to IP flowsModel simple request response transactions
6
1586 Building Realistic Application Models for 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.
Application Modeling Options (cont.)
Real Application Simulation ModuleTransaction Whiteboard Capture and import real world traffic Model real applications from capture data
Transaction WhiteboardUse an existing trace fileBuild from scratch (greenfield design)Model complex applications
New
7
1586 Building Realistic Application Models for 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.
Using Transaction Whiteboard in Application Modeling
What is Transaction Whiteboard?Environment for creating application definitions for planning / prediction
When should you use Transaction Whiteboard?Modeling new applications
From scratch (greenfield design)Using sophisticated application logicFrom real world application capturesIn a service-oriented architecture (SOA) environment using Web Service Definition Language (WSDL) files
Modifying an existing application captured with ACE Analyst Real Application Simulation Module
Edit/modify existing traceChain applications
8
1586 Building Realistic Application Models for 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.
Real Application Modeling Methodology
Predict/ValidateQuickPredict
AppDoctor/Application Delay TrackingDiscrete Event Simulation (DES)
Understand the applications behaviorPerform captures (existing application)Get specifications (new application)
Create/refine the application modelImport application (existing)Build from scratch (new)Create from WSDL file(s) (new)
9
1586 Building Realistic Application Models for 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.
Agenda
Application modeling methodologiesCreating application model in Transaction WhiteboardLab 1Application modeling basicsIntroduction to scripting in Transaction WhiteboardLab 2Sophisticated application logicApplication model analysisLab 3How do I Review
10
1586 Building Realistic Application Models for 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.
Creating Application Models from Packet Captures
Capturing real world application traffic using ACE Live or OPNET Application Capture agents
TransactionWhiteboard
Real Application Simulation
ModuleCapture Agent
New
11
1586 Building Realistic Application Models for 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.
What Happens When You Open a Web Page in a Browser?
HTTP GET (rfc1945.html)HTTP responseRequest / response for each image on the page
Client
Web Server
HTTP GET(100 bytes)
Response(2000 bytes)
Tier Processing Delay(0.05 seconds)
12
1586 Building Realistic Application Models for 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.
HTTP ExampleIn Transaction Whiteboard
13
1586 Building Realistic Application Models for 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.
HTTP ExampleWhat Did We Really Do?
What are you defining?TiersMessagesDependencies
Created a logical definition of an applicationIndependent of any particular networkSequence of message sends glued together by dependenciesDeployment to DES maps logical tiers to physical nodes
14
1586 Building Realistic Application Models for 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.
Data Exchange Chart
Primary editing spaceGraphical representation of
TiersMessagesDependencies
Timeline
15
1586 Building Realistic Application Models for 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.
Message Editor
Tabular interface for editing message propertiesOnly selected messages appear
16
1586 Building Realistic Application Models for 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.
What Types of Delays Does a Message See as it Crosses a Network?
Bandwidth delayTime it takes to stream all bits onto the linkThis number varies with message sizeCan be calculated from message size and link bandwidth
Latency delayTime it takes for signal (1 bit) to travel across network
Distance / speed of lightThis is a constant number for all messages
Protocol delay Protocol effects such as TCP slow start
Congestion delayQueuing on devicesCan vary from message to messageUnknown prior to running the application, can vary for each run
17
1586 Building Realistic Application Models for 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.
5 seconds
30 seconds
Latency Delay
Bandwidth Delay
Network Delays (Example)
Example: Sending a 30,000-bit packetBandwidth = 1,000 bpsLatency = 5 seconds
Client
Server
T = 0
30,000 bits
10 20 30 40 50
18
1586 Building Realistic Application Models for 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.
Slope
Convenience when creating the application modelBandwidth and latency delays only
19
1586 Building Realistic Application Models for 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.
QuickPredict
Deploy application model on a virtual network
Answer what-if questionsCompare several virtual network conditions simultaneously
Refine the application model
20
1586 Building Realistic Application Models for 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.
Review
Application ModelingWhy?How?
Application Modeling basics in Transaction WhiteboardTiersMessagesDependenciesData Exchange ChartMessage EditorSimple Network EstimationQuickPredict
21
1586 Building Realistic Application Models for 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.
Agenda
Application modeling methodologiesCreating application model in Transaction WhiteboardLab 1Application modeling basicsIntroduction to scripting in Transaction WhiteboardLab 2Sophisticated application logicApplication model analysis Lab 3How do I Review
22
1586 Building Realistic Application Models for 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.
Lab 1: Overview
GoalTo determine the expected response time for downloading a large file
Unable to perform a packet capture
StepsRepresent the application model in Transaction WhiteboardUse QuickPredict to estimate the response time
23
1586 Building Realistic Application Models for 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.
Lab 1: Review
Modeled the file download in Transaction WhiteboardUsed QuickPredict to understand the expected response timeDidnt need an ACE file to perform this study
24
1586 Building Realistic Application Models for 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.
Agenda
Application modeling methodologiesCreating application model in Transaction WhiteboardLab 1Application modeling basicsIntroduction to scripting in Transaction WhiteboardLab 2Sophisticated application logicApplication model analysis Lab 3How do I Review
25
1586 Building Realistic Application Models for 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.
Connections
Why is it important to model connections?
Applications use connections in specific waysFTP
Control connectionData connection
HTTPSingle connection (HTTP 1.0)Multiple connections (HTTP 1.1)
In Transaction WhiteboardEvery message belongs to a connection
Source / destination ports are assigned at run time
26
1586 Building Realistic Application Models for 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.
TCP Connections
How are connections handled during simulation?Opening connections
A TCP three-way handshake occurs in simulation the first time a connection is used
Closing connectionsBy default, connections are closed when the task is complete
You can explicitly close a connection using the Transaction Whiteboard scripting APIs
27
1586 Building Realistic Application Models for 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.
UDP Connections
UDP connections are fundamentally different than TCP connectionsUDP does not provide reliable delivery of messages
Modeling challengeHow does the application know when a packet is lost?What should happen if a packet is lost?
How should this application behave? Is message 4 sent? When?
1 2 3 4
28
1586 Building Realistic Application Models for 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.
Drop Response
Ignore packet dropThe application resumes after a timer expires
Parameters: timeout, continue flag
Acknowledgement basedACKs are sent to indicate that a packet was receivedPackets are retransmitted if an ACK is not received within a timeout periodParameters: timeout, ACK size, max number of retransmissions, continue flag
Negative acknowledgement basedNACKs are sent to indicate that a packet was not receivedPacket is retransmitted if an NACK is receivedParameters: timeout, NACK size, max number of retransmissions, continue flag
29
1586 Building Realistic Application Models for 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.
Drop Response Configuration
Per Connection:
Per Message:
30
1586 Building Realistic Application Models for 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.
Distributions
Introduce variabilityMessage sizeTier processing timeUser think time
Distribution typesExponentialUniformNormalPareto
Note: QuickPredict uses the mean value of the distribution
31
1586 Building Realistic Application Models for 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.
Modeling Repeated Request / Response Patterns
How would you model the following chatty application1400 turns between web_server db_server
Each request is 50 bytesEach request is sent 0.002 seconds after receiving a responseEach response is 200 bytesEach response is sent 0.013 seconds after receiving a request
OptionsDraw ~1400 messagesCopy and paste ~1400 timesUse message groups
32
1586 Building Realistic Application Models for 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.
Message Groups
Quickly define a request/response patternConverted to individual messages prior to simulation
Defining a message group
Total application turnsTotal application bytes Total application bytes Total processing at source tierTotal processing at destination tier
Colors represent the message size in each direction
33
1586 Building Realistic Application Models for 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.
How is a Message Group Converted to Messages?
34
1586 Building Realistic Application Models for 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.
Creating and Modifying Messages
Rapid message entry
Multi-level undo/redo
Tag
Multi-message editing mode
35
1586 Building Realistic Application Models for 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.
Multi-Message Editing
36
1586 Building Realistic Application Models for 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.
Agenda
Application modeling methodologiesCreating application model in Transaction WhiteboardLab 1Application modeling basicsIntroduction to scripting in Transaction WhiteboardLab 2Sophisticated application logicApplication model analysis Lab 3How do I Review
37
1586 Building Realistic Application Models for 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.
Modifying the Sequence of Actions Dynamically
What have we really defined in an application model?Sequence of message send actions glued together by dependenciesStatic definition of an applicationSequence of steps are always executed in the same order
But applications are complexApplication behavior isnt always known in advanceSequence of steps vary with each simulation runNetwork conditions can affect application behavior
Logic scripts can be used to model dynamic applications
38
1586 Building Realistic Application Models for 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.
Logic Scripts
Python codeModify or add to the sequence of actions
Other opportunities to write Python codeHeader BlockInitialization BlockFunction Block
Logic scripts are interpreted during simulation
QuickPredictDiscrete event simulation (DES)
39
1586 Building Realistic Application Models for 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.
Example: Home-Grown Calendar Application
Consider the following home-grown calendar applicationUsers can request to view by
Day (10K)Week (100K)Month (500K)
Same application, the only difference is the size of the response
Modeling optionsCreate three Transaction Whiteboard filesImport one of the ACE files into Transaction Whiteboard and thenparameterize the response size
We will take this approach
40
1586 Building Realistic Application Models for 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.
Adding Parameters to an Application
Why?Change the applications behavior in the project editorModel reuseSave time
What can be parameterized?Message sizeWait timeAnything
MethodologyDeclare the parameterWrite logic scriptGive the parameter a value during deployment
41
1586 Building Realistic Application Models for 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.
Declare the Parameter
Scripting / Declare ParametersNameTypeDefault valueDescription
Value can be changed in the project editor
42
1586 Building Realistic Application Models for 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.
Write Logic Script
Insert a logic scriptRight-click on dependencyAdd Logic Script
Write code that uses the parameter
43
1586 Building Realistic Application Models for 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.
Give the Parameter a Value During Deployment
Application deployment in DES Task Definition objectTask SpecificationEdit ACE Parameters
44
1586 Building Realistic Application Models for 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.
Review: Adding Parameters to an Application
Why?Change the applications behavior in the project editorModel reuseSave time
Anything can be parameterized
MethodologyDeclare the parameterWrite logic scriptGive the parameter a value during deployment
45
1586 Building Realistic Application Models for 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.
Agenda
Application modeling methodologiesCreating application model in Transaction WhiteboardLab 1Application modeling basicsIntroduction to scripting in Transaction WhiteboardLab 2Sophisticated application logicApplication model analysisLab 3How do I Review
46
1586 Building Realistic Application Models for 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.
Lab 2: Introduction
OverviewStudy a web page which erroneously sends a large image fileGiven a capture for above page being downloaded by client
ObjectiveUse Transaction Whiteboard to model the corrected size of big imageUsing QuickPredict compare the download time for dial-up and broadband users.
StepsImport capture file into Real Application Simulation ModuleCreate a Transaction Whiteboard file from packet captureParameterize the size of the big image in the web pageUse QuickPredict to determine the download time
47
1586 Building Realistic Application Models for 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.
Lab 2: Review
Summary:Created application model by capturing real world traffic using Real Application Simulation ModuleParameterized the size of the big image transaction
Declared the parameterWrote logic script that used the parameter
Determined the response time for HTTP transaction
48
1586 Building Realistic Application Models for 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.
Agenda
Application modeling methodologiesCreating application model in Transaction WhiteboardLab 1Application modeling basicsIntroduction to scripting in Transaction WhiteboardLab 2Sophisticated application logicApplication model analysisLab 3How do I Review
49
1586 Building Realistic Application Models for 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.
What Can You Do in a Logic Script?
BasicAccess parametersModify unsent messages
SizeCPU timeUser time
Collect custom statistics
For more informationTransaction Whiteboard Scripting API section of the ACE Analyst User Guide
50
1586 Building Realistic Application Models for 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.
What Can You Do in a Logic Script? (cont.)
AdvancedCreate messages on the flySchedule interrupts (timeout, message received)Loop (for loop, goto)Invoke a child taskDynamic tier mapping (ie: custom load balancing)Trigger server and mainframe jobs in a discrete event simulation
51
1586 Building Realistic Application Models for 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.
Supported Classes and Methods
To obtain information about an executing taskCreate or modify actionsManage child tasks
52
1586 Building Realistic Application Models for 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.
Example: Modeling a Chatty Database Application
Modeling the performance of a customer tracking database
You have a capture of the applicationSimple query results in many repeated SQL requests
Number of customers is expected to triple in 2012
So will the number of requests!
How does the response time vary if we change the number of SQL requests?
Will the application scale?
ACE Trace
53
1586 Building Realistic Application Models for 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.
Chatty Database Application (Approach #1)
Dynamically repeat a portion of the application definition (goto)
Tag first and last messages of patternDeclare a parameter for the number of times we want to loopWhen the last message is received, goto the first message
Increment our loop countOnly 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 + 1first_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, ())
54
1586 Building Realistic Application Models for 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.
Chatty Database Application (Approach #2)
Dynamically create the pattern of messages Nest the pattern within a for loop
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 = Nonefor i in num_requests:
message = self.create_message (21, 'Oracle_Client', 'Oracle_Server' message)message = self.create_message (16, 'Oracle_Server', 'Oracle_Client' message)message.cpu_time = .000752message = self.create_message (111, 'Oracle_Client', 'Oracle_Server' message)message.cpu_time = .000737message = self.create_message (56, 'Oracle_Server', 'Oracle_Client' message)message.cpu_time = .001170message = self.create_message (258, 'Oracle_Client', 'Oracle_Server' message)message.cpu_time = .001109message = self.create_message (124, 'Oracle_Server', 'Oracle_Client' message)message.cpu_time = .001591message = self.create_message (17, 'Oracle_Client', 'Oracle_Server' message)message.cpu_time = .000719message = self.create_message (11, 'Oracle_Server', 'Oracle_Client' message)message.cpu_time = .000764message = self.create_message (17, 'Oracle_Client', 'Oracle_Server' message)message.cpu_time = .0001176message = self.create_message (11, 'Oracle_Server', 'Oracle_Client' message)message.cpu_time = .0000930
size sender receiver parent action
55
1586 Building Realistic Application Models for 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.
Chatty Database Application (Review)
Accessed a parameter
Scheduled a message received interruptLooped using goto
Created messages on the flyLooped a for loop
56
1586 Building Realistic Application Models for 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.
Example: Adding a Front-End to an Existing Database Application
Extend analysis of customer tracking database to study deployment over a WAN
New front-endBack-end exists as a separate file
Modeling goalsNetwork impactResponse time
How should we model this application?
Front-end application model
Back-end application model
57
1586 Building Realistic Application Models for 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.
Stitching in Child Task
Invoke the existing fileChild is stitched into the parent fileParent can pass parameters down to the child
action task name is blocking parameters
58
1586 Building Realistic Application Models for 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.
Combining Two Transactions
+
What would the composite application look like?client
app_server
db_server
app_server
59
1586 Building Realistic Application Models for 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.
Blocking vs. No-Blocking Mode
Blocking:
Non-blocking:
60
1586 Building Realistic Application Models for 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.
Invoking Child Task: Declare Child Tasks
Declare the child taskRequired stepMap tier names
Actual tier name doesnt need to exist in the parent task
61
1586 Building Realistic Application Models for 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.
Three-Tier SQL Application (Review)
Example of application chainingAllows one task file to invoke anotherReusability of existing filesBlocking vs. non-blocking
62
1586 Building Realistic Application Models for 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.
Agenda
Application modeling methodologiesCreating application model in Transaction WhiteboardLab 1Application modeling basicsIntroduction to scripting in Transaction WhiteboardLab 2Sophisticated application logicApplication model analysisLab 3How do I Review
63
1586 Building Realistic Application Models for 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.
Custom Statistics
Modeling studies are not limited to response time analysisAnalyze response time of sub-components of an applicationTrack 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
64
1586 Building Realistic Application Models for 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.
Application Delay Tracking
AppDoctor for discrete event simulation (DES)
Tells the story of a packetAnalyze components of delayIdentify problems quickly
Answers the following questionsDid my application spend more time processing at the application layer or in the network layer?What intermediate nodes or links were the largest bottlenecks?Where were application packets dropped?What are my slowest applications?
65
1586 Building Realistic Application Models for 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.
Application Delay Tracking (cont.)
Selective enable on a per profile basis on client workstations
Interactive tree with drill down capabilities
66
1586 Building Realistic Application Models for 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.
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 ApplicationSimulation
Module
Packet Analyzer AppDoctor
67
1586 Building Realistic Application Models for 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.
Agenda
Application modeling methodologiesCreating application model in Transaction WhiteboardLab 1Application modeling basicsIntroduction to scripting in Transaction WhiteboardLab 2Sophisticated application logicApplication model analysis Lab 3How do I Review
68
1586 Building Realistic Application Models for 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.
Lab 3
GoalTo find out how much of the total response time is due to the big image for broadband users
StepsWrite logic scripts to define custom statisticsImport the model into DESRun simulation and analyze results
69
1586 Building Realistic Application Models for 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.
Defining and Deploying Application
Task DefinitionApplication DefinitionProfile DefinitionSupported Profiles, Supported ServicesDestination Preferences, ACE Tier ConfigurationApplication deployment wizardMore info in Session 1418 (OPNETWORK 08)
70
1586 Building Realistic Application Models for 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.
Lab 3: Review
Comparison: Original Vs Corrected
Parameters give you the flexibility to re-use whiteboard file in multiple scenariosCustom statistics provides greater control in how you study your application
71
1586 Building Realistic Application Models for 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.
Agenda
Application modeling methodologiesCreating application model in Transaction WhiteboardLab 1Application modeling basicsIntroduction to scripting in Transaction WhiteboardLab 2Sophisticated application logicApplication model analysis Lab 3How do I Review
72
1586 Building Realistic Application Models for 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.
How Do I Model Custom Load Balancing?
Deploying an application in the Project EditorIssue: 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?
73
1586 Building Realistic Application Models for 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.
How Do I Model Custom Load Balancing? (cont.)
What happens if you try to go to www.google.com from Chile?Automatically redirected to www.google.cl
HTTP global load balancingThree-tier application
Similar to DNS
Client doesnt pick its server until mid-way through the transaction
74
1586 Building Realistic Application Models for 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.
How Do I Model Custom Load Balancing? (cont.)
Declare and set the attribute in the Project Editor
75
1586 Building Realistic Application Models for 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.
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
76
1586 Building Realistic Application Models for 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.
How Do I Create Flows From My Transaction Whiteboard Files?
Deployed ACE traffic can be converted into IP traffic flowsToggle to convert ACE traffic to IP traffic flowsThe IP traffic flow will replace the ACE discrete trafficCan be converted back to ACE traffic (discrete). This removes the IP traffic flows that were converted earlier.
77
1586 Building Realistic Application Models for 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.
How Do I Add Back-End Traffic?
Four-tier applicationOnly able to capture traffic from the first three tiersDelay due to interaction with fourth tier is attributed as tier processing on the third tier
78
1586 Building Realistic Application Models for 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.
How Do I Add Back-End Traffic? (cont.)
Import into WhiteboardInsert TierInsert Message GroupChange the parent dependency of the response from app server to web serverChange the processing time of the response
79
1586 Building Realistic Application Models for 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.
Agenda
Application modeling methodologiesCreating application model in Transaction WhiteboardLab 1Application modeling basicsIntroduction to scripting in Transaction WhiteboardLab 2Sophisticated application logicApplication model analysis Lab 3How do I Review
80
1586 Building Realistic Application Models for 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.
What Have We Learned?
Approaches for modeling real world applications
Real Application ModelingBasic conceptsAdvanced conceptsTransaction WhiteboardLogic scripts
Parameterize a portion of an application modelComplex application logic
LoopingApplication chainingDynamic message creation
81
1586 Building Realistic Application Models for 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.
Whats New in 16.0
Real Application Simulation ModuleExtends Modeler with new application design and analysis featuresProvides a complete end-to-end solution for real world application modelingAdds ability to capture real trafficAppDoctor
New
82
1586 Building Realistic Application Models for 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.
Documentation References
Product documentationHelp / Product Documentation (F1)
Transaction Whiteboard TutorialsACE Analyst User Guide
OPNET Support Centerhttp://www.opnet.com/supportContributed modelsFAQs
1379: What are some tips for getting started with the ACE Whiteboard?
Sample Transaction Whiteboard FilesSys / examples /ACE Analyst / examples /_*
TAs will be available following the session
83
1586 Building Realistic Application Models for 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.
Related OPNETWORK Sessions
OPNET Application Modeling courses1418: Modeling Applications using the "Standard Application" Models (from OPNETWORK 2008)1402: Planning Application Deployments with ACE Analyst1396: Introduction to Python Programming Language
Other related sessions1443: Customizing Analysis and Visualization in ACE Analyst 1404: Troubleshooting and Predicting the Impact of TCP on Application Performance with ACE1701: ACE Analyst User Feedback Forum 1433: Troubleshooting and Predicting the Performance of Web Services (SOAP, XML-RPC, REST) with ACE (from OPNETWORK 2008)
84
1586 Building Realistic Application Models for 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.
Take-Away Points
Real Application Simulation Module capabilities
What is Transaction Whiteboard?Environment for creating application definitions for planning, simulation and analysis
What can I do with Transaction Whiteboard?Create an application from scratch (greenfield design)Modify an application captured with Real Application Simulation ModuleModel sophisticated application logic
AppDoctorProvides insight into various delays which contribute to application response time