All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Konstantin Kharlamov' <hi-angel@yandex.ru>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: RE: On 5.6.2, SCTP is 10 000 times slower than TCP
Date: Fri, 10 Apr 2020 10:04:53 +0000	[thread overview]
Message-ID: <f45c281f37724eec868ae72180ab3cdd@AcuMS.aculab.com> (raw)
In-Reply-To: <09cc102b-31d1-b0e8-3ea1-3b07b9a6df74@yandex.ru>

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)

      reply	other threads:[~2020-04-10 10:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f45c281f37724eec868ae72180ab3cdd@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=hi-angel@yandex.ru \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.