README.simplep2p.txt 2.84 KB
Newer Older
Jonathan Jenkins's avatar
Jonathan Jenkins committed
1
"SimpleP2P"
2 3 4 5 6
----------

Model overview:
---------------

Jonathan Jenkins's avatar
Jonathan Jenkins committed
7
SimpleP2P is an extension of simplenet to allow for arbitrary point-to-point
8 9
capacities.

Jonathan Jenkins's avatar
Jonathan Jenkins committed
10
SimpleP2P has nearly the same duplex queued transmission semantics as
11
simplenet, though with a few important differences. First, point-to-point
12 13
latencies and bandwidths are different. Network links can also have different
ingress and egress latencies/bandwidths. Second, each unique link is given its
14 15
own queue that do not interfere with the others. The use case for this model is
a set of sites with internal networks, with each site communicating via
Jonathan Jenkins's avatar
Jonathan Jenkins committed
16
simplep2p; we assume the internal network is capable of servicing all
17 18 19
outgoing/incoming WAN transmissions at their full capacities.

Additional configuration is needed to initialize the link latencies/capacities.
Jonathan Jenkins's avatar
Jonathan Jenkins committed
20
In the codes-configuration file, the variables "net_latency_ns_file" and
21
"net_bw_mbps_file" must be set under the PARAMS group. They point (in a path
Jonathan Jenkins's avatar
Jonathan Jenkins committed
22
relative to the configuration file) to configurations for the latency and
23 24 25
bandwidth costs, respectively.

Each of the latency/bandwidth configuration files have the same format, based
26 27 28 29 30 31 32 33
on a square matrix of directed point to point capacities. Given N modelnet LPs,
it has the format:

1:1 1:2 ... 1:N
2:1 2:2 ... 2:N
      ...
N:1 N:2 ... N:N

34 35 36 37 38 39 40
where x:y is a pair of latency or bandwidth between components x and y.
An individual entry in this matrix is specified as "a,b" where 'a' is the egress 
latency/bandwidth of the link and 'b' is the ingress latency/bandwidth of the link.
Whitespace is ignored, but linebreaks are not, and delimit rows of the matrix.
The relative simplep2p identifiers 1..N are assigned to simplep2p LPs in the
order of their appearance in the codes-configuration file. It is expected that
all i:i entries are 0 - modelnet currently doesn't handle self messages.
41 42

Support in the code is also available for triangular matrices of the format:
43 44 45 46 47 48

1:2 1:3   ...   1:N
    2:3 2:4 ... 2:N
        ...
                N-1:N

49 50 51
However, this option is currently disabled (the configuration code path has not
been expanded to allow specifying the option). The option will be enabled
into the configuration routines if deemed necessary.
52 53 54 55 56

Caveats:
--------

The model-net statistics are slightly more complex than in other model-net
Jonathan Jenkins's avatar
Jonathan Jenkins committed
57
implementations because there are in essence multiple queues per simplep2p
58
instance. In particular, the "send time" and "recv time" stats are computed as
Jonathan Jenkins's avatar
Jonathan Jenkins committed
59
ranges of time in which the simplep2p LP is actively sending/receiving data
60 61 62
from *any* link. Hence, simple bandwidth calculations (send bytes / send time)
may not be accurate due to skew in message issuance.

Jonathan Jenkins's avatar
Jonathan Jenkins committed
63
Having more than one category in simplep2p will cause the times in the
64 65 66
derived "all" category to be off. "all" is currently implemented as the sum of
the various categories, which doesn't work when times in certain categories may
overlap.