TCP stack throughput
Javier París Fernández
Wed Jul 6 20:03:18 CEST 2005
On Wed, Jul 06, 2005 at 09:29:45AM +0200, Joe Armstrong (AL/EAB) wrote:
> Matthias Lang wrote:
> > Mickael Remond writes:
> > > Joel Reymont wrote:
> > > > So this means 500 simultanous connection requests on
> > Solaris and about
> > Matthias Lang said:
> > Your results could be interpreted as showing one _or more_ of the
> > following:
> > a) That your test client is the bottleneck
> > b) That your test server is the bottleneck
> > c) That the OS/tcp stack isn't really designed for the sort of
> > use you're testing.
> As regards c) I have recently reviewed a paper on an implementation of TCP/IP
> in Erlang (this paper has been accepted for the next SIGPLAN Erlang workshop) - the
> results were interesting - they showed that
> 1) A pure Erlang stack was much more "even" than conventional stacks.
> Conventional stacks seemed to favour a few connections and starve out the rest,
> So a few connections got very good bandwidth, the rest were very poor.
> The Erlang stack was much fairer.
> 2) The Erlang stack was c. 25% of the efficiency of the native stack
> The Erlang stack also could synchronize the state of each connection with a second machine, so that the second machine could take over a live TCP connection.
> All of this seems to be saying that if you want to handle very large numbers
> of very short-lived connections use a pure erlang stack - but if you want to handle
> a small number of long-lived high bandwidth connections use a conventional stack.
> If this is true, it would not surprise me, since this behaviour mirrors how processes
> are handled in Erlang and in the OS - since Erlang favours losts of small light-weight processes and the OS a few heavy-weight processes.
I'll try this particular case with the Erlang Stack as soon as posible,
as it seems an interesting test for Erlang vs Native OS.
(However, as this is the course end in Spain, it may take a while to
have some time to try the example).
More information about the erlang-questions