nitred / nr-wg-mtu-finder

MIT License
202 stars 22 forks source link

Heatmap axis labels are switched #5

Closed ahasbini closed 2 years ago

ahasbini commented 2 years ago

I have noticed that the heatmap axis labels are switched. Below is a sample csv and the output to display the problem. The server_mtu has 6 unique values while the peer_mtu has 5 unique values, also notice how for peer_mtu with values 1344 or above, all the other values are zero. I run nr-wg-mtu-finder-heatmap with python 3.8.

test.csv ``` server_mtu,peer_mtu,upload_rcv_mbps,upload_send_mbps,download_rcv_mbps,download_send_mbps 1338,1340,23.132,26.660,57.982,62.527 1338,1342,26.128,30.752,84.865,87.816 1338,1344,-0.000,-0.000,-0.000,-0.000 1338,1346,-0.000,-0.000,-0.000,-0.000 1338,1348,-0.000,-0.000,-0.000,-0.000 1340,1340,7.801,8.612,132.957,135.526 1340,1342,20.172,22.336,80.007,83.921 1340,1344,-0.000,-0.000,-0.000,-0.000 1340,1346,-0.000,-0.000,-0.000,-0.000 1340,1348,-0.000,-0.000,-0.000,-0.000 1342,1340,31.644,37.495,82.163,86.490 1342,1342,31.921,35.552,19.744,23.105 1342,1344,-0.000,-0.000,-0.000,-0.000 1342,1346,-0.000,-0.000,-0.000,-0.000 1342,1348,-0.000,-0.000,-0.000,-0.000 1344,1340,32.209,36.403,87.962,91.913 1344,1342,31.921,36.288,103.915,107.012 1344,1344,-0.000,-0.000,-0.000,-0.000 1344,1346,-0.000,-0.000,-0.000,-0.000 1344,1348,-0.000,-0.000,-0.000,-0.000 1346,1340,26.323,28.322,103.019,105.145 1346,1342,29.059,34.291,99.724,103.726 1346,1344,-0.000,-0.000,-0.000,-0.000 1346,1346,-0.000,-0.000,-0.000,-0.000 1346,1348,-0.000,-0.000,-0.000,-0.000 1348,1340,12.785,14.714,128.167,130.513 1348,1342,29.327,33.639,117.760,119.926 1348,1344,-0.000,-0.000,-0.000,-0.000 1348,1346,-0.000,-0.000,-0.000,-0.000 1348,1348,-0.000,-0.000,-0.000,-0.000 ```

test.png:

Would be happy to create a PR for this. Thanks!

nitred commented 2 years ago

This is a pretty serious bug because it leads to the wrong conlcusions about finding out where the problem is. Thank you for reporting it!

By all means, you're welcome to send a PR. Please make your changes as simple as possible. Since the project runs root commands, I will reject PRs that are overly complicated.

nitred commented 2 years ago

I will also dig a little deeper about why some Peer MTU shows zeroes for the bandwidth. It's possible that particular Peer MTU had some connectivity or timeout issues which injects null/zero values. The --peer-skip-errors flag is set to True by default. If this is what happened, then if you still have access to your logs, you should be able to find a log message that says an error ocurred but is being skipped.

ahasbini commented 2 years ago

I will also dig a little deeper about why some Peer MTU shows zeroes for the bandwidth.

Yeah I felt something off with iperf3 being unable to connect for some weird reason, definitely something about it picking up MTU because I was surprised that lower MTU values worked, before that at one point I thought something is wrong on the server when I was testing bandwidth and eventually gave up. I haven't given it much time looking into it again.

If this is what happened, then if you still have access to your logs, you should be able to find a log message that says an error ocurred but is being skipped.

Here's the error, weird right?

error - unable to connect to server: Connection refused
nitred commented 2 years ago

Fixed in #6 by @ahasbini and I've released nr-wg-mtu-finder==0.2.1 with the fix