Page 1 of 1

100's of extra connections

PostPosted: 27 Feb 2011 04:01
by soul1355
I'm not sure whats hanging onto the connections, but once I start shareaza my connection count according to my router goes through the roof, and stays around 1000 for several minutes even after I quit. (1200 or more while its running) I'm not sure how the router actually counts connections, as the TCP and UDP usually add up to around 2000 on the totals, and it says its limited to 1024, but even the TCP alone exceeds that regularly. but long story short, this seems to actually be overloading my router, leaving me with fairly slow speeds overall. I've set my connection limits way down for all the protocols, but its still happening. for reference I usually see less than 300 connections when I'm using utorrent, (which my router complains about, but usually does not seriously effect my speeds) and it usually drops below 20 when I quit. while apparently not directly shareaza related since the connections hang around for a while after its closed (and the process is gone, unless there's a service level part I don't know about..), I thought I'd ask here anyway; so, anybody have any ideas?

Re: 100's of extra connections

PostPosted: 27 Feb 2011 14:25
by old_death
I assume you have a decent PC as well as a relatively fast internet connection?

The behaviour you describe is when Shareaza goes into Hub mode. What is Hub mode? In short, some small part of the network population is chosen to coordinate the network. This includes tasks like managing searches etc. This means, each of them does maintains static connections with an average of 300 other people on the network - and short-lived connections with an other 600-1000. Like this, G2 does not need any central servers (which - if they existed - could be shut down and the network thereby disrupted). BitTorrent, which you named as an example before does need such servers (the trackers). If they are shut down, their torrents die (well, sort of), which cannot happen on G2.

If you do not want your PC to run in Hub mode (as your router seems not to be able to handle it correctly), you can go to the Shareaza Settings and choose "Leaf" mode within the G2 network settings.

mfg,
Old

PS.: I did simplify much things in here... For further details, have a look at the Gnutella2 (G2) article on Wikipedia.

Re: 100's of extra connections

PostPosted: 27 Feb 2011 16:25
by ailurophobe
You don't actually have to be in hub mode for this to happen although it is caused by the way G2 communicates with hubs.

Basically when Shareaza sends an UDP packet out your router stores the information for a while so that it knows that a possible return packet should be let thru. When Shareaza searches thru the Gnutella 2 network it iterates thru the hubs in its host cache and sends them UDP query packets. The hubs are clustered so that every query covers several hubs but even so that is well over a thousand "UDP connections" for your router to keep track of.

The reason uTorrent needs fewer connections is because in BitTorrent the DHT search is based on the Kademlia algorithm in which the number of connections is roughly O(log N) instead of the O(n) as in Gnutella 2. If you switch of the DHT support and rely on trackers you can probably cut down on even that and stop the router complaints.

Anyway, if you have proper port forwards either manually or thru UPnP (pass the connection test) this is unnecessary and you should check if your router has an option to stop doing that.

Re: 100's of extra connections

PostPosted: 27 Feb 2011 21:42
by soul1355
ailurophobe, that makes sense... I have forwarded my ports, the problem may be that my router offers two ways to do this, and the one I used may be some kind of managed forward instead of what must be a more normal/strait through method.. I'll try setting it up through "advanced port forwarding" and see if that helps.
thanks, and I hope this works, I was about ready to simply give up on this, since, as much a fan as I am of the other protocols supported, I don't use them that often, and it seems to not share my files very often... maybe this will help that too.. :)
old_death, I don't know much more about it than what you explained, but I was ruling out hub mode, because there was no time for the network to recognize me as a hub candidate, it picked up the 1000+ connections almost immediately, so unless it caches me as a hub, it should be at least a few minutes before it started throwing all those connections at me. and they probably wouldn't linger so long after quitting. I'll report back when I get a chance to restart my router (required by advanced forwarding, which is why I don't use it all that often..)
and again, thanks for the replies, it will be nice to get this working.
on a side note, is there anywhere I can see some kind of cumulative sharing information?

Re: 100's of extra connections

PostPosted: 27 Feb 2011 23:28
by old_death

Re: 100's of extra connections

PostPosted: 28 Feb 2011 01:00
by cyko_01

Re: 100's of extra connections

PostPosted: 28 Feb 2011 03:50
by soul1355
well, the new forwards seem to have fixed the connection overload, I'm around 200 now. but I'm back to getting the firewall/NAT warning... its not windows, not the router firewall (I turned it off long enough to check), and the forwarding test comes back all green, so my only guess is that its having issues with the NAT. I'm thinking I need to specify a wider range of external ports for it to use, (I left it blank, defaulting to match the local port) but thats where I come to the end of my forwarding experience. any thoughts? does that sound like something I'd need to do? and am I right in thinking that basically funnels any traffic from those ports to my computer, meaning I'd have to be careful of overlap with other connections?
I'm assuming this is why I never get any hits from the search, but if the fact that I see the search stream means I'm open to hits, I guess I should just ignore the warning...

and as for the other thing, I'm aware of the graph, I was thinking of something more along the lines of what you get in eDonky for example, they use a total upload vs total download to determine your priority (partially) I was just wondering if there was anyway to access that kind of information in shareaza. I just noticed they do have a total upload for the current session on the home page, but I was thinking more long term.. its a nice start though.

Re: 100's of extra connections

PostPosted: 28 Feb 2011 04:11
by ailurophobe
If you are sure the connection test is working setting "Can accept incoming connections" to "yes" in the connections page of settings might help.

Re: 100's of extra connections

PostPosted: 28 Feb 2011 12:26
by old_death

Re: 100's of extra connections

PostPosted: 28 Feb 2011 21:39
by soul1355