TCP stack throughput

Marc Feeley feeley@REDACTED
Tue Jul 5 20:11:41 CEST 2005


On 5-Jul-05, at 12:27 PM, Roger Larsson wrote:

> What about the factorial - C version does not do it.
> Isn't it possible that it creates a bigger CPU load than expected?
> (due to using bignums)
>

Good point!  When I added a call to factorial in my Scheme version of  
the server (N=100), ECONNREFUSED errors are generated on the client  
side.  These errors occur because the client is generating connection  
requests faster than the server can complete them (by pulling them  
out of the backlog queue).  The problem is that the client and server  
are OS processes running on the same machine, so when the client is  
active (generating connection requests) the server is inactive and  
can't empty the backlog queue.  This problem will become more severe  
when the multitasking quantum of the OS is large and when it is  
faster to generate a connection request than to pull one out of the  
backlog queue (which depends on the implementation of the TCP  
stack).  Anyway, I "solved" the problem by decreasing the OS process  
priority of the client (with a "nice -20").  This eliminates the  
ECONNREFUSED errors.

Marc




More information about the erlang-questions mailing list