[erlang-questions] gen_sctp throughput mystery

Anthony Shipman als@REDACTED
Sun Mar 4 02:37:03 CET 2012

I've been experimenting with the SCTP implementation in R15B. 
There seems to be a throughput problem. I run a client and server
connecting via localhost with these options

-define(MAX_STREAMS, 1).

    Opts = [
        {active,        once},
        {sctp_nodelay,  false},
        {sctp_initmsg, #sctp_initmsg{
            num_ostreams   = ?MAX_STREAMS,
            max_instreams  = ?MAX_STREAMS,
            max_attempts   = 5,
            max_init_timeo = 1000

The client fires 100 of 9KB packets at 10ms intervals.
The server sees this at the beginning before the socket buffer starts overflowing:

4-Mar-2012 12:28:18.288: received data {99,{1330,824498,288005}} transit 0.211ms speed 836.3866077068857KB/s
4-Mar-2012 12:28:18.487: received data {98,{1330,824498,299006}} transit 188.851ms speed 46.42332987712945KB/s
4-Mar-2012 12:28:18.687: received data {97,{1330,824498,310005}} transit 377.591ms speed 46.400552721301295KB/s
4-Mar-2012 12:28:18.887: received data {96,{1330,824498,321005}} transit 566.59ms speed 46.34023170115851KB/s
4-Mar-2012 12:28:19.087: received data {95,{1330,824498,332005}} transit 755.584ms speed 46.34139024170725KB/s
4-Mar-2012 12:28:19.287: received data {94,{1330,824498,343006}} transit 944.562ms speed 46.34486621095215KB/s
4-Mar-2012 12:28:19.487: received data {93,{1330,824498,354006}} transit 1133.563ms speed 46.33976830115849KB/s
4-Mar-2012 12:28:19.687: received data {92,{1330,824498,365005}} transit 1322.613ms speed 46.32864948087718KB/s
4-Mar-2012 12:28:19.887: received data {91,{1330,824498,376006}} transit 1511.665ms speed 46.32772315336436KB/s

The now() value shows the packets being written to the socket at 11ms intervals on the client
but they are received at strict 200ms intervals on the server. The server is
just doing a simple receive loop.

Is there something in SCTP that limits the rate on an SCTP stream?

Anthony Shipman                    Mamas don't let your babies 
als@REDACTED                   grow up to be outsourced.

More information about the erlang-questions mailing list