Coder Social home page Coder Social logo

ethr's Issues

Bandwidth tests for buffer size/packet size

What's the behavior supposed to be for the buffer parameter on a bandwidth test?
I've been taking tcpdumps thinking that it would increase the actual packet size but that doesnt seem to be the case. My test looks like

ethr -c ethr-server -t b -i 1 -l 40mb -d 5s
ethr -c ethr-server -t b -i 1 -l 2gb -d 5s

The packet length ramps up from 64 to 22848 and never changes based on what buffer size I give it. I saw an issue that was closed #16. I'm curious as to how one would go about crafting a packet size or what the buffer size is doing. If there is no way to do this, would you guys be open to PRs implementing that functionality? Thanks

Error: could not get network stats

Hello.
The latest version built from f0074ae shows errors when launched as server:
could not get network stats
And also statistics section is empty when launched in UI mode.
Tested on Ubuntu 18.04

Export metrics

Any plans to support exporting the metrics to Prometheus ?

Would allow this to be deployed to servers to track network stats over time. Quite useful.

Reverse Mode

There is some way to a client to send packets to a server instead server to client?

In a simpler way, there a way to a client do upload, instead of download?

Thanks!

vs. iperf?

How does this compare to the "standard", meaning iperf3?
May i suggest you add a few words about that to the README? This isn't about which is better, it's more about how is this different.

Support for HTTP requests/s

This needs work to do HTTP requests from multiple threads to see how many requests/s it can push. This would be useful for testing performance of middle boxes like firewalls, proxies etc.

Specify packet size

Hi

It is very useful to test bandwidth on different packet sizes. So it will be best to have special option for that.

Also, as idea: auto-test bandwidth with different packet sizes: 64, 128, 256...1500 or even jumbo frames.

IP version output to display (server side)

Hello!

IP version output to display, when server side is in use. E.g.:

./ethr -4 -s
Accepting IP version: ipv4
Listening on 9999 for TCP bandwidth tests
Listening on 9998 for TCP conn/s tests
Listening on 9996 for TCP latency tests
Listening on 9899 for HTTP bandwidth tests
Listening on 9799 for HTTPS bandwidth tests
Listening on 8888 for control plane
./ethr -6 -s
Accepting IP version: ipv6
Listening on 9999 for TCP bandwidth tests
Listening on 9998 for TCP conn/s tests
Listening on 9996 for TCP latency tests
Listening on 9899 for HTTP bandwidth tests
Listening on 9799 for HTTPS bandwidth tests
Listening on 8888 for control plane
./ethr -4 -6 -s
Accepting IP version: ipv4, ipv6
Listening on 9999 for TCP bandwidth tests
Listening on 9998 for TCP conn/s tests
Listening on 9996 for TCP latency tests
Listening on 9899 for HTTP bandwidth tests
Listening on 9799 for HTTPS bandwidth tests
Listening on 8888 for control plane
./ethr -s
Accepting IP version: ipv4, ipv6
Listening on 9999 for TCP bandwidth tests
Listening on 9998 for TCP conn/s tests
Listening on 9996 for TCP latency tests
Listening on 9899 for HTTP bandwidth tests
Listening on 9799 for HTTPS bandwidth tests
Listening on 8888 for control plane

Can be useful for dropping specified packets from client side. Personally, after some tests I have 0.5 ratio of initial connections due to multiple TCP6 CLOSE_WAIT connections (12 hours) in ss -tunlp output.

Modularize code for various protocols

The code needs to be modularized to have interface for protocols and handlers for running Bandwidth/Latency/CPS/PPS tests for those protocols. Right now the code is not using clean abstractions.

For example, we should have something like:
type ethrProto interface{
func runBandwidthTest(param…)
func runLatencyTest(param…)
}

type ethrProtoTcp struct {
}

func (p *ethrProtoTcp) runBandwidth(param…) {
}

Consider lower-casing repository

For case-sensitive file systems, having the name title-cased can have some unexpected effects. For example currently, if Ethr is installed with go install github.com/Microsoft/Ethr the resulting binary is named Ethr, so examples refering to executing ethr don't work. Tab-completing from e also won't work, of course.

ubuntu build failed

in my ubuntu

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.5 LTS
Release:	16.04
Codename:	xenial

go version

go version go1.6.2 linux/amd64

and I want to build Ethr

➜  Ethr git:(master) go build
# github.com/Microsoft/Ethr
./client.go:326: undefined: sort.SliceStable
./server.go:334: undefined: sort.SliceStable
./stats.go:34: undefined: sort.SliceStable
./utils.go:224: undefined: syscall.RawConn
./utils.go:228: ct.SyscallConn undefined (type *net.TCPConn has no field or method SyscallConn)
➜  Ethr git:(master)

As we can see,sort.SliceStable is not supported by go version 1.6.2, it is supported until go1.8. So, It will be better if you can add some guidance about go version or other which is supported by Ethr

Client error when testing more than one instance with same server

Clients : Android 8 / Android 9 Pie
Server : Ubuntu Server 18.04

Compiled from latest commit : 65627a0

Steps to reproduce:

Start the server
Initialize the first client with ethr -c IP -p udp
Initialize the second client with ethr -c IP -p -r udp

second client will print this output:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x23a5e4]

goroutine 1 [running]:
main.establishSession(0x100000001, 0x3e8000000001, 0x1000003e8, 0x4420010890, 0xf, 0x44200b6070, 0x34f4c0, 0x442005fb10)
/root/go/src/ethr/client.go:74 +0x4a4
main.runClient(0x100000001, 0x3e8000000001, 0x1000003e8, 0x2540be400, 0x0, 0x7fc9bfa873, 0xd)
/root/go/src/ethr/client.go:28 +0xc0
main.main()
/root/go/src/ethr/ethr.go:374 +0x708

Then the server will be waiting forever for the UDP packets.

One more thing, when client sends the UDP packets, it will fill the pipe , in my case client tried to send 1Gbit of data in one try.

MacOS Support - go build fails (779d5c1)

MacOS(Mojave)10.14.1 (18B75)
go1.11.2 darwin/amd64 (homebrew)
ITerm2 Build 3.2.6

$ go build
./serverui.go:88:2: undefined: hideCursor
./serverui.go:89:2: undefined: blockWindowResize
./stats.go:33:2: undefined: getNetDevStats
./stats.go:37:2: undefined: getTcpStats

Socket connection leak

Environment

Ethr version v0.1

  • Linux 4.14.81-coreos Container Linux by CoreOS 1911.4.0 Rhyolite Container Linux by CoreOS 1911.4.0 (Rhyolite)
  • Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz GenuineIntel GNU/Linux

What happend ?

Network performance degraded after socket reached CPU core limit. User have to restart server process to have normal performance data.

The connections will stuck at CLOSE_WAIT state after each test ran. This will reduce almost half the bandwidth, which in our case, bandwidth have gone done from 8 GBit/s to 5 GBit/s

Output of netstat -noa

tcp6	   0	  0 :::9999                 :::*                    LISTEN	117950/./ethr
tcp6  2861521	   0 10.33.3.25:9999         10.33.3.23:53702        CLOSE_WAIT  117950/./ethr
tcp6  2528001      0 10.33.3.25:9999         10.33.3.23:53762        CLOSE_WAIT  117950/./ethr
tcp6  2846801	   0 10.33.3.25:9999         10.33.3.23:53644        CLOSE_WAIT  117950/./ethr

How to reproduce

  1. Start server with ethr -s
  2. Watch network connection with watch 'netstat -noa | grep 9999'
  3. Start client connection with ethr -c <ip_address>, and repeat this multiple times, you should see the result after it reaches CPU core count on the server machine.

Enhance external mode TCP ping support

  • Better goroutine synchronization for exit tracking
  • Code cleanup for handling of warmup run
  • Support for custom number of warmup connections
  • Support for custom sleep between successive connections
  • Option to select -4 or -6 to force IP version
  • Logging the results in json format

Export metrics

Any plans to support exporting the metrics to Prometheus ?

Would allow this to be deployed to servers to track network stats over time. Quite useful.

Final summary on server and client sides

Hello!

It'll be useful to have final, extended, summary on server and client sides instead of current brief.

E.g. for ethr -s :

Ending Bandwidth test from <client_IP>
Min: %min_value
Max: %max_value
Avg: %avg_value
Dur: %duration

E.g. for ethr -c <server_IP>:

Ethr done.
Min: %min_value
Max: %max_value
Avg: %avg_value
Dur: %duration

Doable?

Thanks!

Results on Mac differ greatly from results on Linux on the same network, Mac results are 20x higher than expected.

I am running a UDP bandwidth test on two devices on my network, testing speed to an external server I have set up.

My internet connection is pretty stable at ~300Mb/s and I'm on wireless so the Linux results seem accurate, the Mac OS results are pretty far off though.

This is the command I am running.
ethr -c {external} -t b -p udp -l 8kb

These are the results.
Ubuntu 19.10:

[ ID]   Protocol    Interval      Bits/s
[  6]     UDP      000-001 sec   217.98M
[  6]     UDP      001-002 sec   223.49M
[  6]     UDP      002-003 sec   234.50M
[  6]     UDP      003-004 sec   241.34M
[  6]     UDP      004-005 sec   239.42M
[  6]     UDP      005-006 sec   235.07M
[  6]     UDP      006-007 sec   239.17M
[  6]     UDP      007-008 sec   219.14M
[  6]     UDP      008-009 sec   222.78M
[  6]     UDP      009-010 sec   220.67M

Mac OS 10.14.6:

[ ID]   Protocol    Interval      Bits/s
[ 12]     UDP      000-001 sec     5.62G
[ 12]     UDP      001-002 sec     5.99G
[ 12]     UDP      002-003 sec     6.01G
[ 12]     UDP      003-004 sec     6.12G
[ 12]     UDP      004-005 sec     6.09G
[ 12]     UDP      005-006 sec     6.16G
[ 12]     UDP      006-007 sec     6.13G
[ 12]     UDP      007-008 sec     6.12G
[ 12]     UDP      008-009 sec     6.15G

Bad error message when bad duration passed in

When I try the client, I find it raises a bad error message when I pass in a bad duration for -d option, e.g. ./Ethr -c 10.29.96.153 -d 10.

And the error message is Invalid value "%!s(*string=0xc000097cc0)" specified for parameter "-d".

UDP performance on server side

Hi.
I am running a UDP network performance test with ethr.
The client reports sending speed, but the server reports only 0 bits/s. Why is that?

UDP/TCP ports 4200-4300 are open, so the traffic should pass. The same experiment with HTTP works well.

I need to know the speed of receiving,

Server

ethr -s -ports control=4287,tcp=4299,udp=4201,http=4289,https=4288

[RemoteAddress]  Proto   Bits/s   Conn/s    Pkt/s   Latency 
[**.**.***.***]    UDP        0
[**.**.***.***]    UDP        0
[**.**.***.***]    UDP        0
[**.**.***.***]    UDP        0
[**.**.***.***]    UDP        0
[**.**.***.***]    UDP        0
[**.**.***.***]    UDP        0
[**.**.***.***]    UDP        0
[**.**.***.***]    UDP        0
[**.**.***.***]    UDP        0
Ending Bandwidth test from **.**.***.***

Client

ethr -c IP -n 1 -p udp -t b -ports control=4287,tcp=4299,udp=4201,http=4289,https=4288 -l 64KB

[ ID]   Protocol    Interval      Bits/s
[  6]     UDP      000-001 sec     1.90G
[  6]     UDP      001-002 sec     1.89G
[  6]     UDP      002-003 sec     1.89G
[  6]     UDP      003-004 sec     1.89G
[  6]     UDP      004-005 sec     1.89G
[  6]     UDP      005-006 sec     1.89G
[  6]     UDP      006-007 sec     1.89G
[  6]     UDP      007-008 sec     1.89G
[  6]     UDP      008-009 sec     1.89G
[  6]     UDP      009-010 sec     1.89G

centos6.5 ethr error

CentOS release 6.5 (Final)

[root@node172 ethr]# ./ethr -s
Listening on 9999 for TCP bandwidth tests
Listening on 9998 for TCP conn/s tests
Listening on 9996 for TCP latency tests
Listening on 9899 for HTTP bandwidth tests
Listening on 9799 for HTTPS bandwidth tests
Listening on 9896 for HTTP latency tests
Listening on 8888 for control plane
panic: runtime error: slice bounds out of range

goroutine 88 [running]:
github.com/microsoft/ethr/internal/stats.buildNetDevStat(0xc0012c4180, 0x7f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/opt/sumscope/ethr/internal/stats/linux.go:84 +0x3f8
github.com/microsoft/ethr/internal/stats.osStats.GetNetDevStats(0x0, 0x0, 0x0, 0x0, 0x0)
/opt/sumscope/ethr/internal/stats/linux.go:60 +0x302
main.getNetworkStats(0xa7b100, 0x50f7a5cd, 0xa5e5a0, 0x50ed975a, 0x0, 0x0)
/opt/sumscope/ethr/stats.go:19 +0x3f
main.emitStats()
/opt/sumscope/ethr/stats.go:115 +0x133
main.startStatsTimer.func1(0xc000fc6500)
/opt/sumscope/ethr/stats.go:86 +0x3b
created by main.startStatsTimer
/opt/sumscope/ethr/stats.go:82 +0x66

[root@node172 ethr]# ./ethr -c "172.16.73.153"
Connecting to host [172.16.73.153], port 9999
[ 6] local 172.16.75.172 port 48967 connected to 172.16.73.153 port 9999


[ ID] Protocol Interval Bits/s
[ 6] TCP 000-001 sec 701.18M
panic: runtime error: slice bounds out of range

goroutine 1341 [running]:
github.com/microsoft/ethr/internal/stats.buildNetDevStat(0xc000f70280, 0x7f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000045e30, 0x6)
/opt/sumscope/ethr/internal/stats/linux.go:84 +0x3f8
github.com/microsoft/ethr/internal/stats.osStats.GetNetDevStats(0x0, 0x0, 0x0, 0x0, 0x0)
/opt/sumscope/ethr/internal/stats/linux.go:60 +0x302
main.getNetworkStats(0xa7b100, 0x5fb9733c, 0xa5e5a0, 0x5faf3302, 0x0, 0x0)
/opt/sumscope/ethr/stats.go:19 +0x3f
main.emitStats()
/opt/sumscope/ethr/stats.go:115 +0x133
main.startStatsTimer.func1(0xc000f56140)
/opt/sumscope/ethr/stats.go:86 +0x3b
created by main.startStatsTimer
/opt/sumscope/ethr/stats.go:82 +0x66

TCP Latency test are not supported for external client mode

I'm getting the following error when trying to execute a tcp latency test

root@myserver:~# ethr -6 -c haproxy:9999 -m x -t l -n 25
Error: "Latency" test for "TCP" is not supported.

Please use "ethr -h" for ethr command line arguments.

According to the status, it says that latency tests are supported

Suggestion about using cobra cli

Now it has just simple cli arguments, how about using a modern cli command such as cobra for the future
If you want to build only pure golang without additional libraries or external dependencies, you can ignore this suggestion.

Use golang log module

Shouldnt we use golang log module in order to have better logs, so we can see line number and file of message?

openSUSE Leap 15 (server) + Ubuntu 18.04 and Win 7 (clients)

Hello!

README.md can be updated -- have successfully tested on openSUSE Leap 15 (as a server) + Ubuntu 18.04 and Windows 7 SP 1 ( as the clients).

Binaries were downloaded from links of Download section.

Here left is openSUSE Leap 15 machine and Ubuntu 18.04 on the right hand.
imag1288

Ubuntu 18.04 + Windows 7 SP 1 (from virtual machine).
imag1289

Thanks!

Is UDP bandwidth test supported?

Thanks for making this great tool. I am using this to test some UDP traffic. This is not exactlly an issue, just want to get some confirmations. It is marked in the status that UDP bandwidth is YES(I believe this indicates that UDP bandwidth test is supported). But UDP bandwidth is also mentioned in the TODO list. I want to use this bandwidth test feature for UDP. Can someone please help clarify if this is supported or not?

  • Support for UDP bandwidth & latency testing
Protocol Bandwidth Connections/s Packets/s Latency
TCP Yes Yes No Yes
UDP Yes NA Yes No

Add support for HTTP latency testing

This would be useful for testing performance of middle boxes like firewalls, proxies etc. This should be similar to TCP latency tests that measure request/response latency.

-4 and -6 parameters are unrecognizable by ethr

Hello!

Subj.

Despite on -4 and -6 parameters, described in README.md file in Common Parameters paragraph, they are unrecognizable by ethr and are not displayed in help-info on -h key and when ethr is given without parameters.

Use-cases I've tested on: ./ethr -4 - s and ./ethr -4 -c <server_IP_to_connect_to>. Both of them return ethr's help-info.

Thanks!

Suggestion about main package split, add test code.

Hello ! I like this project.

I want to contribute this project.

but it is difficult.

I think ethr has big main package.

Further, ethr doesn't have test code.

I think open source project should have test code.

Test code makes it easy to contribute and makes it guessing that main intending of project. then contributer can proper pull request.

And I think It can be split logger, server, client, ui, util, etc package.

Build Failure

after a fresh git clone
doing go build fails with the following error

./serverui.go:89:2: undefined: hideCursor
./serverui.go:90:2: undefined: blockWindowResize
./stats.go:33:2: undefined: getNetDevStats
./stats.go:37:2: undefined: getTcpStats

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.