Network benchmark

Sean Hinde sean.hinde@REDACTED
Fri Dec 12 13:37:50 CET 2003


On 12 Dec 2003, at 11:41, Hal Snyder wrote:

> Of course, while Erlang could do session setup and teardown, it is
> much too slow to handle the media streams in VoIP, right? We started
> wondering about this "obvious fact" while Lennart was here this week.
>
> Below is a test program to bite off chunks of data from a file already
> read into memory, format them in RTP packets, and write to UDP as fast
> as possible, to get an upper limit on speed. We ran it on a 2MB or so
> file. Here are the results (destination IP address changed):
>
>> file_to_rtp:send(F,{10,1,1,1},0,40000).
> {read,{ok,<<2024386 bytes>>}}
> {1071,227577,57003}
> {{12,249,8,82},40000,#Port<0.111>,<<2024386 bytes>>,0,0}
> {bytes,2024386,packets,12653}
> elapsed_sec    0.252  bits_per_sec   64171492.9
> ok
>
> Considering that a typical voice channel is 64000 bits/sec, that is
> about 1000 x faster than we need, and close to line speed for the
> 100baseTX interface used.
>
> BTW, the OS is FreeBSD-5.0.
>   CPU: Pentium 4 (1816.18-MHz 686-class CPU)
> ...
>   real memory  = 268419072 (255 MB)
>
> I'd be interested in reports from other platforms, including Sparc and
> Win32. Running the program a second time may be faster due to having
> the file paged in.
>
> Of course, we need to see how many other activities can go on in a
> node when handling RTP - scheduler granularity may be a problem.
>
> <file_to_rtp.erl>

We have a HTTP proxy here which will happily stream 50Mbits/sec through 
the erlang node - all traffic coming in and out of the same 100BaseT 
interface (this was on my 1GHz Powerbook).

I'd say that this was pretty reasonable. I also tried running this with 
a few hundred clients pulling the same large file from the web server, 
and overall throughput didn't slow down all that much.

What you might need to be careful of in your small benchmark is that 
the inet driver internally queues a certain amount of data so you would 
see the send completed from the Erlang side before the data was 
actually sent out to the network. A larger file would perhaps give a 
better reading.

Recently Luke mentioned doing some profiling of the whole system doing 
something similar - I wonder how he got on - Luke?

Sean




More information about the erlang-questions mailing list