* Improvement to BOB's TCPio to hopefully lower load average. It seems

to be helping a little when stress-tested with Robert.
This commit is contained in:
sponge
2009-11-28 13:53:34 +00:00
parent 6371f66677
commit 0642fa8093
5 changed files with 12 additions and 7 deletions

View File

@@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1"> <project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/> <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1">
<file>file:/usblv/NetBeansProjects/wi2p.i2p/apps/BOB/src/net/i2p/BOB/BOB.java</file>
</open-files>
</project-private> </project-private>

View File

@@ -50,7 +50,7 @@ public class DoCMDS implements Runnable {
// FIX ME // FIX ME
// I need a better way to do versioning, but this will do for now. // 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; public static final String BOBversion = BMAJ + "." + BMIN + "." + BREV + BEXT;
private Socket server; private Socket server;
private Properties props; private Properties props;

View File

@@ -78,16 +78,20 @@ public class TCPio implements Runnable {
* --Sponge * --Sponge
* *
* Tested with 128 bytes, and there was no performance gain. * 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 * --Sponge
*/ */
int b; int b;
byte a[] = new byte[1]; byte a[] = new byte[8192];
try { try {
try { try {
while (lives.get()) { while (lives.get()) {
b = Ain.read(a, 0, 1); b = Ain.read(a, 0, 8192);
if (b > 0) { if (b > 0) {
Aout.write(a, 0, b); Aout.write(a, 0, b);
} else if (b == 0) { } else if (b == 0) {

View File

@@ -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 2009-11-24 zzz
* DataStructures: Remove unused Logs * DataStructures: Remove unused Logs
* OrderedProperties: Simplify, use in i2psnark * OrderedProperties: Simplify, use in i2psnark

View File

@@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */ /** deprecated */
public final static String ID = "Monotone"; public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION; public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 21; public final static long BUILD = 22;
/** for example "-test" */ /** for example "-test" */
public final static String EXTRA = ""; public final static String EXTRA = "";
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA; public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;