Professional Documents
Culture Documents
1550 - Accelerating Simulations Using Efficient Modeling Techniques
1550 - Accelerating Simulations Using Efficient Modeling Techniques
1550 - Accelerating Simulations Using Efficient Modeling Techniques
Session Goals
Learn the basics of factors affecting efficiency of Modeler
simulation through a combination of lectures and labs
Learn and practice Modeler efficiency techniques and
methodologies to identify causes of performance problems
Topics include
z Kernel
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
Introduction
Simulation Optimization Goals
z Session organization: from the Simple to the Complex
z
Modeling Efficiency
Take-Away Points
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.
wall-clock time
z Increase events/second
Tighter
z Less
memory
z Less chance of using swap space
z Better performance scaling with size of model
Cleaner
z Easier
to maintain
Valid
z Modeling
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.
Start
Understanding the
system
Understanding your
goals for the
simulation
Choosing aspects
to be modeled
No
Specifying the
system model
System results
accurate?
Yes
Results
sufficiently
detailed?
No
Results
statistically
useful?
No
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.
models
z Pipeline stages
z External files
User Models
etc.
z Time spent in kernel procedures is
dictated by model code
management
z Dispatching interrupts
z Handling packet send/receive
Operating System
z Memory
paging/swapping
DES Kernel
Services
DES Kernel
Engine
OS
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.
Simulation Models
Simulation Methods
z Discrete
DES models
z Open
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.
Optimize Everything!
Easy
Efficient environment
Efficient simulation kernel
Efficient compilation
Efficient model representation
Efficient configuration of protocols
Efficient code
z Data
Difficult
structures
z Algorithms
z Efficient Kernel Procedures
z Model design and abstraction
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.
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
Introduction
Modeling Efficiency
Take-Away Points
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
Efficient Environment
Faster hardware
z Multi-Core
processor machines
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
Efficient Environment:
Concurrent Simulations
Modern CPUs have more than one microprocessor core
z Execute
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
development/debugging
z OPNET Simulation Debugger (ODB)
z Profiling capability in Kernel Procedures
Optimized Kernel
z No
Parallel Kernel
z Use
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
Efficient Compilation
Use compiler optimizations
z Configuration
<<<
*
*
*
*
*
*
*
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
LAB 1:
Simulation Kernel Performance
Assess baseline simulation performance
Explore OPNET development environment configuration
Capability of environment + simulation kernel + compiler
Compare debug and optimized kernels
Run multiple simulations concurrently
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
LAB 1 Summary:
Simulation Kernel Performance
Use Optimized Kernel
z 2x
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
Agenda
Introduction
Programming Efficiency
Modeling Efficiency
Take-Away Points
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
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
timing data
z Number of times function called
19
Complexity Analysis
Big-O notation
Way to quantify performance and compare different algorithms
z O(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.
20
sequence of items
z Fixed number
z Direct access by index
Access: O(1)
Insert: O(N)
Delete: O(N)
sequence of items
z Variable number
z Indirect access starting from beginning/end
Access: O(N)
Insert: O(1)
Delete: O(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.
21
Searching Algorithms
Problem: Find a particular value in a collection of elements
Sequential search
z Works
z O(n)
Binary search
z Requires
ordered array/vector
z O(log n) on average
z Standard implementations
z Not appropriate for linked lists (no direct element access)
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
n)
z Insert/delete O(height of tree) O(log n)
z OPNET API
#include <prg_mapping.h>
z Example in OPNET Models
wireless_lan/wlan_mac.pr.m
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
z O(1)
access/insertion
index
z Hash function on key
z Memory overhead
z Hashing overhead
z Collisions
z OPNET API
#include <prg_string_hash_funcs.h>
#include <prg_bin_hash.h>
z Example in OPNET Models
ip/ip_cmn_rte_table.ex.c
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
API Package
prg_vector
prg_list
Data Structure
Search
Insert /
Delete
resizable array
O(n)
O(n)
linked list
O(n)
O(1)
prg_mapping
balanced tree
O(log n) O(log n)
prg_string_hash
hash table
(string keys)
O(1)
O(1)
prg_bin_hash
hash table
(fixed length
keys)
O(1)
O(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.
25
LAB 2:
Improving Code Efficiency
Routing protocol model
Identify bottlenecks using the OPNET Profiler
Apply different efficiency techniques
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
LAB 2 Summary:
Reworking Code for Efficiency
OPNET Simulation Profiler identifies inefficiencies in design
Redesign with more efficient algorithms and data structures
z 76%
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
Agenda
Introduction
Programming Efficiency
Modeling Efficiency
Take-Away Points
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
access
z Field types
z Transferring
_fd_
' Need knowledge of index
' Dependent on field order
& Faster access
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
struct {
int src, dst, prio;
}
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
z No
z No
31
op_pk_(n)fd_get/set()
z Variable
op_pk_(n)fd_get/set_<type>()
<type>: dbl,info,int32,int64,objid,pkid,pkt,ptr,str
E.g.
z
z
z Bad
32
ICI
& More modular
' Slower access to data
& Automatic display in ODB
' Cannot view ICI internals
in source debugger
C/C++ structure
& More compact representation
& Faster access to data
' Only display pointer in ODB
& Easier to manipulate in source
debugger
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
Agenda
Introduction
Programming Efficiency
Modeling Efficiency
Take-Away Points
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
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
error
z Look/listen for swapping
z Watch with tools
Windows
Windows Task Manager
Performance Monitor (perfmon)
z UNIX
top
z OPNET Memory Tools
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
OPNET Memory
z Three
classes
Pooled
Categorized
General
z APIs
op_prg_pmo (and prg_pmo) API package
op_prg_cmo (and prg_cmo) API package
op_prg_mem (and prg_mem) API package
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
size objects
z Allocate contiguous blocks
Categorized
z Variable
size objects
z Grouping of logically related memory allocations
Statistics per category
General
z Best
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
Efficient
z Quickly
allocate/deallocate objects
vs.
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
If TRUE, may share same blocks for pools of the same size
z mem_opt.pool_small_blocks
If TRUE, use Pooled Memory for small blocks of dynamically allocated
memory
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
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
LAB 3:
Memory Statistics
OPNETs built-in memory utilization profiler
z Memory
Statistics
z Memory Source Tracing
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
LAB 3 Summary:
Memory Statistics
Finding memory leaks easy in OPNET
z Memory
Utilization graph
z Memory Statistics table
z Memory Source Tracing function call stacks
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
Structure Optimization
struct OPNETWORK_Session {
int
int
char
int
double
numAttendees;
dayOfWeek;
topic [128];
isFull;
priority;
};
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
numAttendees;
dayOfWeek;
topic [128];
int
isFull;
double
priority;
- 4 bytes
- 4 bytes
- 128 bytes
- 4 bytes
- 8 bytes
};
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
Optimized Structure
Sub-byte struct members
z struct
OPNETWORK_Session_Optimal {
double
priority;
char *
topic;
unsigned char numAttendees;
unsigned int dayOfWeek : 3;
unsigned int isFull : 1;
- 8 bytes
- 4 bytes
- 1 byte
- 3 bits
- 1 bit
};
z sizeof
(struct OPNETWORK_Optimal)?
double
char *
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
prg_string_const()
Alternative to dynamic memory
Not deallocated
z Uniqueuses hashing
z String comparison easier
z
From ip_qos_support.ex.c
class_map_ptr->class_name =
(char *) prg_string_const (class_map_name);
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
Caching Information
Trade space for time
z Eliminate
Issues to consider
z Cost
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
op_ima_obj_hname_get()
z op_id_from_name()
z
Topology relationships
z
Model attributes
z May
z
op_ima_obj_attr_get_*()
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
Efficient access
Useful to cache pipeline stage information in rx/tx channels
z Example
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
attributes
condition attribute
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
Example
z tmm_longley_rice.ex.c
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
Agenda
Introduction
Programming Efficiency
Modeling Efficiency
Take-Away Points
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
Three-Step Process
Identify Modeling Problem
z Define
Implementation Methods
z Design
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
Low-Hanging-Fruit:
Remove Overhead
Component Overhead
z Remove/shutdown
unused IP interfaces
z Remove un-connected nodes (except standalone servers)
Reduces memory required by a simulation
z Remove unwanted protocol components from node models (Modeler only)
Results Overhead
z Do
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
Reduction in fidelity
z Can
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
Modeling Abstractions
Abstraction: useful simplification of a real-world process
z To
abstraction
z Traffic abstraction
z Protocol abstraction
Control plane abstraction
Data plane abstraction
Statistical abstraction
Emulation
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.
57
Network Abstraction:
Modeling the Internet
Internet as an IP/ATM/FrameRelay cloud
Abstract a cluster of routers / switches
z Characterize cloud by latency/loss
z One routing table for entire cloud
z Use for end-to-end application performance studies
z
Trade-Offs
Routing/security polices cannot be deployed in complete detail
z No failure modeling in a cloud
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.
58
Network Abstraction:
Aggregation
Server Farm as a LAN node
Abstract a cluster of servers/workstation connected to a LAN segment
z Characterize farm by MAC access delay/switching speed
z One protocol stack for all component nodes
z
Trade-Offs
MAC contention delays may be inaccurate for shared segments
z Not possible to model for all technologies
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.
59
Traffic Abstraction
Traffic representation in OPNET
Traffic Type
OPNET Representation
Packet Level Traffic Explicit Traffic
Aggregated Traffic
Traffic Flows
Device/Link Loads (Background Traffic)
by packet
End-to-end delays, protocol details, segmentation effects
z Aggregated traffic
Capacity planning, steady-state routing analysis
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
Hybrid Traffic
Traffic Demands can be set to a mix
&More accurate than analytics
alone
&Faster than discrete
'Does not model all protocol
dynamics like feedback, flow
control, congestion control
and policing
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
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
Protocol Abstraction:
Signaling Plane
Signaling Plane
How to abstract
Trade-Offs
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.
63
Protocol Abstraction:
Control Plane
Control Plane
z Model routing traffic, path-computation, tables/databases
z Model policies for filtering and altering routing information
z Handles failure/recovery situations
OPNET model examples
Circuit switch
z Frame Relay
z OSPF
z
How to abstract
z
z Stop
Trade-Offs
Cannot capture routing convergence times
z May not capture all routing policies
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.
64
Protocol Abstraction:
Data Plane
Simulation world
Trade-Offs
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
Statistical Abstraction
Capture the statistics of a quasi-deterministic process
zA
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.
66
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
Operational Efficiency:
Use Pre-Computed Data
Use pre-computed data from other simulations or empirical sources
IP forwarding table import from Flow Analysis/DES
Use forwarding table reports previously generated
Entire routing information available at beginning of simulation
z Trade-offs
No control traffic
Cannot react to topology changes
Uses a single snapshot
z
Receiver 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.
68
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
Lazy Evaluation
Delay work until result is needed
z Minimal
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
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
LAB 4:
Operating Protocols Efficiently
Take an IP network and increase its simulation speed and reduce
memory using some of the model efficiency techniques
z No
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
LAB 4 Summary:
Operating Protocols Efficiently
Increased Simulation efficiency using three efficiency methods
Eliminated OSPF control traffic after 260 seconds
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.
73
Documentation References
OPNET Modeler Online Documentation
z Modeling
Big O Notation
(http://en.wikipedia.org/wiki/Big_O_notation)
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
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
Take-Away Points
Easy
Efficient environment
Efficient simulation kernel
Efficient compilation
Efficient model representation
Efficient configuration of protocols
Efficient code
z Data
Difficult
structures
z Algorithms
z Efficient kernel procedure use
z Model design and abstraction
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
Take-Away Points
Top 5 model efficiency techniques
z Reduce/eliminate
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
Appendix:
Big O Notation (intro from Wikipedia)
Also known as Landau notation, Bachmann-Landau notation and asymptotic
notation.
Describes the limiting behavior of a function when the argument tends towards infinity,
usually in terms of simpler functions. Allows simplification of functions in order to
concentrate on their growth rates: different functions with the same growth rate may be
represented using the same O notation.
Used in the analysis of algorithms to describe an algorithms usage of computational
resources: the worst case or average case running time or memory usage of an algorithm is
often expressed as a function of the length of its input using big O notation. This allows
algorithm designers to predict the behavior of their algorithms and to determine which of
multiple algorithms to use, in a way that is independent of computer architecture or speed.
Because Big O notation discards multiplicative constants on the running time, and ignores
efficiency for low input sizes, it does not always reveal the fastest algorithm in practice or
for practically-sized data sets. But the approach is still very effective for comparing the
scalability of various algorithms as input sizes become large.
A description of a function in terms of big O notation usually only provides an upper
bound on the growth rate of the function.
Associated with big O notation are several related notations, using the symbols o, , ,
and , to describe other kinds of bounds on asymptotic growth rates.
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
Appendix:
Standard Models for Different Kernels
Kernel combinations
Sequential
Parallel
Development
Optimized
32 bit address
64 bit address
bgp.dev32.i0.pr.obj or bgp.opt64.s1.pr.o
z <filename>.<kernel_type>.<arch_type>. <file_type>.<file_extn>
kernel_type: one from kernel combinations (dev32, opt64 )
arch_type: machine architecture (i0: Windows; i1: Linux)
file_type: process model (pr), pipeline stage (ps)
file_extn: object file, c file
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.
79
Appendix:
Recommended comp_flags_optim Settings
Windows
MS Visual C++ 6.0 Professional (comp_prog: comp_msvc)
/G6 /Ox /Ob2
z MS Visual C++ .NET/2005,2008 Professional (comp_prog: comp_msvc)
/G7 /Ox /Ob2
z Target CPU Optimizations: /G{1,2,3,4,5,6,7}
z
Linux
z
MS reference
z
http://msdn.microsoft.com/en-us/library/fwkeyyhe.aspx
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
Mobility
Nodes can be mobile and hence number of
contenders can change
Re-compute number of reachable nodes based
on transmission range
81
Topology: random
Mobility: All nodes converge to the same point
Number of nodes: 100
Simulation duration: 90 minutes
Validation measures:
z
Application Throughput
Performance measure:
z
z
Elapsed time
Real time ratio
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
100% faster
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