TCP stack throughput

Ulf Wiger (AL/EAB) <>
Tue Jul 5 11:50:53 CEST 2005

Well, actually 900 connections on Solaris, with a 60 sec timeout.

That's still not very impressive.

I think one big difference between the erlang implementation
and the c program is that the c program does blocking i/o.

I tried rewriting the tcp_server so that it handles all 
connections in one process, one at a time. That didn't 
help much. In fact, it got slightly worse. Perhaps not too

One could also try to use the basic socket interface, rather
than gen_tcp. I tried simulating that by removing one of the 
io:formats (;-)), but that made little difference.


> -----Original Message-----
> From: 
> [mailto:]On Behalf Of Joel Reymont
> Sent: den 5 juli 2005 11:22
> To: Erlang Users' List
> Subject: Re: TCP stack throughput
> Tony,
> I made the server close the connection right after sending 
> but it did  
> not make much of a difference. On Mac OSX 200 out of 500 connection  
> requests are refused.
> With the C server 1,000 connections are accepted easily and within a  
> second or two. With Erlang the most we got is 500 connections on  
> Solaris and that's with a large connection timeout.
>      Joel
> On Jul 5, 2005, at 11:02 AM, Tony Rogvall wrote:
> >
> > There is a difference between the C-server and the Erlang-server  
> > and that is that the
> > C-server is closing the socket after the calculation while the  
> > Erlang-server is waiting
> > for the client to close. This will probably tie up resources for  
> > longer time than needed.
> --

More information about the erlang-questions mailing list