[RC5] LIFO in-buffers

voyageur at sky.net voyageur at sky.net
Sat Aug 8 01:44:30 EDT 1998

In lieu of rewriting the clients to allow the buff-in.rc5 to be FIFO instead
of LIFO, there is a fairly simple change that would accomplish the same thing.

Instead of fetching blocks onto the tail end of buff-in.rc5, as currently
done - it wouldn't be that much harder to:

1) have the fetch process rename the current in buffer to buff-in.tmp
2) fetch the specified number of blocks.
3) copy the older blocks from the renamed buffer to the end of buff-in.rc5
4) delete the temp file.

This always puts the newly fetched blocks at the bottom of the buffer, and
allows old blocks to be processed before they become stale.  This avoids the
necessity to decide between having big buffers in case of long offline
periods which might result in blocks at the bottom of the buffer becoming
stale, or having small buffers which won't go stale but have an increased
risk of being forced to generate random blocks.  The client could be set
with a threshhold of 1000:100 without risk of making random blocks nor risk
of having 900 stale blocks if the client is never offline when the
out-threshhold is reached.

This change would reduce the number of dups caused by clients working on
stale blocks, and reduces the number of random blocks due to small
in-threshholds.  The in-threshhold number could be the number of blocks you
would reasonably expect to work within 10 days.  The out-threshhold could be
the number of blocks you expect to work in a day, allowing a once-a-day flush.

At first glance, the only obstacle I see is that there are some
circumstances where transferring blocks from one buffer to the other could
result in running out of disk space.  (Probably caused by someone who hasn't
deleted their log file in a year...)  There could be an .ini setting that
lets you choose between fetching the old way, or fetching this way.

Mark Andreas <voyageur at sky.net>     http://www.sky.net/~voyageur
PGP key 77EF76B1 available via key server, finger or webpage

To unsubscribe, send 'unsubscribe rc5' to majordomo at lists.distributed.net
rc5-digest subscribers replace rc5 with rc5-digest

More information about the rc5 mailing list