From 0642fa80939d9ca5c0972ef65f0defc645caf443 Mon Sep 17 00:00:00 2001 From: sponge Date: Sat, 28 Nov 2009 13:53:34 +0000 Subject: [PATCH] * Improvement to BOB's TCPio to hopefully lower load average. It seems to be helping a little when stress-tested with Robert. --- apps/BOB/nbproject/private/private.xml | 3 --- apps/BOB/src/net/i2p/BOB/DoCMDS.java | 2 +- apps/BOB/src/net/i2p/BOB/TCPio.java | 8 ++++++-- history.txt | 4 ++++ router/java/src/net/i2p/router/RouterVersion.java | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/apps/BOB/nbproject/private/private.xml b/apps/BOB/nbproject/private/private.xml index 685ecc5a1..c1f155a78 100644 --- a/apps/BOB/nbproject/private/private.xml +++ b/apps/BOB/nbproject/private/private.xml @@ -1,7 +1,4 @@ - - file:/usblv/NetBeansProjects/wi2p.i2p/apps/BOB/src/net/i2p/BOB/BOB.java - diff --git a/apps/BOB/src/net/i2p/BOB/DoCMDS.java b/apps/BOB/src/net/i2p/BOB/DoCMDS.java index 8e4afb143..14c83c4ba 100644 --- a/apps/BOB/src/net/i2p/BOB/DoCMDS.java +++ b/apps/BOB/src/net/i2p/BOB/DoCMDS.java @@ -50,7 +50,7 @@ public class DoCMDS implements Runnable { // FIX ME // I need a better way to do versioning, but this will do for now. - public static final String BMAJ = "00", BMIN = "00", BREV = "08", BEXT = ""; + public static final String BMAJ = "00", BMIN = "00", BREV = "09", BEXT = ""; public static final String BOBversion = BMAJ + "." + BMIN + "." + BREV + BEXT; private Socket server; private Properties props; diff --git a/apps/BOB/src/net/i2p/BOB/TCPio.java b/apps/BOB/src/net/i2p/BOB/TCPio.java index d501759ef..5e99637dd 100644 --- a/apps/BOB/src/net/i2p/BOB/TCPio.java +++ b/apps/BOB/src/net/i2p/BOB/TCPio.java @@ -78,16 +78,20 @@ public class TCPio implements Runnable { * --Sponge * * Tested with 128 bytes, and there was no performance gain. + * 8192 bytes did lower load average across many connections. + * Should I raise it higer? The correct thing to do would be to + * override... perhaps use NTCP, but I2P's streaming lib lacks + * anything NTCP compatable. * * --Sponge */ int b; - byte a[] = new byte[1]; + byte a[] = new byte[8192]; try { try { while (lives.get()) { - b = Ain.read(a, 0, 1); + b = Ain.read(a, 0, 8192); if (b > 0) { Aout.write(a, 0, b); } else if (b == 0) { diff --git a/history.txt b/history.txt index c82497128..f70d505c5 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,7 @@ +2009-11-28 sponge + * Improvement to BOB's TCPio to hopefully lower load average. It seems + to be helping a little when stress-tested with Robert. + 2009-11-24 zzz * DataStructures: Remove unused Logs * OrderedProperties: Simplify, use in i2psnark diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 1ca622af5..b9d2a6b01 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,7 +18,7 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 21; + public final static long BUILD = 22; /** for example "-test" */ public final static String EXTRA = ""; public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;