Come funziona I2P, perché è lenta, e perché non usa tutta la mia larghezza di banda?
Una delle cose che le persone domandano più spesso è "quanto è veloce I2P?", e nessuno apprezza la risposta: "dipende". Dopo aver provato I2P, ciò che chiedono è "si può velocizzare?", e la risposta a ciò è più empatica: "sì".
I2P è una rete completamente dinamica. Ogni client è conosciuto dagli altri nodi e analizza i nodi locali conosciuti per verificare la raggiungibilità e la capacità. Solo i nodi raggiungibili e idonei sono salvati nel NetDB locale (Questo è generalmente solo una porzione della rete, circa 500-1000). Quando I2P costruisce i tunnel, seleziona la risorsa migliore da questo gruppo. Per esempio, un piccolo sottogruppo di 20-50 nodi sono disponibili solo per costruire tunnel. Siccome le analisi sono effettuate ogni minuto, il gruppo dei nodi utilizzati cambia ogni minuto. Ogni nodo I2P conosce una parte differente della rete: ciò significa che ogni router ha un differente insieme di nodi I2P da essere usati come tunnel. Anche se due router hanno lo stesso sottogruppo di nodi conosciuti, le analisi di raggiungibilità e capacità probabilmente mostreranno risultati differenti, perché gli altri router saranno sotto carico appena un router analizza, ma saranno liberi se il secondo router analizza.
L'immagine sopra descrive perchè ogni nodo I2P ha diversi nodi per costruire i tunnel. Perchè ogni nodo I2P ha diversa latenza e larghezza di banda, i tunnel (i quali sono costruiti attraverso quei nodi) hanno valori diversi di latenza e larghezza di banda. E poichè ogni nodo I2P ha diversi costrutti dei tunnel, due nodi I2P non hanno le stesse impostazioni dei tunnel.
Un server/client è conosciuto come "destinazione" e ogni destinazione possiede almeno un tunnel in entrata e uno in uscita. Sono predefiniti 3 HOPS per tunnel Vengono così aggiunti fino a 12 HOPS (cioè 12 diversi nodi I2P) per ottenere un completo percorso client-server-client.
Ogni pacchetto dati è inviato attraverso 6 altri nodi I2P fino a che raggiunge il server:
client - hop1 - hop2 - hop3 - hopa1 - hopa2 - hopa3 - server
e a ritroso attraverso 6 diversi nodi I2P:
server - hopb1 - hopb2 - hopb3 - hopc1 - hopc2 - hopc3 - client
As most traffic on I2P (www, torrent,...) needs ack packages until new data is sent, it needs to wait until a ack package returns from the server. In the end: send data, wait for ack, send more data, wait for ack,.. As the RTT (RoundTripTime) adds up from the latency of each individual I2P node and each connection on this roundtrip, it takes usually 1-3 seconds until a ack package comes back to the client. With some internals of TCP and I2P transport, a data package has a limited size and cannot be as large as we want it to be. Together these conditions set a limit of max bandwidth per tunnel of 20-50 kbyte/sec. But if ONLY ONE hop in the tunnel has only 5 kb/sec bandwidth to spend, the whole tunnel is limited to 5 kb/sec, independent of the latency and other limitations.
Due to encryption used and other setups in I2P (howto built up tunnels, latency, ...) it is quite expensive in CPU time to build a tunnel. This is why a destination is only allowed to have a max of 6 IN and 6 OUT tunnels to transport data. With a max of 50 kb/sec per tunnel, a destination could use roughly 300 kb/sec traffic combined ( in reality it could be more if shorter tunnels are used with low or no anonymity available). Used tunnels are discarded every 10 minutes and new ones are built up. This change of tunnels (and sometimes clients that shutdown hard due to usage of "shut down at once" or situations where there is power loss) does sometimes break tunnels and connections, as seen on the IRC2P Network in loss of connection (ping timeout) or on when using eepget.
With a limited set of destinations and a limited set of tunnels per destination, one I2P node only uses a limited set of tunnels across other I2P nodes. For example, if an I2P node is "hop1" in the small example above, we only see 1 participating tunnel originating from the client. If we sum up the whole I2P network, only a rather limited number of participating tunnels could be built with a limited amount of bandwidth all together. If one distributes these limited numbers across the number of I2P nodes, there is only a fraction of available bandwidth/capacity available for use.
To remain anonymous one router should not be used by the whole network for building tunnels. If one router does act as a tunnel router for ALL I2P nodes, it becomes a very real central point of failure as well as a central point to grab IPs and data from the clients. This is not good. I2P attempts to spread the load across a lot of I2P nodes because of this reason.
Another point is the full mesh network. Each connection hop-hop utilizes one TCP or UDP connection on the I2P nodes. With 1000 connections, one sees 1000 TCP connections. That is quite a lot and some home and small office routers (DSL, cable,..) only allow a small number of connections (or just go mad if you use more than X connections). I2P tries to limit these connections to be under 1500 per UDP and per TCP type. This limits the amount of traffic routed across your I2P node as well.
In summary, I2P is very complex and there is no easy way to pinpoint why your node is not used. If your node is reachable and has a bandwidth setting of >128 kbyte/sec shared and is reachable 24/7, it should be used after some time for participating traffic. If it is down in between, the testing of your I2P node done by other nodes will tell them: you are not reachable. This blocks your node for at least 24h on other nodes. So, the other nodes which tested you as down will not use your node for 24h for building tunnels. This is why your traffic will be lower after a restart/shutdown for a minimum of 24h.
Altro: gli altri nodi I2P hanno bisogno di conoscere il tuo router I2P per poter effettuare i test di raggiungibilità e capacità. Gli altri nodi possono impiegare del tempo per analizzare il tuo nodo. Per risparmiare tempo, prova a costruire più tunnels con I2P, ad esempio: usa un torrent o un sito www per qualche secondo.
Miglioramenti alle prestazioni
Per le possibili migliorie di performance future guarda su Migliorie di Performance in Arrivo.
Per conoscere i miglioramenti alle prestazioni apportati in passato, consulta lo Storico delle prestazioni.