Differences between revisions 2 and 3
Revision 2 as of 2005-10-16 22:21:25
Size: 2861
Editor: alpt
Comment:
Revision 3 as of 2005-10-17 12:59:05
Size: 5289
Editor: alpt
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== QSPN scalability ==
Line 8: Line 10:
 extreme_nodes = number_of_nodes_with_only_one_link + number_of_cycles  extreme_nodes = number_of_nodes_with_only_one_link + number_of_cycles*2
Line 10: Line 12:
The total packets generated by a single flood is equal to: A cycle here is meant as a set of nodes, where each node is linked at least at
two other nodes of the set.
Line 12: Line 15:
 total_packets_per_flood = Sum( number_of_links_of_each_node - 1 ) The total different packets generated by a single flood is equal to:

total_packets_per_flood = Sum( number_of_links_of_each_node - 1 ) + 1
Line 21: Line 26:

=== First scenario ===
Line 23: Line 31:
Line 39: Line 46:
 total_floods = MAXGROUPNODE * (levels-1)  total_floods = MAXGROUPNODE * levels
Line 46: Line 53:
 total_packets = MAXGROUPNODE^2 * (levels-1)  total_packets = MAXGROUPNODE^2 * levels
Line 53: Line 60:
 total_floods = 768; total_packets = 196608;  total_floods = 1024; total_packets = 262144;
Line 65: Line 72:
--
Line 67: Line 73:
All the nodes are bnode... === Second scenario ===
Line 69: Line 75:
/* TODO */ In this case we consider a network where each (g)node is linked to all the other
(g)nodes.
{{{
      C
     /|\
    / | \
   A-----D
    \ | /
     \|/
      E
}}}
That means that we have 1 cycle and 0 nodes_with_only_one_link, so the
total_floods are:
 
 total_floods = 2
Line 71: Line 91:
-- Since every (g)node is linked with every other (g)gnodes, the number of links
for each of them is MAXGROUPNODE and the number of total different packets
generated per flood is:
 
 total_packets = ( ( MAXGROUPNODE - 1 ) * MAXGROUPNODE + 1)
Line 73: Line 97:
All the nodes are in one line... Supposing that this configuration is the same for the upper levels too, we have:
Line 75: Line 99:
/* TODO */  total_floods = 2 * levels
 total_packets = total_floods * ( ( MAXGROUPNODE - 1 ) * MAXGROUPNODE + 1)
Line 77: Line 102:
--  N = total_number_of_nodes_in_the_network
 levels = log_2(N)/MAXGROUPNODE_BITS
 
 total_packets = (log_2(N)/4) * ( ( MAXGROUPNODE - 1 ) * MAXGROUPNODE + 1)
Line 79: Line 107:
Maximum size of a tracer_pkt In ipv4, with 2^32 nodes:
Line 81: Line 109:
/* TODO */  total_packets = 522248
Line 83: Line 111:
-- === Third scenario ===
Line 85: Line 113:
Simple and not accurate reasons for the scalability of Netsukuku (until there
is the math/technical documentation that is being written):
1) the size of the maps is fixed: about 4Kb for the int_map and 16Kb for the ext_map.
2) Not all the nodes sends a broadcast discovery.
3) There are few floods for each discovery
4) When a node receives a flood it already has the routes without calculating anything.
5) A flood is syncronized: the same flood starts at the same time for all the nodes.
All the (g)nodes are in just one line: to reach the end node B from the start
node A we have traverse N nodes, with N equal to the total number of nodes
minus 2.

In this awful case a flood will have to traverse N hops, this means that if
the average rtt between two nodes is 70ms, then the flood, if started from an
extreme node will take about 9 years to reach the other end.

== About the maximum size of a tracer_pkt ==

Each time a tracer_pkt traverse a node it grows of one byte, since the
tracer_pkt is always restricted to a determinate level, which has maximum
MAXGROUPNODE nodes, the maximum size of a plain tracer_pkt is 256 Bytes (we
are not counting the headers, which are a constant size).

The things change if the tracer_pkt traverses border nodes, in fact,
(7 + 10*L) bytes are added in the the tracer_pkt each time it passes trough a
bnode. L is the number of gnodes the border node is linked to.

== About the maximum size of the maps ==

The size of levels in the maps is fixed 'cause we already know the maximum number
of nodes in the network. We are also considering that we store only the 20
best routes for each node.

So the maximum size of the maps, when we have all the routes stored, and the
bnode with all their maximum links filled is:
{{{
 internal map | external map | border node map

ipv4 104448 | 314880 | 7870464
       
ipv6 10448 | 1574400 | 39352320

(in bytes).
}}
The bnode map is so large because we are considering that in each level
each gnode of each level there are 256 bnodes and each of them is linked to
512 gnodes.

== About the overload created by multiple hooks of (g)nodes ==

In order to prevent that a QSPN is sent every time a (g)node joins the network
the QSPN are all syncronised in each level, therefore the maps are updated at
each qspn_round. (Read the section "5.1.4 Qspn round").

QSPN scalability

The QSPN is an optimised way of "sending a tracer_pkt from each extreme node". A tracer_pkt is just a flood, and the total number of floods is given by:

  • total_floods = extreme_nodes + 1

where the extreme_nodes are:

  • extreme_nodes = number_of_nodes_with_only_one_link + number_of_cycles*2

A cycle here is meant as a set of nodes, where each node is linked at least at two other nodes of the set.

The total different packets generated by a single flood is equal to:

  • total_packets_per_flood = Sum( number_of_links_of_each_node - 1 ) + 1

Since the network is organized in gnodes, the total_floods for all the levels will be the sum of the total_floods of each level. The same applies to the total_packets_per_flood.

Now we'll consider various worst scenarios.

First scenario

The first worst case is a network where all the nodes are an extreme_node, i.e. there's one node X and all the other are linked to it by just one link.

                            O       Y
                             \     / 
                              \   /
                         N ---- X ----L
                                |
                                |
                                M       (A graph describing the first worst
                                         scenario)

In this case all the nodes, including X, will send a tracer_pkt. This means that if all the nodes in the level 0 are linked in that way, and all the gnodes of the higher levels are also linked between them in the same way, then the total floods, in all the levels, we'll be:

  • total_floods = MAXGROUPNODE * levels

Where MAXGROUPNODE is the number of (g)node present in a gnode. By the way, this configuration has its advantages because there is only one hop between each node, therefore each flood will end after one hop and the total packets will be:

  • total_packets = MAXGROUPNODE^2 * levels

MAXGROUPNODE is equal to 256. In the ipv4 we have 4 levels. This means that in a network composed by 2^32 nodes, in the first worst scenario to run the QSPN at all the levels will have:

  • total_floods = 1024; total_packets = 262144;

Note that "levels" is equal to log_2(N)/MAXGROUPNODE_BITS, where N is the maximum number of nodes in the network and MAXGROUPNODE_BITS is equal to 8. MAXGROUPNODE is also equal to 2^MAXGROUPNODE_BITS. The final formulas that describes the growth of the number of floods and packets are:

  • total_floods = 2^5 * log_2(N) total_packets = 2^13 * log_2(N)

Second scenario

In this case we consider a network where each (g)node is linked to all the other (g)nodes.

                           C
                          /|\
                         / | \  
                        A-----D
                         \ | /
                          \|/
                           E

That means that we have 1 cycle and 0 nodes_with_only_one_link, so the total_floods are:

  • total_floods = 2

Since every (g)node is linked with every other (g)gnodes, the number of links for each of them is MAXGROUPNODE and the number of total different packets generated per flood is:

  • total_packets = ( ( MAXGROUPNODE - 1 ) * MAXGROUPNODE + 1)

Supposing that this configuration is the same for the upper levels too, we have:

  • total_floods = 2 * levels total_packets = total_floods * ( ( MAXGROUPNODE - 1 ) * MAXGROUPNODE + 1) N = total_number_of_nodes_in_the_network levels = log_2(N)/MAXGROUPNODE_BITS total_packets = (log_2(N)/4) * ( ( MAXGROUPNODE - 1 ) * MAXGROUPNODE + 1)

In ipv4, with 2^32 nodes:

  • total_packets = 522248

Third scenario

All the (g)nodes are in just one line: to reach the end node B from the start node A we have traverse N nodes, with N equal to the total number of nodes minus 2.

In this awful case a flood will have to traverse N hops, this means that if the average rtt between two nodes is 70ms, then the flood, if started from an extreme node will take about 9 years to reach the other end.

About the maximum size of a tracer_pkt

Each time a tracer_pkt traverse a node it grows of one byte, since the tracer_pkt is always restricted to a determinate level, which has maximum MAXGROUPNODE nodes, the maximum size of a plain tracer_pkt is 256 Bytes (we are not counting the headers, which are a constant size).

The things change if the tracer_pkt traverses border nodes, in fact, (7 + 10*L) bytes are added in the the tracer_pkt each time it passes trough a bnode. L is the number of gnodes the border node is linked to.

About the maximum size of the maps

The size of levels in the maps is fixed 'cause we already know the maximum number of nodes in the network. We are also considering that we store only the 20 best routes for each node.

So the maximum size of the maps, when we have all the routes stored, and the bnode with all their maximum links filled is:

Netsukuku_scalability (last edited 2009-09-18 11:18:26 by alpt)