Firstly: We need a minimum CP, to prevent CP from going to zero. But do we want to set it relatively high to ensure that nodes get retried occasionally?
The gist of simulation work I have done: Start with CP at 1.0 500 requests offline; there is a CP chance that we try to contact the node; if we are online we increase the CP in the usual way, if we are offline we decrease it. After 500 requests, come online. Results: With 500 requests offline, the node is first retried at request 88 after coming online. If we assume that the node is the first choice 5% of the time (most will be less, a few will be more, the average should be about 2%), and an average of 3000 requests per hour (approximately the current global average), then 500 requests corresponds to roughly 3 hours, and 88 is less than half an hour. So a node goes offline for 3 hours, it will be reintegrated in half an hour (the first time the node is retried the CP goes above 0.2, because the increase-CP formula is designed to increase the CP _FAST_ - it is CP -> 0.8CP + 0.2; the decrease formula is CP -> 0.9CP). With 2000 requests, roughly equivalent to twelve hours, it takes 480 requests to come back online - about three hours. With 8000 requests, it takes 628 requests to go back online, which is about four hours, after being offline for 48 hours. I suggest that these numbers are really pretty good, and pure CP will do fine, we do not need to implement hacks like backoff or like periodically polling nodes that we haven't talked to in a while to make their CP come back up. Source code is available, it's really a very simple simulation. If somebody wants to fit a curve, that'd be nice and I'll get you some more points. Even for three hours, half an hour is two announcement polling intervals, so by the time it is retried it may be serving a completely different keyspace. This can be tweaked by changing the CP formulae however, once we decide what the ideal behaviour is. -- Matthew Toseland toad at amphibian.dyndns.org amphibian at users.sourceforge.net Freenet/Coldstore open source hacker. Employed full time by Freenet Project Inc. from 11/9/02 to 11/1/03 http://freenetproject.org/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <https://emu.freenetproject.org/pipermail/devl/attachments/20021210/01211703/attachment.pgp>
