Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client.run hangs when client.duration over 130 seconds #53

Open
nick0333 opened this issue Mar 12, 2020 · 6 comments
Open

client.run hangs when client.duration over 130 seconds #53

nick0333 opened this issue Mar 12, 2020 · 6 comments

Comments

@nick0333
Copy link

Anyone know if there is any fix or workaround on this (other than running in a loop heh)?

I am encountering same issue on rhel7 and Ubuntu 16.04. When i use iperf3 module with python3 it hangs for interval > 130...

When I run iperf3 tool itself command line it works just fine with long test duration.

Details below. Any insight appreciated, thanks! :)

(iperf3env) # python3
Python 3.6.8 (default, Jun 11 2019, 15:15:01)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.

import iperf3
client = iperf3.Client()
client.duration = 10
client.server_hostname = '10.0.0.2'
client.bandwidth = 50000000
result = client.run()
result.sent_Mbps
49.561612938104
del client
client = iperf3.Client()
client.duration = 131
client.server_hostname = '10.0.0.2'
client.bandwidth = 50000000
result = client.run()
^CTraceback (most recent call last):
File "", line 1, in
File "/home/nick/iperf3env/lib/python3.6/site-packages/iperf3/iperf3.py", line 616, in run
error = self.lib.iperf_run_client(self._test)
KeyboardInterrupt
quit()
(iperf3env) #

(iperf3env) # iperf3 -c 10.0.0.2 -b 50000000 -t 180
Connecting to host 10.0.0.2, port 5201
[ 4] local 10.0.0.1 port 38590 connected to 10.0.0.2 port 5201
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 4] 0.00-1.00 sec 5.46 MBytes 45.8 Mbits/sec 29 417 KBytes
[ 4] 1.00-2.00 sec 5.88 MBytes 49.3 Mbits/sec 0 427 KBytes
[ 4] 2.00-3.00 sec 6.00 MBytes 50.3 Mbits/sec 0 436 KBytes
...
[ 4] 177.00-178.00 sec 6.00 MBytes 50.3 Mbits/sec 0 622 KBytes
[ 4] 178.00-179.00 sec 5.88 MBytes 49.3 Mbits/sec 0 625 KBytes
[ 4] 179.00-180.00 sec 6.00 MBytes 50.3 Mbits/sec 0 625 KBytes

[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-180.00 sec 1.05 GBytes 50.0 Mbits/sec 82 sender
[ 4] 0.00-180.00 sec 1.05 GBytes 50.0 Mbits/sec receiver

iperf Done.
(iperf3env) #

@Oposum01
Copy link

Oposum01 commented Jun 9, 2020

@nick0333 have you found a workaround meanwhile? I've got the same problem, but actually only 30 seconds test duration is working for me, when using 4 parallel streams.

@qarlosalberto
Copy link

I have the same problem, any solution?

@hccresende
Copy link

I also have the same problem. Does anyone have a solution?

@Shaun-3adesign
Copy link

Shaun-3adesign commented Jan 16, 2024

seeing same issue here.

tested with iperf 3.1.3 and 3.9 and 3.14

this call just never returns error = self.lib.iperf_run_client(self._test)

seen issues with 120 and above thou 3.1.3 did seem to work with 131 but all fail with 300

testing with iperf directly works as expected

@AngelobRSA
Copy link

I ended up just using iperf with subprocess , hacky but it worked .

@Shaun-3adesign
Copy link

Shaun-3adesign commented Feb 8, 2024

@AngelobRSA I did the same thing initially but had some issues.

I've now done more digging and it fails trying to write the response to the output which I believe is pointed at stdout, the is in libiperf itself.

I have managed to get this wrapper working, thou I have had to modify it.

so I added the setter for log_file and set a log file before running the test, currently I've tested 10, 120, 300, 100 and 7200 seconds all appear to work fine.

I'll look at doing a pull request.

I've raised an issue with iperf esnet/iperf#1648

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants