All of lore.kernel.org
 help / color / mirror / Atom feed
* On 5.6.2, SCTP is 10 000 times slower than TCP
@ 2020-04-09 14:09 Konstantin Kharlamov
  2020-04-10 10:04 ` David Laight
  0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Kharlamov @ 2020-04-09 14:09 UTC (permalink / raw)
  To: netdev

I was considering, whether SCTP could be faster than TCP, and made some
measurements. Results are astonishing: 4.74 GB/sec for TCP vs 590, KB/sec for
SCTP. Let me rephrase: that is 4.74 GB/sec vs 0.00059 GB/sec! Wow. This looks
sooo wrong, that this is probably a bug, so I'm reporting it here.

Tests are done on kernel 5.6.2 with qperf 0.4.11 as follows:

1. Run `qperf` in one terminal
2. Run `qperf -v localhost tcp_bw tcp_lat sctp_bw sctp_lat` in the other terminal

Below are 4 results for my Dell Inspiron 5767 laptop.

Test number | TCP bandwidth | TCP latency, μs | SCTP bandwidth | SCTP latency, μs
1           | 4.74 GB/sec   | 6.81            | 590, KB/sec    | 11.8
2           | 5 GB/sec      | 6.79            | 721, KB/sec    | 10.5
3           | 4.73 GB/sec   | 6.76            | 8.39, MB/sec   | 10.9
4           | 5.7 GB/sec    | 6.1             | 53.4, MB/sec   | 9.33

FWIW, I also made some measurements on a server hw with older kernel 4.19. The
difference there is not that big, yet even there SCTP is twice as slower compared
to TCP.

P.S.: please add me to CC when replying as I'm not subscribed to the list.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: On 5.6.2, SCTP is 10 000 times slower than TCP
  2020-04-09 14:09 On 5.6.2, SCTP is 10 000 times slower than TCP Konstantin Kharlamov
@ 2020-04-10 10:04 ` David Laight
  0 siblings, 0 replies; 2+ messages in thread
From: David Laight @ 2020-04-10 10:04 UTC (permalink / raw)
  To: 'Konstantin Kharlamov', netdev

From: Konstantin Kharlamov
> Sent: 09 April 2020 15:09
> 
> I was considering, whether SCTP could be faster than TCP, and made some
> measurements.

SCTP will always be slower than TCP - it is much more complicated.
Additionally it is much harder to fill ethernet frames - which makes
it even slower.
Not to mention the slower checksum algorithm.
- I can add more...
IMHO even protocols like M3UA would run better over TCP.

> Results are astonishing: 4.74 GB/sec for TCP vs 590, KB/sec for
> SCTP. Let me rephrase: that is 4.74 GB/sec vs 0.00059 GB/sec! Wow. This looks
> sooo wrong, that this is probably a bug, so I'm reporting it here.

It shouldn't be that much slower though.

> Tests are done on kernel 5.6.2 with qperf 0.4.11 as follows:
> 
> 1. Run `qperf` in one terminal
> 2. Run `qperf -v localhost tcp_bw tcp_lat sctp_bw sctp_lat` in the other terminal
> 
> Below are 4 results for my Dell Inspiron 5767 laptop.
> 
> Test number | TCP bandwidth | TCP latency, μs | SCTP bandwidth | SCTP latency, μs
> 1           | 4.74 GB/sec   | 6.81            | 590, KB/sec    | 11.8
> 2           | 5 GB/sec      | 6.79            | 721, KB/sec    | 10.5
> 3           | 4.73 GB/sec   | 6.76            | 8.39, MB/sec   | 10.9
> 4           | 5.7 GB/sec    | 6.1             | 53.4, MB/sec   | 9.33

There is something strange going on, the latency is reasonable.

> FWIW, I also made some measurements on a server hw with older kernel 4.19. The
> difference there is not that big, yet even there SCTP is twice as slower compared
> to TCP.

That wouldn't surprise me.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-10 10:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-09 14:09 On 5.6.2, SCTP is 10 000 times slower than TCP Konstantin Kharlamov
2020-04-10 10:04 ` David Laight

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.