On Tue, Dec 02, 2003 at 04:56:41PM -0500, Ed Tomlinson wrote:
> Hi 
> 
> How about this.
> 
> We keep one number: long estimateLimit;
> 
> We accept a request if the best estimate in the routing object better than the limit.
> 
> If the load is higher than our HighLoadLimit we decrease estimateLimit and if
> its lower than our LoadLoadLimit we increace estimateLimit (say using .95 and 1.05 to
> start with).

More lovely alchemy. But the main concern is as Ian's load balancing
scheme - how do you prevent the estimateLimit from getting really high
or really low and taking ages to recover.
> 
> This way we accept requests that have good estimates and vary what we consider
> a good estimate depending on the load.
> 
> Note that this could also be applied to CP routing replacing estimateLimit with 
> CPLimit.
> 
> Comments,
> Ed
> PS. I can implement the above quickly if we agree its the way to go.
> 
> 
> On December 02, 2003 03:23 pm, Toad wrote:
> > Here is how I propose to implement selective accept on NGR:
> >
> > We keep two numbers:
> > int totalRequestsAccepted
> > double totalRequestsConsideredTimesLoad
> >
> > We have the function targetAcceptRatio(), which tells us what proportion
> > of requests we want to accept, based on the current estimated load (if
> > anyone has a non-alchemical way to do this...) - one possibility is that
> > it is 1-load, another is that we accept everything up to some value (say
> > overloadLow) and reject everything above some value (overloadHigh), and
> > increase linearly in between. Because of the hoped for effects, I am not
> > sure that the first option isn't the better one.
> >
> > When we get a request:
> > totalRequestsConsideredTimesLoad += targetAcceptRatio()
> > If totalRequestsAccepted > totalRequestsConsideredTimesLoad ,
> > we know that we have accepted too many, so reject.
> > Otherwise, accept, and totalRequestsAccepted++.
> >
> > Thus, we don't need to queue requests, there is no additional latency,
> > and the implementation is really rather straightforward, apart from
> > calculating the target acceptance ratio. And we accept the right
> > fraction. We need to do some maintenance to maintain accuracy (subtract
> > the largest whole part of both numbers from both numbers periodically),
> > and we need one lock, but that's it.
> >
> > I will implement this on unstable soon, unless there are any objections.
> >
> > It requires NGRouting...
> _______________________________________________
> Devl mailing list
> [EMAIL PROTECTED]
> http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/devl

-- 
Matthew J Toseland - [EMAIL PROTECTED]
Freenet Project Official Codemonkey - http://freenetproject.org/
ICTHUS - Nothing is impossible. Our Boss says so.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Devl mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to