Simulating Large-scale Dynamic Random Graphs in OMNeT++ onsson 1 - - PowerPoint PPT Presentation

simulating large scale dynamic random graphs in omnet
SMART_READER_LITE
LIVE PREVIEW

Simulating Large-scale Dynamic Random Graphs in OMNeT++ onsson 1 - - PowerPoint PPT Presentation

Simulating Large-scale Dynamic Random Graphs in OMNeT++ onsson 1 usson 1 Olafur Ragnar Helgason 2 Kristj an Valur J Ymir Vigf Reykjavik University KTH Royal Institute of Technology School of Computer Science Laboratory for


slide-1
SLIDE 1

Simulating Large-scale Dynamic Random Graphs in OMNeT++

Kristj´ an Valur J´

  • nsson1

´ Ymir Vigf´ usson1 ´ Olafur Ragnar Helgason2

Reykjavik University KTH Royal Institute of Technology School of Computer Science Laboratory for Comm. Netw. Reykjavik, Iceland Stockholm, Sweden {kristjanvj,ymir}@ru.is

  • lafur.helgason@ee.kth.se

OMNeT++ Workshop March 23, 2012

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 1 / 31

slide-2
SLIDE 2

Reykjavik University http://www.ru.is School of Computer Science

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 2 / 31

slide-3
SLIDE 3

Introduction and motivation

Networked communications systems are an important research topic. New paradigms impact our everyday lives in new and sometimes unforeseen ways. Can expect distributed systems to grow both in number and scale.

◮ wireless sensors ◮ collaborative sensing and sharing ◮ the internet of things ◮ . . . J´

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 3 / 31

slide-4
SLIDE 4

The case for simulation

New protocols and distributed applications require careful evaluation. Notoriously hard to test.

◮ Repeatability ◮ Access to testbeds ◮ Practical size limitations of testbeds ◮ . . .

Simulation is an important tool for analysis We can specify a fine grained model:

◮ Mobility characteristics ◮ Full protocol stack ◮ Detailed infrastructure ◮ . . .

Highly domain specific

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 4 / 31

slide-5
SLIDE 5

The case for random graph based simulation

We may want to model at a more abstract level using some general but realistic system assumptions. Handy tool: Random graph models

◮ Simulations of networked systems are based on

an underlying network graph

◮ Random graph models may be applied in case of a

non-deterministic network.

Approach

Construct a high-level approximation of a networked system by picking an appropriate generation algorithm and parameters.

◮ Size/scale ◮ Dynamism, e.g. mobility – VANETs, MANETs, pedestrian networks. ◮ Comm links: range, capacity, protocol, loss model. ◮ Means of establishing links: Graph connectivity, degree distribution. ◮ . . . J´

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 5 / 31

slide-6
SLIDE 6

Random graphs and generation algorithms

Definition

Random graph. A random graph is a graph G = (V , E) in which vertices and edges are determined by some random process.

Random graph generators

The algorithms used to construct random graphs. Binomial graphs – Erd¨

  • s-R´

enyi. Small world models – e.g. Watts-Strogats Scale-free models – e.g. Barab´ asi-Albert

Our objective

Present an approach and a set of components to enable dynamic generation and maintenance of random graphs at runtime within OMNeT++. https://github.com/kristjanvj/DRGSimLib

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 6 / 31

slide-7
SLIDE 7

The simulation toolbox

Components

Nodes – a compound node representing simulated objects Node factory – manages lifetime of nodes Topology – manages node relations – the network graph

Sample scenario

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 7 / 31

slide-8
SLIDE 8

The node factory – Factory

Dynamic instantiation and destruction of nodes Operates independently of the graph generation

Parameters

nodeType The class name of a OMNeT++ compound module – the type

  • f node to be manufactured.

generateInterval The node generation interval. lifetime The lifetime of generated nodes. minLifetime The minimum lifetime of generated nodes. Volatile parameters – can plug in OMNeT++ standard random functions in ini file.

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 8 / 31

slide-9
SLIDE 9

Topology management – Topology

Flexible generation/maintenance of random graphs. Architecture:

◮ controller ◮ a plug-in generator instance

Parameters

topologyGenerator The name of a topology generator class implementing the IBasicGenerator interface. updateInterval The interval in seconds between updates of the edge structure of the graph. snapshotFile The name of a file for storing snapshots of the graph topology for off-line analysis.

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 9 / 31

slide-10
SLIDE 10

Representing a communications model as a graph

Communications network represented by a single data structure

◮ managed by the controller ◮ via algorithms implemented in the plug-in generator

Direct message passing (with delay) between nodes

◮ ⇒ Minimal message object generation J´

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 10 / 31

slide-11
SLIDE 11

A sample node

Node: the simulated object NIC required

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 11 / 31

slide-12
SLIDE 12

The TopologyControlNIC

Parameters

dataRate The data rate in Kbps. bitErrorRate A volatile parameter for the bit error rate. processingDelay The processing delay in seconds. propagationDelay The propagation delay in seconds. The per-node counterpart to the topologyControl Registers the host node with Topology upon instantiation De-registers upon destruction Stores local neighbourhood view

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 12 / 31

slide-13
SLIDE 13

Plug-ins for graph generation and management

The graph generator is a plug-in instantiated at start of simulation vial ini file parameter. Derived from a base class, implementing IBasicGenerator interface. Users can derive their own random graph generator classes

IBasicGenerator

addNode Adds a vertex to the graph data structure and creates edges in accordance with the implemented algorithm. void removeNode Removes a vertex from the graph. All incident edges are also removed. bool update Periodic updates of the graph edges to simulate dynamic effects other than node churn. void constructInitialTopology Called after initialization of the topology manager to create edges between nodes instantiated at time zero.

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 13 / 31

slide-14
SLIDE 14

Binomial graph generation

The binomial graph gn,p, also known as a Erd¨

  • s-R´

enyi graph.

Generation algorithm

Generate n nodes ∈ V . For a node v ∈ V , create an edge e = (u, v) ∈ E with probability p to each node u ∈ V \ v.

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 14 / 31

slide-15
SLIDE 15

gn,p insertion of nodes

{Upon registration of node v} insert v into V , the vertices collection if |V | = 1 then return else if |V | = 2 then createLink(u,v) else select node u ∈ V uniformly at random. createLink(u,v) for each z ∈ V \ u do createLink(v,z) with probability p end for end if

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 15 / 31

slide-16
SLIDE 16

gn,p graph maintenance

{Executed periodically, T∆ is the time units since last update.} pr ← T∆ · pC pa ← T∆ · pC · |E|/|V | for each e ∈ E do remove e with probability pr end for for each v ∈ V do do with probability pa: pick a neighbor u ∈ V \ v uniformly at random and add edge (v, u) end for

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 16 / 31

slide-17
SLIDE 17

A small gn,p graph evolution experiment

Average degree distribution

Note the characteristic Poisson shape of the curves Not scale-free

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 17 / 31

slide-18
SLIDE 18

Barab´ asi-Albert (BA) graph generation

Generation algorithm

Generate a new node v in the graph G = (V , E). For the node v, create an edge e = (u, v) with any peer u ∈ V \ v with probability p(u) = ku/

z∈V kz, where kz is the degree of a node z ∈ V .

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 18 / 31

slide-19
SLIDE 19

A small BA graph evolution experiment

Average degree distribution

Distinctive power-law shape Scale-free?

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 19 / 31

slide-20
SLIDE 20

Power law characteristics of a BA graph

0.0001 0.001 0.01 0.1 1 10 10 100 Normalized frequency Node degree Power-law alpha=2.7 Simulation data

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 20 / 31

slide-21
SLIDE 21

Problematic effects of graph dynamism

Dynamism ⇒ graph connectivity not guaranteed Fact of life but complicates analysis Topology optionally guarantees connectivity (i) Cut vertices (ii) Cut edges

Remedy

1 Search k-neighbourhood recursively to determine connectivity. 2 Connect components which have not been confirmed as connected. J´

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 21 / 31

slide-22
SLIDE 22

Application example: GAP

The Generic Aggregation Algorithm – GAP1. Designed for network monitoring applications Continuous monitoring in dynamic networks. Distributed construction and maintenance of a spanning-tree overlay – the aggregation overlay.

Dam, M. & Stadler, R., A generic protocol for network state aggregation. In Proc. Radiovetenskap och Kommunikation (RVK), pp. 14–16, Link¨

  • ping,
  • Sweden. 2005.

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 22 / 31

slide-23
SLIDE 23

In-network computation

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 23 / 31

slide-24
SLIDE 24

In-network computation

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 23 / 31

slide-25
SLIDE 25

In-network computation

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 23 / 31

slide-26
SLIDE 26

In-network computation

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 23 / 31

slide-27
SLIDE 27

In-network computation

Each node provides updates on own schedule Example shows synchronous operation for simplicity Recipients of updates compute new contributions in-network

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 23 / 31

slide-28
SLIDE 28

Constant node population

Experimental setup

BA graph, m0 = 5, m = 3 2500 nodes, static population Dynamic link reassignments in window t = [2h, 4h]. Failure detection latency: 1s + N(0s, 1s).

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 24 / 31

slide-29
SLIDE 29

Aggregate – AVERAGE

40 50 60 70 80 90 4000 6000 8000 10000 12000 14000 time (s) Link reassignments enabled Aggregate average p=0.005 Aggregate average p=0.01 Global average

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 25 / 31

slide-30
SLIDE 30

Aggregate – COUNT

2200 2300 2400 2500 2600 2700 2800 7000 8000 9000 10000 11000 12000 13000 14000 node count time (s) Link reassignments enabled Aggregate count p=0.0 Aggregate count p=0.005 Aggregate count p=0.01

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 26 / 31

slide-31
SLIDE 31

Dynamic node population

Experimental setup

BA graph, m0 = 5, m = 3 1500 nodes at time zero Poisson arrivals with 1/λ = 5s. Node lifetime drawn from N(µ, σ) Initial node lifetime (zero population) drawn from uniform [0, µ] distribution. Churn interval t = [2h, 10h] Failure detection latency: 100ms + N(0s, 100ms).

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 27 / 31

slide-32
SLIDE 32

Aggregate – AVERAGE

40 50 60 70 80 90 4000 6000 8000 10000 12000 14000 time (s) Churn initiated Aggregate average N(8h,4h) Aggregate average N(6h,4h) Aggregate average N(4h,4h) Global observation

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 28 / 31

slide-33
SLIDE 33

Aggregate – COUNT

1500 2000 2500 3000 3500 4000 4500 5000 5500 5000 10000 15000 20000 25000 30000 35000 node count time (s) Aggregate count N(8h,4h) Aggregate count N(6h,4h) Aggregate count N(4h,4h)

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 29 / 31

slide-34
SLIDE 34

Aggregate – COUNT. Slow failure detection.

1500 2000 2500 3000 3500 4000 4500 5000 5500 5000 10000 15000 20000 25000 30000 35000 node count time (s) Aggregate count N(8h,4h) Aggregate count N(6h,4h) Aggregate count N(4h,4h)

failure detection: 1s + N(0s, 1s).

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 30 / 31

slide-35
SLIDE 35

Conclusions

Motivation: Allow easy construction of random-graph based simulations in OMNeT++

◮ Abstract away from complexities of networks/systems, providing means

  • f evaluating protocols with emphasis on end systems.

Toolbox: Provide a set of components to facilitate simulation based

  • n random graph models in OMNeT++

◮ Generic node class (example only) ◮ Node factory ◮ Topology manager with plug-in generators

Demonstration application: GAP dynamic aggregation protocol. Generally applicable tool for graph-based simulation research

◮ May even be used for applications unrelated to physical networks. ◮ OMNeT++ as a tool to study social networks? J´

  • nsson et al. (RU and KTH)

DRGSimLib for OMNeT++ March 23, 2012 31 / 31