The request throttler had several problems: - Throttling was very laggy, but when it reacted it throttled too quickly. - PartialPieces got returned back to PeerCoordinator, and then back to PeerState, every few seconds, rather than continuing steady-state in PeerState - Holding the PartialPiece in the PeerCoordinator for several seconds while staying interested is poor and risks snubbing - Max request queue size was reduced far too quickly, doing so exponentially when the reduction occurred linearly - shouldRequest() called the request limiter second in the conditional, so the estimator was not decayed properly when over down bw limit - shouldRequest() used overDownBandwidthLimit() rather than _down.offer(), ensuring a very slow and laggy feedback loop. - Requests were added too quickly on unthrottle Fix these by: - Fixing and slowing max request queue size reduction to simulate an exponential reduction over time when throttled - Fixing shouldRequest() to always call offer() for both limiters - Slow addition of requests after unthrottle to simulate a linear increase over time Log tweaks also The request queue now mostly maintains a steady size, and properly meters the requests. The PartialPiece returns to the PeerCoordinator much less often, and comes back to PeerState much quicker if it does. Further tuning TODO
I2P
This is the source code for the reference Java implementation of I2P.
Latest release: https://i2p.net/en/downloads/
Installing
See INSTALL.txt or the installation instructions for your system:
Documentation
FAQ: https://i2p.net/en/docs/overview/faq/
API: Run 'ant javadoc' then start at build/javadoc/index.html
How to contribute / Hack on I2P
Please check out HACKING.md and other documents in the docs directory.
Building packages from source
To get development branch from source control: https://i2p.net/docs/development/new-developers/
Prerequisites
- Java SDK (preferably Oracle or OpenJDK) 17 or higher
- Non-linux operating systems and JVMs: See https://trac.i2p2.de/wiki/java
- Certain subsystems for embedded (core, router, mstreaming, streaming, i2ptunnel) require only Java 6
- Apache Ant 1.9.8 or higher
- The xgettext, msgfmt, and msgmerge tools installed from the GNU gettext package http://www.gnu.org/software/gettext/
- Build environment must use a UTF-8 locale.
Ant build process
On x86 systems do:
ant pkg
On non-x86, use one of the following instead:
ant installer-linux
ant installer-freebsd
ant installer-osx
Run 'ant' with no arguments to see other build options.
Gradle build process
Full builds of installers or updates are not yet possible, but the code can be compiled with:
./gradlew assemble
This will download dependencies over the clearnet by default, including Gradle
itself. To download through a SOCKS proxy (e.g. Tor), add the following lines to
your ~/.gradle/gradle.properties:
systemProp.socksProxyHost=localhost
systemProp.socksProxyPort=9150
Development builds
Automatic CI builds are available at the continuous integration page.
Docker
For more information how to run I2P in Docker, see Docker.md
Contact info
Need help? See the IRC channel #i2p on irc.freenode.net
Bug reports: https://i2pgit.org/I2P_Developers/i2p.i2p/issues http://git.idk.i2p/I2P_Developers/i2p.i2p/issues
Contact information, security issues, press inquiries: https://i2p.net/en/contact
Licenses
See LICENSE.txt