Skip to content

SCTP throughput ~8x slower than TCP when the connection has latency #218

@iamcalledrob

Description

@iamcalledrob

Your environment.

  • Version: sctp v1.8.2
  • Other Information: tested between macOS<–>macOS and macOS<–>debian bullseye

What did you do?

Test setup:

  • Throughput tested with @enobufs's sctptest, dependencies updated to use the latest version of pion/sctp
  • Latency controlled using macOS "Network Link Conditioner"
  • Tested between separate physical devices connected by gigabit ethernet

I ran sctp-test in both TCP and SCTP (sctp-test refers to this as "udp") modes and compared the throughput with varying levels of latency:

  • For TCP: ./sctptest -network tcp -s <addr> [client] and ./sctptest -network tcp [server]
  • For SCTP: ./sctptest -network udp -s <addr> [client] and ./sctptest -network udp [server]

What did you expect?

I expected the TCP and SCTP throughput to be in the same ballpark.

What happened?

SCTP overwhelmingly underperformed TCP. Approximate performance over gigabit ethernet:

Latency TCP SCTP
2ms 850 Mbps 850 Mbps
20ms 800 Mbps 200 Mbps
50ms 600 Mbps 85 Mbps
100ms 320 Mbps 45 Mbps
300ms 105 Mbps 17 Mbps

chart

Background

I ran into this performance issue when trying to diagnose why DataChannel performance was very slow when using a TURN server. My TURN server is about 100ms away, and I was seeing very poor performance (< 10 Mbps) relative to the speed of the internet connection.

SCTP.throughput.and.latency.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions