esnet / iperf

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

-M has no effect on packet size during data packets initiated from iperf3 client #1771

Open avijeet-pattanayak opened 3 days ago

avijeet-pattanayak commented 3 days ago

NOTE: The iperf3 issue tracker is for registering bugs, enhancement requests, or submissions of code. It is not a means for asking questions about building or using iperf3. Those are best directed towards the Discussions section for this project at https://github.com/esnet/iperf/discussions or to the iperf3 mailing list at iperf-dev@googlegroups.com. A list of frequently-asked questions regarding iperf3 can be found at http://software.es.net/iperf/faq.html.

Context

In iperf3 application though the MSS is negotiated based on -M option during TCP SYN, but the data packets generated by iperf3 client are much bigger in size. Looks like it is not honoring the -M option to set MSS

Please fill out one of the "Bug Report" or "Enhancement Request" sections, as appropriate. Note that submissions of bug fixes, new features, etc. should be done as a pull request at https://github.com/esnet/iperf/pulls

Bug Report

Enhancement Request

davidBar-On commented 3 days ago

iperf3 version 3.5

iperf3.5 is a very old version. Suggest to use a new version (although per issue #779 probably it will not help this specific issue).

In iperf3 application though the MSS is negotiated based on -M option during TCP SYN, but the data packets generated by iperf3 client are much bigger in size. Looks like it is not honoring the -M option to set MSS

Just to make sure, are you referring to the packet size or segment size? iperf3 packet (message) size is set by the -l option.

In any case, more information is needed (see #779 for example): which Linux OS and version the server and the client machines using, are you looking on the client or server size to see the segment size? Which tool are you using for that (Wireshark, tcpdump, etc.), etc.

avijeet-pattanayak commented 3 days ago

Can you please recommend the latest version of iperf3 which can be used in this case. I am referring here the TCP segment size which we set through -M option with iperf3 command. And I am using wireshark packet analyzer tool to get the packet details. We are using RHEL 6 OS.

davidBar-On commented 3 days ago

In general, the using the latest iperf3 version, currently 3.17.1, is the best choice. See http://software.es.net/iperf/index.html. If you are able to build iperf3, than you can use the tar file from that site, or git clone -b 3.17.1 https://github.com/esnet/iperf (or even close the latest master branch).

Per this RedHat issue from June, it may be that setting MSS does not work in RHEL, as least in specific configurations. If you are building iperf3 yourself, I suggest that you will add the getsockopt() after this setsockopt() (in iperf_tcp.c) as in this issue, and print the value of the MSS before and after the change, to see its value and whether it was changed.

Also, this may be related to NIC offload functionality (LSO/TSO/etc.) - see related comments in #779.