esnet / iperf

iperf3: A TCP, UDP, and SCTP network bandwidth measurement tool
Other
6.99k stars 1.28k forks source link

SCTP number of streams #722

Open pharezende opened 6 years ago

pharezende commented 6 years ago

Dear members,

I installed IPerf version 3.1.3 on two Ubuntu 14.04 VMs. Then, I've executed the following commands.

Client side: iperf3 -c 192.168.0.2 --sctp --nstreams 10

Server side: iperf3 -s

Consequently, the client starts to send sctp traffic to the server. However, after using the tcpdump and wireshark, I realized that the Stream ID [SID] of all packets is always 0. Is this a correct behavior? I believe that the right behavior would be 10 streams being transmitted or 10 streams sharing the same connection. Therefore, 10 different Stream IDs. Am I right?

Thank you,

bmah888 commented 6 years ago

I don't have a lot of familiarity with SCTP. I believe the author of the SCTP support modeled it closely after the existing TCP test support, so it's possible these 10 streams (in the iperf3 sense) are using 10 different connections (in the SCTP sense), not 10 SCTP streams on a single SCTP connection. It sounds like that's different from what you expected it to do?

pharezende commented 6 years ago

I don't think so. If I remember correctly, there is a flag in IPerf called -P that creates simultaneous connection to a server. Moreover, when I use the -nstream flag, only one connection is established. Therefore, I believe the -nstreams flag was made in order to allow multiple streams to share the same connection. I tried to use some other open-source tools; however, none of them support sctp multiple streams. Could you please contact the author of the SCTP and ask him/her if it's possible to allow multiple streams to share the same connection?

Thank you,

bmah888 commented 6 years ago

OK, I understand your comment regarding --nstreams. I need to see if I can find Susant in the GitHub universe, or email if not.

bmah888 commented 6 years ago

@ssahani

information-security commented 4 years ago

I am having a problem when --nstreamsflag is used. client starts to send data then subsequent results show 0 bytes transferred. Removing --nstreams fixes the problem. Is this a normal behavior?

iperf3 -v

iperf 3.7+ (cJSON 1.5.2)
Linux 748ca463048b 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u1 (2019-09-20) x86_64
Optional features available: CPU affinity setting, IPv6 flow label, SCTP, TCP congestion algorithm setting, sendfile / zerocopy, socket pacing, authentication

Server:

iperf3 -s -d

Client:

iperf3 --sctp -c stphost1 --nstreams 2
Connecting to host stphost1, port 5201
[  5] local 172.26.0.3 port 50762 connected to 172.26.0.5 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  64.0 KBytes   524 Kbits/sec
[  5]   1.00-2.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   2.00-3.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   3.00-4.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   4.00-5.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   5.00-6.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   6.00-7.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   7.00-8.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   8.00-9.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   9.00-10.00  sec  0.00 Bytes  0.00 bits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.00  sec  64.0 KBytes  52.4 Kbits/sec                  sender
[  5]   0.00-10.04  sec  64.0 KBytes  52.2 Kbits/sec                  receiver

iperf Done.
bmah888 commented 4 years ago

I confirm this problem exists on the tip of master running on both FreeBSD 11 and CentOS 7.

LaurentDumont commented 4 years ago

I can confirm that I see the same thing with 3.7.3

Any workarounds?

> root@sctp-vm-2:~# iperf3 -c 172.18.4.37 -p5201 -i 1 --sctp -t 60 --nstreams 5 -V
> iperf 3.7
> Linux sctp-vm-2 4.15.0-99-generic #100-Ubuntu SMP Wed Apr 22 20:32:56 UTC 2020 x86_64
> Control connection MSS 8948
> Time: Mon, 01 Jun 2020 18:48:35 GMT
> Connecting to host 172.18.4.37, port 5201
>       Cookie: 47i3buzxeslrjx5yg3ozw76nduzjluh23bfl
>       Target Bitrate: 5
> [  5] local 172.18.4.38 port 60235 connected to 172.18.4.37 port 5201
> Starting Test: protocol: SCTP, 1 streams, 65536 byte blocks, omitting 0 seconds, 60 second test, tos 0
> [ ID] Interval           Transfer     Bitrate
> [  5]   0.00-1.00   sec  64.0 KBytes   524 Kbits/sec                  
> [  5]   1.00-2.00   sec  0.00 Bytes  0.00 bits/sec                  
> [  5]   2.00-3.00   sec  0.00 Bytes  0.00 bits/sec                  
> [  5]   3.00-4.00   sec  0.00 Bytes  0.00 bits/sec                  
> [  5]   4.00-5.00   sec  0.00 Bytes  0.00 bits/sec                  
> [  5]   5.00-6.00   sec  0.00 Bytes  0.00 bits/sec                  
> [  5]   6.00-7.00   sec  0.00 Bytes  0.00 bits/sec                  
> [  5]   7.00-7.28   sec  0.00 Bytes  0.00 bits/sec                  
> - - - - - - - - - - - - - - - - - - - - - - - - -
> Test Complete. Summary Results:
> [ ID] Interval           Transfer     Bitrate
> [  5]   0.00-7.28   sec  64.0 KBytes  72.0 Kbits/sec                  sender
> [  5]   0.00-7.28   sec  0.00 Bytes  0.00 bits/sec                  receiver
> CPU Utilization: local/sender 1.4% (0.6%u/0.8%s), remote/receiver 0.0% (0.0%u/0.0%s)
> iperf3: interrupt - the client has terminated

EDIT: Reformatted for legibility. --bmah.