I recently encountered the following situation: I have my max simultaneous
downloads per file set to 30, and the max total downloads set to 120. I
started the download of a file with a large number of sources ( > 3000 ). I
left it alone for a few minutes, and when I came back, I had 17 active
downloads, and 103 actively queued sources. Meanwhile, a THEX download for
this file couldn't even start, because I had reached the max total downloads.
I traced this issue back to the following change:
------------------------------------------------------------------------
r16537 | rmanfredi | 2009-04-21 09:18:21 -0700 (Tue, 21 Apr 2009) | 4 lines
download_has_enough_active_sources(): use fi->recvcount, not fi->lifecount as
the latter refers to all the known sources, not necessarily the ones that
end-up being active.
------------------------------------------------------------------------
What's happening is that actively queued sources do not count against
"fi->recvcount" (they're in "fi->active_queued"), but they *do* count against
the max total downloads.
I've changed that line in download_has_enough_active_sources() to use
"(fi->recvcount + fi->active_queued)", rather than just "fi->recvcount", and
this mitigates the issue considerably. But I'm still seeing active plus
actively queued exceeding the max simultaneous downloads per file value, since
with the above change the only thing limiting the number of attempted
connection is the max total downloads, and potentially every attempt can wind
up as active or actively queued.
Lloyd B.
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
gtk-gnutella-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel