-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Something I've observed about my node and heard from others is that a
lot of connection requests are being rejected.  When I say a lot, I
mean 98% of all connection attempts.  This is pretty horrible, as even
if you have references to good nodes, you still can't get on the
network because you can't connect to any nodes.

I believe this is caused by some bad default settings in the
connection management.  The options which are set poorly are
maxNodeConnections and maximumThreads.  maxNodeConnections restricts
the number of incoming node connections, so that the node doesn't take
over the entire computer when a million nodes try to contact it.
maximumThreads sets the size of the threadpool that's used for things
like handling connections and individual messages.  Each message uses
a thread for a _really_ short amount of time and then the thread is
returned back to the threadpool, while it's the connection threads
that actually take up the threadpool.

The problem is that maxNodeConnections is set to 30 and maximumthreads
is set to 120.  Allowing for 10 miscellaneous threads for things like
encryption and the store and stuff like that, a node that has maxed
out its incoming connections can have 80 outgoing connections.  This
is where the problem comes from.  Having 80 outgoing connections and
30 incoming ones lets nodes have many more outgoing connections than
incoming.  

Say there's 1000 nodes in the network.  If 400 of them have as many
possible outgoing connections as allowed by the thread limits, you've
already more than saturated all 1000 nodes' incoming capability.

i.e.
1,000 nodes => 30,000 incoming connections
400 nodes => 32,000 outgoing connections

The other 600 nodes are just completely out of luck.

To fix this problem, I propose two things:
(1) default maxNodeConnections to 70
(2) subtract maxNodeConnections from maximumThreads on transient nodes.

The reason (2) is there is to fix the problem that transient nodes
will still be able to make 110 outgoing connections (because there's
no incoming connections to take up threads).  With (2), transient
nodes will only be able to make 40 outgoing connections by default,
which is probably plenty.

Thelema
- -- 
E-mail: thelema314 at bigfoot.com                        Raabu and Piisu
GPG 1024D/36352AAB fpr:756D F615 B4F3 BFFC 02C7  84B7 D8D7 6ECE 3635 2AAB
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.6 and Gnu Privacy Guard 
<http://www.gnupg.org/>

iD8DBQE8L6dz2NduzjY1KqsRApp+AJ9Q3Bf60rL1mCAgp8W1cGlt5x+YnACfcwTU
EDUpMRgZJiwADcBi+Kf+omk=
=WQ0z
-----END PGP SIGNATURE-----

_______________________________________________
Devl mailing list
Devl at freenetproject.org
http://lists.freenetproject.org/mailman/listinfo/devl

Reply via email to