core icon indicating copy to clipboard operation
core copied to clipboard

Network Benchmarks Always Reporting 0B/s

Open king-jam opened this issue 6 years ago • 5 comments

Components version

v0.4.8-7f2f38bf

Describe the bug net-bandwidth always reports zero

Step to reproduce Run benchmarks, bandwidth results will not connect to the server IP with iperf. Also went to Source to manually run the command without success. Did so with and without firewalls running.

Expected behavior Benchmarks to run and report near ISP bandwidth.

Screenshots and/or terminal logs N/A

Platform (please complete the following information):

  • Ubuntu 16.04
  • amd64
Network:
  Incoming: false
  Overlay:  true
  In:       0B/s
  Out:      0B/s
  Benchmarks:
    net-download: 0
    net-upload: 

king-jam avatar Aug 15 '18 10:08 king-jam

Seems like neither connection failed error occurred nor something else, but it still failed. Can you do iperf -c 138.68.91.1 --tradeoff --format k --reportstyle C --time 15s and paste here the output?

3Hren avatar Aug 16 '18 21:08 3Hren

root@localhost:~# iperf -c 138.68.91.1 --tradeoff --format k --reportstyle C --time 15s
connect failed: Connection timed out

king-jam avatar Aug 16 '18 22:08 king-jam

I've tried both from home and via a server in AWS, I can't get a connection to work outbound. All firewalls and security off, etc.

king-jam avatar Aug 17 '18 22:08 king-jam

Suspect the service just died on the IP. I resolved it by changing the target IP. You should consider hardcoding a DNS entry and doing a DNS lookup for the IP. Then you can change the location of iperf servers or even DNS load balance.

  1. Downloaded this folder Source
  2. Changed the SERVER variable in the script to a local network machine running iperf -s
  3. Built the container from scratch locally and pushed to my own Dockerhub.
  4. Changed the sonm-worker.yml to use a local file for benchmarks Reference
  5. Changed the benchmark list List to point the net-download and net-upload tests to my own container.

FYI, the security of that benchmark is pretty bad. I could easily hardcode my network speeds that I want reported into a local container and advertise anything I wanted.

king-jam avatar Aug 18 '18 01:08 king-jam

Hello, @king-jam! The iperf-based benchmark is no longer used for network measurement. The image referenced in the benchmarks list has been built from this sources and yes, it just a speedtest.

Yeah, we must fix the naming and drop old containers sources from the repo. :(

Can you run single benchmark by hand and show us the results?

docker run -it --rm sonm/net-bandwidth@sha256:e51c367c5ad56c9ea1dbe1497b4acc7d0839be0832d8b77986b931eedc766fc2

nikonov1101 avatar Aug 18 '18 11:08 nikonov1101