Jano wrote: >> Looking forward to it! Backoff alone seems to get good throughput at >> high loads, but with a poor success rate (see the attached graphs, >> averaged over three runs) - I'll be interested to see whether LIFO's >> high success rate can be combined with backoff's high throughput. > > I have a new run going from 5 to 25 that I'll try to post this night. > We'll see what it shows...
Here are these results. I'd like to hear your comments, since the clear LIFO advantage is curious (mind you, in some cases it more than doubles the other techniques) and maybe it's a simulator artifact. Do we know what's the typical route length in these simulations? I expected the multi-hop thing to ruin the intuitively good performance of the single-hop case. Here's a svn diff, in case you see something wrong with my changes: Index: sim/DeadlineQueue.java =================================================================== --- sim/DeadlineQueue.java (revision 11169) +++ sim/DeadlineQueue.java (working copy) @@ -14,6 +14,12 @@ size += m.size(); messages.add (m); } + + public void addFirst (MESSAGE m) + { + size += m.size(); + messages.addFirst (m); + } public int headSize() { Index: sim/handlers/SskInsertHandler.java =================================================================== --- sim/handlers/SskInsertHandler.java (revision 11169) +++ sim/handlers/SskInsertHandler.java (working copy) @@ -107,7 +107,7 @@ if (searchState != ACCEPTED && LOG) node.log (ir + " out of order"); if (prev == null) { - node.log (this + " succeeded"); + node.log (this + " succeeded (remote)"); node.increaseSearchRate(); } else prev.sendMessage (ir); // Forward the message @@ -117,7 +117,7 @@ protected void sendReply() { if (prev == null) { - node.log (this + " succeeded"); + node.log (this + " succeeded (remote)"); node.increaseSearchRate(); } else prev.sendMessage (new InsertReply (id)); Index: sim/handlers/SskRequestHandler.java =================================================================== --- sim/handlers/SskRequestHandler.java (revision 11169) +++ sim/handlers/SskRequestHandler.java (working copy) @@ -47,7 +47,7 @@ dataFound = df; if (pubKey == null) return; // Keep waiting if (prev == null) { - node.log (this + " succeeded"); + node.log (this + " succeeded (remote)"); node.increaseSearchRate(); } else { @@ -66,7 +66,7 @@ pubKey = pk; if (dataFound == null) return; // Keep waiting if (prev == null) { - node.log (this + " succeeded"); + node.log (this + " succeeded (remote)"); node.increaseSearchRate(); } else { Index: sim/handlers/ChkInsertHandler.java =================================================================== --- sim/handlers/ChkInsertHandler.java (revision 11169) +++ sim/handlers/ChkInsertHandler.java (working copy) @@ -116,7 +116,7 @@ if (searchState != ACCEPTED && LOG) node.log (ir + " out of order"); if (prev == null) { - node.log (this + " succeeded"); + node.log (this + " succeeded (remote)"); node.increaseSearchRate(); } else prev.sendMessage (ir); // Forward the message @@ -126,7 +126,7 @@ protected void sendReply() { if (prev == null) { - node.log (this + " succeeded"); + node.log (this + " succeeded (remote)"); node.increaseSearchRate(); } else prev.sendMessage (new InsertReply (id)); Index: sim/handlers/ChkRequestHandler.java =================================================================== --- sim/handlers/ChkRequestHandler.java (revision 11169) +++ sim/handlers/ChkRequestHandler.java (working copy) @@ -47,7 +47,7 @@ if (blocksReceived == 32) { node.cacheChk (key); if (prev == null) { - node.log (this + "succeeded"); + node.log (this + "succeeded (remote)"); node.increaseSearchRate(); } finish(); @@ -72,7 +72,7 @@ if (blocksReceived == 32 && searchState == TRANSFERRING) { node.cacheChk (key); if (prev == null) { - node.log (this + " succeeded"); + node.log (this + " succeeded (remote)"); node.increaseSearchRate(); } finish(); Index: sim/Node.java =================================================================== --- sim/Node.java (revision 11169) +++ sim/Node.java (working copy) @@ -504,7 +504,7 @@ // Add a search to the queue private void addToSearchQueue (Search s) { - searchQueue.add (s); + searchQueue.addFirst (s); if (useThrottle) { if (LOG) log (searchQueue.size() +" searches in queue"); if (searchQueue.size() > 1) return; // Already waiting Index: sim/Peer.java =================================================================== --- sim/Peer.java (revision 11169) +++ sim/Peer.java (working copy) @@ -74,11 +74,11 @@ m.deadline = Event.time() + MAX_DELAY; if (m instanceof Block) { if (LOG) log (m + " added to transfer queue"); - transferQueue.add (m); + transferQueue.addFirst (m); } else { if (LOG) log (m + " added to search queue"); - searchQueue.add (m); + searchQueue.addFirst (m); } // Start the coalescing timer startTimer(); @@ -90,7 +90,7 @@ private void sendAck (int seq) { if (LOG) log ("ack " + seq + " added to ack queue"); - ackQueue.add (new Ack (seq, Event.time() + MAX_DELAY)); + ackQueue.addFirst (new Ack (seq, Event.time() + MAX_DELAY)); // Start the coalescing timer startTimer(); // Send as many packets as possible -------------- next part -------------- A non-text attachment was scrubbed... Name: lifo-fifo-all-5-25-ratio.png Type: image/png Size: 8457 bytes Desc: not available URL: <https://emu.freenetproject.org/pipermail/tech/attachments/20061210/4630d553/attachment.png> -------------- next part -------------- A non-text attachment was scrubbed... Name: lifo-fifo-all-5-25-total.png Type: image/png Size: 8366 bytes Desc: not available URL: <https://emu.freenetproject.org/pipermail/tech/attachments/20061210/4630d553/attachment-0001.png>