Currently we are seeing very high times after the route is found until the message leaves the node. They are in the order of 30 seconds and in some cases more than 2 minutes. We can chase the reasons everywhere, but the basic truth is that since we RoundRobin to all sending connections, the more sending connections we have the slower each one of them will be.

It is very common for average to busy nodes to have more than 100 sending connections, and values of up to 888 out of 1200 have been reported. The latter case was on a T1 with 1MBps uplink, and each one of those connections would get 1kb/sec uplink speed. Unfortunately, very few people have T1, and the most common uplink cap will be between 8 and 20 kb. I propose (and am willing to implement) that we set limits on the number of connections that can send at the same time. The scheme would be very simple and will guarantee that we don't get these ridiculous lags:

Make the RoundRobin queue fixed size - the number of kilobytes available uplink. Allow up to 40% of the slots to trailing field transfer and reserve the rest for message communication and negotiations. This ensures that when the queue is full, exactly 40% of the bandwith will be devoted to transfering files and the rest for routing. Since this is a RoundRobin queue, if the queue is not full and has no trailers enqueued, all of the bandwith will go for routing and vice versa.

Have a second level FIFO queue with aging parameter where only non-trailing field messages packet will be accepted. The size of that queue will be unlimited, but when a message packet enqueued there ages past some value, say 2000ms it should be moved to the RR. If there is a RR slot reserved for routing available, the message packet in the head of the FIFO queue will be dequeued and added to the RR. The node should refuse to start a new trailing field transfer if all RR slots reserved for trailing are full, and should refuse sending routing messages if all RR slots reserved for routing are full and the oldest job in the FIFO is older than the treshold.

This calls for redefinition of an overloaded node. The node should stop accepting new queries when it runs out of trailing field slots, and should stop accepting connections when both the RR slots for routing and the FIFO queues are full. The end result will be that the nodes will be overloaded much more often, but when they are not they will be serving trailing fields and sending messages with guaranteed minimum speed of 1k/sec. So when NGRouting solves the problem with overloaded nodes, we will be witnessing very low latency on the network and high throughput speeds.

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

Reply via email to