<li> Keep totals and average of each stat for several time periods (1m, 10m, 1h, 1d)

180

<li> Re-sort into tiers every 30s

181

<li> Stats are persistent across restarts

182

</ul>

183

<p>Peer profiling was proposed for the I2P network in December 2003 (ref) by jrandom. It was introduced in the 0.3 release in March 2004 (ref).

176

<h2>Peer Profiling and Tiers </h2

177

178

<p>Peer profiling was proposed for the I2P network in December 2003 by jrandom [Jr03]. It was introduced in the 0.3 release in March 2004 [Jr04].

184

179

<p>

185

180

Peer selection within I2P is simply the process of choosing which routers on the network to route locally-generated messages (and replies to those messages) to go through. In other words, which peers are used for tunnels. To accomplish this, the router maintains a database of each peer's performance, called the "profile". The router uses that data to estimate the bandwidth of a peer, how often a peer will to accept tunnel build requests, and whether a peer seems to be overloaded or otherwise unable to reliably perform.

186

181

<p>

187

The profiling system includes mechanisms similar to the "opportunistic bandwidth measurement algorithm" proposed for Tor (ref), and much more.

182

The profiling system includes mechanisms similar to the "opportunistic bandwidth measurement algorithm" proposed for Tor [SB08], and much more.

188

183

<p>

189

184

The profile contains several statistics, continuously updated. For each statistic, averages, event counts, and maximums for 1 minute, 10 minute, 1 hour, and 24 hour periods are available. The profiles are also stored locally on disk, so that they are persistent across restarts. Also, the profile stores several timestamps, such as the last time a peer was heard from, the last time it accepted a tunnel request, and many more.

Much, if not most, of the profile data are unused in the current software. It remains a "reserve" defense that can be easily used to enhance the router's resistance to theoretical or actual attacks, such as denial-of-service attempts, selective packet drops, network database (floodfill) disruption, and others.

196

191

197

<p> The profile data is periodically coalesced and sorted into tiers of peers that are used for various functions, as described further below. The picture below shows a page from the I2P router console, with a portion of the profiles sorted into tiers.

192

<p> The profile data is periodically coalesced and sorted into tiers of peers that are used for various functions, as described further below. Profile data are stored on disk at shutdown and reloaded into the router upon restart so that a router need not start over collecting data. The picture below shows a page from the I2P router console, with a portion of the profiles sorted into tiers.

Nor does it used several other statistics available in the profile, including latency.

281

280

282

<li> The two metrics above are relative to the router's demand, not absolute, as they depend on traffic.

281

The two metrics above are relative to the router's demand, not absolute, as they depend on traffic. The router also maintains an "integration" metric reflecting the number of other peers that peer has told the router about. The integration metric is not used for peer selection.

<p> Here are some other lessens for those wishing to "tune up" their own network.

378

<p> Here are some other lessons for those wishing to "tune up" their own network.

380

379

381

380

<p> The basic measurements are much simpler than they used to be. The speed calculation, for example, was at one time over 400 lines of code, and it is now essentially a one-liner. The punishment for bad behavior is what keeps the network running well, and also is an area for further research. How heavily you punish

<p> To use the terms of the "Tune-up for Tor" paper [SB08], I2P's peer profiling and selection system is an opportunistic bandwidth measurement algorithm that is sensitive to network load and client demand. It does not use self-reported values. However it does not provide a "tunable" mechanism for users to trade off anonymity and performance. Nor do we think such a mechanism is necessary. Not only is active bandwidth probing (i.e. generating large amounts of special-purpose data for testing is not practical, as [SB08] states, it is not necessary. In addition to the bandwidth measurements proposed in [SB08], I2P measures tunnel build acceptance rate, with adjustments for various bad behavior by peers. I2P's profiling and selection system has been in continuous use for approximately five years.

403

<p> To use the terms of [SB08], I2P's peer profiling and selection system is an opportunistic bandwidth measurement algorithm that is sensitive to network load and client demand. It does not use self-reported values. However it does not provide a "tunable" mechanism for users to trade off anonymity and performance, and we do not think such a mechanism is necessary in I2P. Not only is active bandwidth probing (i.e. generating large amounts of special-purpose data for testing is not practical, as [SB08] states, it is not necessary. In addition to the bandwidth measurements proposed in [SB08], I2P measures tunnel build acceptance rate, with adjustments for various bad behavior by peers. I2P's profiling and selection system has been in continuous use for approximately five years.

405

404

406

405

<p>While the base system works well, several adjustments (some described above) are possible. The authors will continue to research and tune I2P's peer profiling and selection system in the coming months. We hope that the information in this paper will prove valuable to the developers of Tor and other anonymous networks.