Lloyd Bryant wrote:
> After adding some debugging statements to the code, I've verified that this 
> is a "false positive" situation.
> ======================================
> >From src/core/bsched.c:2485
> 
>     if (ul_running && bws_out_ema < BW_OUT_UP_MIN)
>         return FALSE;       /* 1. */
> ======================================
> ul_running = "Am I running as an Ultrapeer?" (boolean)

No, that's the number of currently active uploads. It's a global variable.
Yes, that's ... uh ... silly.

> bws_out_ema = Output bandwidth used for Gnet traffic (I *think* this is in
>                          Kbits/sec - not really sure)
> BW_OUT_UP_MIN = 8192

> Basically, this is saying "If the amount of bandwidth used for outgoing Gnet 
> connections is less than 8192, then there isn't enough available bandwidth - 
> switch to leaf".

Almost. It's "If the estimated average of the cumulative upload rate is below
8 KiB/s...".

> I believe the purpose of this is to detect "bandwidth starvation" - If 
> there's some other process that's using up so much of the node's bandwidth 
> that there isn't enough left for Gnet, then GtkG *should* be demoted (to 
> reduce negative impact on Gnet).

Yes, that's the idea. I think it's best to simply remove this check because it's
pure nonsense. Of course there's no trivial way to detect the available
bandwidth or congestion but that doesn't mean some oversimplistic attempt
is acceptable.

-- 
Christian

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Gtk-gnutella-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel

Reply via email to