OLSR-NG: Unterschied zwischen den Versionen

Aus FunkFeuer Wiki
Wechseln zu: Navigation, Suche
(move the UML server section)
(move data structures and algorithms out)
Zeile 36: Zeile 36:
 
OLSR-NG is a open source project. Meaning everybody is invited to join in and help.  
 
OLSR-NG is a open source project. Meaning everybody is invited to join in and help.  
 
We do have some bounties for the best solutions. If you want to participate, drop us an email: mailto:aaron@lo-res.org, mailto:hannes@gredler.at or mailto:bernd@firmix.at
 
We do have some bounties for the best solutions. If you want to participate, drop us an email: mailto:aaron@lo-res.org, mailto:hannes@gredler.at or mailto:bernd@firmix.at
 +
 +
Main OLSR-NG project blog: http://olsr.funkfeuer.at
 +
Slides from the OLSR-NG kickoff presentation: http://outpost.funkfeuer.at/~aaron/olsr-ng.pdf
  
 
= Current Status =
 
= Current Status =
Zeile 53: Zeile 56:
 
==[[RIB refactoring]]==
 
==[[RIB refactoring]]==
 
==[[UML test server]]==
 
==[[UML test server]]==
 +
==[[Data Sturctures and Algorithms]]==
  
 
= main links =
 
 
Main OLSR-NG project blog: http://olsr.funkfeuer.at
 
 
Slides from the OLSR-NG kickoff presentation: http://outpost.funkfeuer.at/~aaron/olsr-ng.pdf
 
 
We communicate on the olsr-dev mailinglist: https://www.olsr.org/mailman/listinfo/olsr-dev . All commit messages can be seen on the olsr-cvs list
 
  
 
= Who wants to contribute? =
 
= Who wants to contribute? =
Zeile 225: Zeile 221:
 
       cvs -d:pserver:anonymous@olsrd.cvs.sourceforge.net:/cvsroot/olsrd login  
 
       cvs -d:pserver:anonymous@olsrd.cvs.sourceforge.net:/cvsroot/olsrd login  
 
       cvs -z3 -d:pserver:anonymous@olsrd.cvs.sourceforge.net:/cvsroot/olsrd co -P olsrd-current
 
       cvs -z3 -d:pserver:anonymous@olsrd.cvs.sourceforge.net:/cvsroot/olsrd co -P olsrd-current
 
= Theory section =
 
 
== data structures ==
 
* [[Wikipedia:Heap (data_structure)|Heap]] ... We need good heaps/priority queues for A*-Search / Dijkstra
 
* especially the [[Wikipedia:Fibonacci_heap|Fibonacci Heap]] has a to my knowledge the very best asymptotic complexity of O(1) almost everywhere.
 
'''However, practice shows that'''...
 
Currently as of 0.51pre we use a AVL tree which has complexity O(log(n)). Hannes tested the fibheap package from gcc and found out that in our networks (~ 200 nodes) the AVL tree heap implementation still beats the fibonacci heap by 60%.
 
 
fibonacci heap:
 
 
<pre>
 
--- SPF-stats for 203 nodes, 335 routes (total/init/run/route/kern/cleanup):,, 237,
 
--- SPF-stats for 203 nodes, 337 routes (total/init/run/route/kern/cleanup):,, 238,
 
--- SPF-stats for 203 nodes, 337 routes (total/init/run/route/kern/cleanup):,, 238,
 
--- SPF-stats for 203 nodes, 339 routes (total/init/run/route/kern/cleanup):,, 239,
 
--- SPF-stats for 203 nodes, 339 routes (total/init/run/route/kern/cleanup):,, 238,
 
--- SPF-stats for 203 nodes, 341 routes (total/init/run/route/kern/cleanup):,, 240,
 
--- SPF-stats for 203 nodes, 341 routes (total/init/run/route/kern/cleanup):,, 236,
 
--- SPF-stats for 203 nodes, 341 routes (total/init/run/route/kern/cleanup):,, 238,
 
--- SPF-stats for 203 nodes, 341 routes (total/init/run/route/kern/cleanup):,, 238,
 
--- SPF-stats for 203 nodes, 345 routes (total/init/run/route/kern/cleanup):,, 239,
 
--- SPF-stats for 203 nodes, 346 routes (total/init/run/route/kern/cleanup):,, 238,
 
--- SPF-stats for 203 nodes, 346 routes (total/init/run/route/kern/cleanup):,, 238,
 
--- SPF-stats for 203 nodes, 346 routes (total/init/run/route/kern/cleanup):,, 238,
 
--- SPF-stats for 203 nodes, 346 routes (total/init/run/route/kern/cleanup):,, 238,
 
--- SPF-stats for 203 nodes, 347 routes (total/init/run/route/kern/cleanup):,, 238,
 
                                                                                                                                       
 
 
 
AVL heap:
 
--- SPF-stats for 203 nodes, 346 routes (total/init/run/route/kern/cleanup):,, 143,
 
--- SPF-stats for 203 nodes, 346 routes (total/init/run/route/kern/cleanup):,, 142,
 
--- SPF-stats for 203 nodes, 346 routes (total/init/run/route/kern/cleanup):,, 142,
 
--- SPF-stats for 203 nodes, 346 routes (total/init/run/route/kern/cleanup):,, 144,
 
--- SPF-stats for 203 nodes, 346 routes (total/init/run/route/kern/cleanup):,, 145,
 
--- SPF-stats for 203 nodes, 347 routes (total/init/run/route/kern/cleanup):,, 145,
 
--- SPF-stats for 203 nodes, 346 routes (total/init/run/route/kern/cleanup):,, 142,
 
--- SPF-stats for 203 nodes, 346 routes (total/init/run/route/kern/cleanup):,, 142,
 
--- SPF-stats for 203 nodes, 346 routes (total/init/run/route/kern/cleanup):,, 144,
 
--- SPF-stats for 203 nodes, 346 routes (total/init/run/route/kern/cleanup):,, 145,
 
--- SPF-stats for 203 nodes, 347 routes (total/init/run/route/kern/cleanup):,, 145,
 
--- SPF-stats for 202 nodes, 347 routes (total/init/run/route/kern/cleanup):,, 145,
 
--- SPF-stats for 202 nodes, 347 routes (total/init/run/route/kern/cleanup):,, 142,
 
--- SPF-stats for 202 nodes, 347 routes (total/init/run/route/kern/cleanup):,, 146,
 
</pre>
 
 
 
 
The following complexities<ref>
 
Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest (1990): Introduction to algorithms.
 
MIT Press / McGraw-Hill.
 
</ref> are worst-case for binary and binomial heaps and [[Wikipedia:Amortized analysis|amortized complexity]] for Fibonacci heap. O(f) gives asymptotic upper bound and Θ(f) is asymptotically tight bound (see [[Wikipedia:Big O notation]]). Function names assume a min-heap.
 
 
{|  class="toccolours" border="1" cellpadding="4" style="border-collapse:collapse"
 
|- style="background-color:#e9e9e9" |
 
! Operation
 
! [[Wikipedia:Binary heap|Binary]]
 
! [[Wikipedia:Binomial heap|Binomial]]
 
! [[Wikipedia:Fibonacci heap|Fibonacci]]
 
|-
 
| createHeap
 
|| Θ(1)
 
|| Θ(1)
 
|| Θ(1)
 
|-
 
| findMin
 
|| Θ(1)
 
|| O(lg ''n'') or Θ(1)
 
|| Θ(1)
 
|-
 
| deleteMin
 
|| Θ(lg ''n'')
 
|| Θ(lg ''n'')
 
|| O(lg ''n'')
 
|-
 
| insert
 
|| Θ(lg ''n'')
 
|| O(lg ''n'')
 
|| Θ(1)
 
|-
 
| decreaseKey
 
|| Θ(lg ''n'')
 
|| Θ(lg ''n'')
 
|| Θ(1)
 
|-
 
| merge
 
|| Θ(''n'')
 
|| O(lg ''n'')
 
|| Θ(1)
 
|}
 
 
== other interesting data structures not directly related ==
 
* [[Wikipedia:Data_Structures]] general overview. Good entry point for trees: [[Wikipedia:Binary_tree]]
 
* [http://www.nist.gov/dads/ NIST Directory of Data Structures] has a very extensive overview
 
* [http://www.google.com/search?client=safari&rls=en&q=Optimal+Worst-Case+Operations+for+Implicit+Cache-Oblivious+Search+Trees&ie=UTF-8&oe=UTF-8 succinct datastructures (trees)]
 
* [http://blogs.msdn.com/devdev/archive/2005/12/05/500171.aspx succinct datastructures overview]
 
* [http://en.wikipedia.org/wiki/Trie Tries]
 
* [http://www-users.cs.umn.edu/~saad/PS/iter1.pdf sparse matrices]
 
* look at [http://users.footprints.net/~kaz/kazlib.html kazlib] from IS-IS ??
 
 
==See also==
 
*[[Wikibooks:Data Structures/Min and Max Heaps|Heaps at wikibooks]]
 
 
==Notes==
 
<references/>
 
  
 
= Links =
 
= Links =
 
== Papers, Theory ==
 
== Papers, Theory ==
 +
 
* [http://ietfreport.isoc.org/idref/rfc3626/ RFC-3626]: the "OLSR RFC"
 
* [http://ietfreport.isoc.org/idref/rfc3626/ RFC-3626]: the "OLSR RFC"
 
* [http://www.lix.polytechnique.fr/hipercom/index.php?option=com_content&task=view&id=152&Itemid=1 Workshop at Hipercom Oct 2006]
 
* [http://www.lix.polytechnique.fr/hipercom/index.php?option=com_content&task=view&id=152&Itemid=1 Workshop at Hipercom Oct 2006]

Version vom 24. November 2007, 14:09 Uhr

<google>OLSR</google>

Goals

Our mission is simple. Build the most scalable and usable routing daemon routing wireless and fixed line segments. The routing daemon shall scale up to

  1. 10000 (10K) nodes and
  2. 20000 (20K) routes

running on low-cost hardware (200 Mhz RISC CPUs / 32MB of memory).

One of the main goals is to make OLSR more scalable in practice. 350px|right|Complexity for n=1000 nodes of different data structures in the Dijkstra shortest path (SPF) algorithm.

In the this picture you can see the different complexity graphs for the SPF under the assumption that every node has 10 edges . As you can see, the red line has O(n^2) complexity. This conforms to the current implementation of OLSR from www.olsr.org. OLSR-NG plans to reduce the complexity to the green or even the yellow level. This will allow the mesh network clouds to become larger by a factor ~ 1000 (on the routing layer / layer 3).


For achieving that we first want to

  1. fix the existing olsrd and add new data structures and algorithms.
  2. Once olsrd is running fast we focus on protocol issues like
    1. measuring better links metrics, like including the bandwidth (ETT)
    2. link-state db synchronization issues (rather then brute force retransmission).

All protocol extensions shall be documented as an internet-draft and submitted to the IETF MANET working group http://www.ietf.org/html.charters/manet-charter.html


Next we want to improve the management tools of olsrd like the

  1. http_info plugin or
  2. txt_info plugins or
  3. building a new XMLinfo plugin

such that that large clouds consisting of thousands of nodes can be troubleshooted in an effective way.

OLSR-NG is a open source project. Meaning everybody is invited to join in and help. We do have some bounties for the best solutions. If you want to participate, drop us an email: mailto:aaron@lo-res.org, mailto:hannes@gredler.at or mailto:bernd@firmix.at

Main OLSR-NG project blog: http://olsr.funkfeuer.at Slides from the OLSR-NG kickoff presentation: http://outpost.funkfeuer.at/~aaron/olsr-ng.pdf

Current Status

  • olsrd 0.5.4 was released! Thx everybody a lot! Big credits go out to Hannes and Bernd.
  • UML test server is being worked on. This will allow the B.A.T.M.A.N team to test their protocol and us to test our scalability ideas with 1000nd of olsr instances.
  • Ongoing code cleanups

200px|supported by IPA made possible by a grant from IPA. Thanks we really appreciate your help and your courage to support us!

Subprojects

SPF refactoring

LSDB refactoring

RIB refactoring

UML test server

Data Sturctures and Algorithms

Who wants to contribute?

Who is willing to work on something Contact info
Aaron Kaplan mailto:aaron@lo-res.org
Roman Steiner mailto:roman.steiner@gmx.at
Bernd Petrovitsch mailto:bernd@firmix.at
Andrej Rursev (zethix) mailto:zethix@gmail.com
Hannes Gredler mailto:hannes@gredler.at

Who is working on what?

Who What Status Comments
Bernd Petrovitsch, Thomas Lopatic, Hannes Gredler release 0.5 DONE
 ??? release 0.5 make packages for freifunk FW, DD-WRT, etc, windows (XP, Vista), ... and test them OPEN freifunk FW is done by Sven-Ola Tücke, .rpm and .deb by various people on olsr-dev@lists.olsr.org, Windows: ???
Aaron analyze IP autoconfig mechanisms and find the best one OPEN
Hannes Gredler tcpdump parses olsr packets, DONE
Hannes Gredler SPF improvements DONE
Hannes Gredler reduce malloc thrashing during SPF computation DONE
Hannes Gredler improve post-SPF handling (route table conciliation, best path selection) DONE
Bernd Petrovitsch rework the logging/tracing/error reporting WIP
Bernd Petrovitsch rework the LQ-TC and LQ-HELLO input parsing, avoiding malloc thrashing DONE The output side can also be avoid malloc() and free(). Alas, the code is more complicated there.
Hannes Gredler spurious neighbor loss on nodes with high neighbor count OPEN/investigating
Aaron Kaplan,Bernd Petrovitsch olsr-ng test server DONE Well, the thing doesn't boot ATM. God knows why ....
Aaron Kaplan theory, complexity analysis. Goal: find the best complexity on the algorithmic side. DONE theory tells that fibonacci heaps are best, practise tells that an AVL tree as a minheap implementation fits the complexity of frequent re-keyings better
Zethix, Aaron Kaplan UML cluster setup WIP, currently we can start around 2000 UML instances. But the uml_switch software still drops packets between virtual interfaces. http://www.openvz.org seems also like a promising solution
Aaron Kaplan, Hannes draft. write a draft about LQ extensions OPEN
Bernd Petrovitsch Variuos Cleanup Mini- Projects DONE/WIP reworked floating point ops in src/mantissa.[ch] to minimize run-time impact, fixed dependencies,
Sebastian Sauer LinkQuality / metrics (e.g. ETX/ETT) improvements OPEN/WIP (no code yet committed) evaluate best current practice;
Sebastian Sauer FishEye improvements OPEN/investigating evaluate best current practice;
Sebastian Sauer effect of OLSR parameters on the mesh OPEN/investigating evaluate best current practice; spot and (maybe) eliminate dangers/instabilities
Sebastian Sauer selfish nodes / malicious nodes OPEN/investigating risk assessments

<mm>flash</mm>

contact mailto:aaron@lo-res.org or Bernd if you are interested in participating!

Next Steps

  • TU Wien lecture "Verteilte systeme", 20.4.2007 will present our ideas about optimizing complexity. Aaron also wants to adress more students from the TU to participate. DONE. Let's see if new participants want to join.
  • finalize the UML test server
  • try out the optimization ideas and document the speedup
  • more cleanups
    • olsrd is doing lots of malloc()s and free()s - use ltrace to see this.
      • review malloc()/free() if it theys are superflous and can be implemented with buffers on the stack or just moving pointers around.
      • are there very frequently malloc()ed and free()d struct? Perhaps a free list can help to avoid lots of malloc()/free() handling.
    • we have several coding styles in there
    • add wrappers to hide type casts for Windows (and perhaps others). Reserve some prefix (e.g. x is used for this often as in xmalloc(), olsr_ is IMHO quite long and there too many olsr_ perfixed types and functions right now.)
    • fixup error reporting/tracing/logging
    • add synchronization and make the daemon multi-threading (e.g. the bmf plugin uses it right now, the httpinfo plugin could benefit from such a thing)
    • make the parameter parsing of the plugins more consistent (some are case-sensitive, some are not, most do not check syntax errors). Work in progress
    • The incoming and outgoing packets are deserialized and serialized via pointers to packed structs. This is somewhat dangerous as other compilers or the same compielr for other architectures may or may not behave the same. And - worse - it misleads people to copy the same data various times around or play with pointers so no one can easily see ehat'e going on. I (Bernd) started with a more direct approach in src/lq_packet.c where we have one "unsigned char *" which walks sequentially through the incoming packet and gets the value with small inline functions into where one needs it later on - mostly some simple struct which is a normal C struct and used by the core code.
    • 'net_outbuffer_push() memcpy()es the packet from the caller supplied buffer into another buffer. Well, that's one more copy operation for every outgoinf packet.
    • ....

Bounties

please take a look at the slides and get in contact with us directly at the moment!

Source code

  • CVS repos:
 (as user "ipo23" ) 
    export CVS_RSH=ssh
    cvs -z3 -d:ext:ipo23@olsrd.cvs.sourceforge.net:/cvsroot/olsrd co -P olsrd-current
 as anonymous user) 
     cvs -d:pserver:anonymous@olsrd.cvs.sourceforge.net:/cvsroot/olsrd login 
     cvs -z3 -d:pserver:anonymous@olsrd.cvs.sourceforge.net:/cvsroot/olsrd co -P olsrd-current

Links

Papers, Theory

  AdHocSys is a two-year European project to provide reliable broadband services in rural and mountain regions. This objective
  will be achieved by means of the creation of a wireless ad hoc broadband network, with special enhancements to reliability
  and availability. The network consists of one or several gateways connecting to the global Internet and several intermediate
  nodes which provide multihop connections between the gateways and end users.

misc