Network benchmark

Hal Snyder hal@REDACTED
Fri Dec 12 12:41:49 CET 2003

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>>}}
{{12,249,8,82},40000,#Port<0.111>,<<2024386 bytes>>,0,0}
elapsed_sec    0.252  bits_per_sec   64171492.9

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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: file_to_rtp.erl
Type: application/octet-stream
Size: 1545 bytes
Desc: file_to_rtp.erl
URL: <>

More information about the erlang-questions mailing list