Reuse of idle threads on fill server
Posted: November 30th, 2008, 3:32 pm
I've been testing a server configuration with the latest version 0.4.5
The primary server has spotty completion and I have configured 1 connection for it.
The fill server has excellent completion and allows unlimited connections, or at least I haven't found the connection limit.
On a 430 error the download task is passed to the fill server. When that task is completed, the connection remains open for thread #1. When there is another 430 error on the primary server, and thread #1 on the fill server is idle, instead of re-using the idle thread #1 (Feature Request) SABnzbd opens thread #2.
I configured 64 connections on the fill server, and there were occasional 430's on the primary server. SABnzbd gradually opened all 64 connections on the fill server and used them in round-robin order. Only after thread #64 had been used, did thread #1 finally get re-used.
So 64 connections are kept open on the fill server, when only a few are needed at any one time. If I estimate that I won't need more than 3 simultaneous connectons on the fill server, configure it for 3 and guess wrong because it needs more, then fill tasks can stack up waiting for unused connections.
I can't think of any advantage to open a new connection instead of re-using an idle connection. If that isn't a bug, then it's close to being a bug. SABnzbd can be smarter, and not open any more simultaneous connections to the fill server than needed.
The primary server has spotty completion and I have configured 1 connection for it.
The fill server has excellent completion and allows unlimited connections, or at least I haven't found the connection limit.
On a 430 error the download task is passed to the fill server. When that task is completed, the connection remains open for thread #1. When there is another 430 error on the primary server, and thread #1 on the fill server is idle, instead of re-using the idle thread #1 (Feature Request) SABnzbd opens thread #2.
I configured 64 connections on the fill server, and there were occasional 430's on the primary server. SABnzbd gradually opened all 64 connections on the fill server and used them in round-robin order. Only after thread #64 had been used, did thread #1 finally get re-used.
So 64 connections are kept open on the fill server, when only a few are needed at any one time. If I estimate that I won't need more than 3 simultaneous connectons on the fill server, configure it for 3 and guess wrong because it needs more, then fill tasks can stack up waiting for unused connections.
I can't think of any advantage to open a new connection instead of re-using an idle connection. If that isn't a bug, then it's close to being a bug. SABnzbd can be smarter, and not open any more simultaneous connections to the fill server than needed.