iperf icon indicating copy to clipboard operation
iperf copied to clipboard

Cannot use more than 128 parallel streams

Open sregister opened this issue 2 months ago • 3 comments

I have a use case that calls for generating more than 128 streams of traffic, currently it appears values beyond -P 128 are not supported.

Is there any reason why this can't be increased? Would you be open to a PR that bumps this to say 256?

sregister avatar Sep 24 '26 19:09 sregister

Agreed, it's strange to have an upper bound on CPU cores like this

ssalin2 avatar Sep 24 '26 19:09 ssalin2

Submitted PR #2084 that practically allows unlimited number of parallel streams. This is by replacing select() with poll().

As the above PR is not very simple, I am not sure if or when it will be merged into the main branch. A much simpler PR may be to just change MAX_STREAMS value from 128 to 256 or 512. However, that may be an issue for public servers, so such PR should also include setting the maximum number of parallel streams the server support with default of 128 (as I did in the above PR).

davidBar-On avatar Oct 01 '26 17:10 davidBar-On

iperf3 has some upper limits on some parameters to make it harder for users to do something potentially unwise. Other UNIX tools do that as well. One of the nice things about Open Source Software is you can just download the source code, modify or remove the upper limit, recompile, and go on your merry way. It's definitely true that iperf3 has evolved (as has the Internet and connected hosts) since that code was originally written, so there might be a reason to revisit some of this program logic, but that's the reasoning for the current state of the code.

bmah888 avatar Oct 09 '26 15:10 bmah888