Diese Seite wurde zuletzt August 2010 aktualisiert und ist korrekt für Router Version 0.8.

There are a few major techniques that can be done to improve the perceived performance of I2P - some of the following are CPU related, others bandwidth related, and others still are protocol related. However, all of those dimensions affect the latency, throughput, and perceived performance of the network, as they reduce contention for scarce resources. This list is of course not comprehensive, but it does cover the major ones that are seen.

Für bisherige Leistungsverbesserungen, schauen Sie in der Performance Historie nach.

Besseres Profiling und Auswahl der Knoten

Vielleicht das Wichtigste, dass getan werden kann, um eine schnellere Performance zu erzielen, ist zu verbessern, wie Router die Peers auswählen, durch die sie ihre Tunnel bauen. - sicherzustellen, dass sie keine Peers mit langsamer Verbindung benutzen oder solche mit schneller Verbindung, die aber überlastet sind, etc. Zusätzlich müssen wir sicherstellen, dass wir uns keiner Sybil Attacke eines mächtigen Gegners mit vielen schnellen Maschinen aussetzen.

Netzwerkdatenbankabstimmung

We're going to want to be more efficient with the network database's healing and maintenance algorithms - rather than constantly explore the keyspace for new peers - causing a significant number of network messages and router load - we can slow down or even stop exploring until we detect that there's something new worth finding (e.g. decay the exploration rate based upon the last time someone gave us a reference to someone we had never heard of). We can also do some tuning on what we actually send - how many peers we bounce back (or even if we bounce back a reply), as well as how many concurrent searches we perform.

Session-Tag Optimierungen Verbesserungen

The way the ElGamal/AES+SessionTag algorithm works is by managing a set of random one-time-use 32 byte arrays, and expiring them if they aren't used quickly enough. If we expire them too soon, we're forced to fall back on a full (expensive) ElGamal encryption, but if we don't expire them quickly enough, we've got to reduce their quantity so that we don't run out of memory (and if the recipient somehow gets corrupted and loses some tags, even more encryption failures may occur prior to detection). With some more active detection and feedback driven algorithms, we can safely and more efficiently tune the lifetime of the tags, replacing the ElGamal encryption with a trivial AES operation.

Zusätzliche Ideen zur Verbesserung des Session Tags, Bereitstellung und Beschreibung auf der ElGamal/AES+SessionTag Seite.

sessionTag nach synchoronized PRNG migrieren

Right now, our ElGamal/AES+SessionTag algorithm works by tagging each encrypted message with a unique random 32 byte nonce (a "session tag"), identifying that message as being encrypted with the associated AES session's key. This prevents peers from distinguishing messages that are part of the same session, since each message has a completely new random tag. To accomplish this, every few messages bundle a whole new set of session tags within the encrypted message itself, transparently delivering a way to identify future messages. We then have to keep track of what messages are successfully delivered so that we know what tags we may use.

This works fine and is fairly robust, however it is inefficient in terms of bandwidth usage, as it requires the delivery of these tags ahead of time (and not all tags may be necessary, or some may be wasted, due to their expiration). On average though, predelivering the session tag costs 32 bytes per message (the size of a tag). As Taral suggested though, that size can be avoided by replacing the delivery of the tags with a synchronized PRNG - when a new session is established (through an ElGamal encrypted block), both sides seed a PRNG for use and generate the session tags on demand (with the recipient precalculating the next few possible values to handle out of order delivery).

Tunnel von längerer Dauer

Die derzeitige Voreinstellung von 10 Minuten für die Dauer von Tunnelverbindungen ist ziemlich willkürlich gewählt, aber "dem Gefühl nach" in Ordnung. Sobald wir Tunnel wiederherstellen und effektiver Probleme erkennen können, werden wir es leichter haben, diese Dauer zu variieren, was zur Entlastung der Netzwerkverbindung und der CPU (aufgrund des sonst aufwändigen Tunnelneuaufbaus) führt.

This appears to be an easy fix for high load on the big-bandwidth routers, but we should not resort to it until we've tuned the tunnel building algorithms further. However, the 10 minute tunnel lifetime is hardcoded in quite a few places, so substantial effort would be required to change the duration. Also, it would be difficult to maintain backward compatibility with such a change.

Currently, since the network average tunnel build success rate is fairly high, there are no current plans to extend tunnel lifetime. Da die Erfolgsrate des durchschnittlichen Tunnelaufbaus relativ hoch ist, gibt es momentan keine Pläne, die Laufzeit von Tunneln zu verlängern.

Die Zeitüberschreitungen anpassen

Yet another of the fairly arbitrary but "okay feeling" things we've got are the current timeouts for various activities. Why do we have a 60 second "peer unreachable" timeout? Why do we try sending through a different tunnel that a LeaseSet advertises after 10 seconds? Why are the network database queries bounded by 60 or 20 second limits? Why are destinations configured to ask for a new set of tunnels every 10 minutes? Why do we allow 60 seconds for a peer to reply to our request that they join a tunnel? Why do we consider a tunnel that doesn't pass our test within 60 seconds "dead"?

Each of those imponderables can be addressed with more adaptive code, as well as tunable parameters to allow for more appropriate tradeoffs between bandwidth, latency, and CPU usage.

Vollständige Streaming Protokoll Verbesserungen

  • Vielleicht die Wiederermöglichung des Interactive-Stream-Profils (die momentane Implementierung nutzt nur das Block-Stream-Profil).
  • Limitierung der Bandbreite auf Cient-Ebene (in entweder eine oder beide Richtungen eines Steams, oder möglicherweise verteilt über multiple Streams). Dies wäre natürlich zusätzlich zu der gesamten Limitierung der Routerbandbreite
  • Zugriffs-Kontroll-Listen (nur Streams zu oder von bestimmten Zieladressen Zugriff gewähren)
  • Web Kontrolle und Monitoring der Gesundheit der vielfachen Streams, so wie die Möglichkeit diese explizit zu schliessen bzw. zu drosseln.

Zusätzliche Ideen zur Verbesserung der Streaming Bibliothek sind beschrieben auf der Streaming Bibliothek Seite.