{"id":13509836,"url":"https://github.com/udhos/goben","last_synced_at":"2025-04-04T13:09:31.247Z","repository":{"id":44207330,"uuid":"120018704","full_name":"udhos/goben","owner":"udhos","description":"goben is a golang tool to measure TCP/UDP transport layer throughput between hosts.","archived":false,"fork":false,"pushed_at":"2024-06-19T01:11:37.000Z","size":116,"stargazers_count":569,"open_issues_count":1,"forks_count":53,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-28T12:04:11.028Z","etag":null,"topics":["bandwidth","benchmarking","go","golang","measure-tcp-throughput","networking","performance-testing","tcp","throughput","tool","udp"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/udhos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-02T18:52:30.000Z","updated_at":"2025-02-28T08:14:20.000Z","dependencies_parsed_at":"2023-12-20T13:25:47.403Z","dependency_job_id":"6fba814e-f304-4b32-80d9-3828c1243ae4","html_url":"https://github.com/udhos/goben","commit_stats":{"total_commits":103,"total_committers":5,"mean_commits":20.6,"dds":0.4077669902912622,"last_synced_commit":"6ebc73167d15369c4cd19e2bc75eabe290af0cae"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udhos%2Fgoben","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udhos%2Fgoben/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udhos%2Fgoben/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udhos%2Fgoben/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/udhos","download_url":"https://codeload.github.com/udhos/goben/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247177868,"owners_count":20896731,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bandwidth","benchmarking","go","golang","measure-tcp-throughput","networking","performance-testing","tcp","throughput","tool","udp"],"created_at":"2024-08-01T02:01:14.013Z","updated_at":"2025-04-04T13:09:31.216Z","avatar_url":"https://github.com/udhos.png","language":"Go","funding_links":[],"categories":["Go","networking"],"sub_categories":[],"readme":"[![license](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/udhos/goben/blob/master/LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/udhos/goben)](https://goreportcard.com/report/github.com/udhos/goben)\n[![Go Reference](https://pkg.go.dev/badge/github.com/udhos/goben.svg)](https://pkg.go.dev/github.com/udhos/goben)\n[![GolangCI](https://golangci.com/badges/github.com/udhos/goben.svg)](https://golangci.com/r/github.com/udhos/goben)\n\n# goben\n\ngoben is a golang tool to measure TCP/UDP transport layer throughput between hosts.\n\n- [goben](#goben)\n- [Features](#features)\n- [History](#history)\n- [Requirements](#requirements)\n- [Install](#install)\n  - [Install with Go Modules (since Go 1.11)](#install-with-go-modules-since-go-111)\n  - [Run directly from source](#run-directly-from-source)\n- [Usage](#usage)\n- [Command-line Options](#command-line-options)\n- [Example](#example)\n- [TLS](#tls)\n\nCreated by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc.go)\n\n# Features\n\n- Support for TCP, UDP, TLS.\n  - TLS can be enforced by disabling TCP and UDP\n- Can limit maximum bandwidth.\n- Written in [Go](https://golang.org/). Single executable file. No runtime dependency.\n- Simple usage: start the server then launch the client pointing to server's address.\n- Spawns multiple concurrent lightweight goroutines to handle multiple parallel traffic streams.\n- Can save test results as PNG chart.\n- Can export test results as YAML or CSV.\n\n# History\n\n- Years ago out of frustration with [iperf2](https://sourceforge.net/projects/iperf2/) limitations, I wrote the [nepim](http://www.nongnu.org/nepim/) tool. One can find some known iperf problems here: [iperf caveats](https://support.cumulusnetworks.com/hc/en-us/articles/216509388-Throughput-Testing-and-Troubleshooting#network_testing_with_open_source_tools). Nepim was more customizable, easier to use, reported simpler to understand results, was lighter on CPU.\n- Later I found another amazing tool called [nuttcp](https://www.nuttcp.net/). One can read about nepim and nuttcp here: [nepim and nuttcp](https://www.linux.com/news/benchmarking-network-performance-network-pipemeter-lmbench-and-nuttcp).\n- [goben](https://github.com/udhos/goben) is intended to fix shortcomings of nepim: (1) Take advantage of multiple CPUs while not wasting processing power. Nepim was single-threaded. (2) Be easily portable to multiple platforms. Nepim was heavily tied to UNIX-like world. (3) Use a simpler synchronous code flow. Nepim used hard-to-follow asynchronous architecture.\n\n# Requirements\n\n- You need a [system with the Go language](https://golang.org/dl/) in order to build the application. There is no special requirement for running it.\n- You can also download a binary release from https://github.com/udhos/goben/releases\n\n# Install\n\n## Install with Go Modules (since Go 1.11)\n\n    git clone https://github.com/udhos/goben ;# clone outside GOPATH\n    cd goben\n    go test -v ./...\n    CGO_ENABLED=0 go install ./cmd/goben\n\n## Run directly from source\n\n    go run ./cmd/goben\n\n# Usage\n\nMake sure ~/go/bin is in your shell PATH and goben has been installed.\n\nStart server:\n\n    server$ goben\n\nStart client:\n\n    client$ goben -hosts 1.1.1.1 ;# 1.1.1.1 is server's address\n\n# Command-line Options\n\nFind several supported command-line switches by running 'goben -h':\n\n```\n$ goben -h\n2021/02/28 00:43:28 goben version 0.6 runtime go1.16 GOMAXPROCS=12 OS=linux arch=amd64\nUsage of goben:\n  -ascii\n        plot ascii chart (default true)\n  -ca string\n        TLS CA file (if server: CA to validate the client cert, if client: CA to validate the server cert) (default \"ca.pem\")\n  -cert string\n        TLS cert file (default \"cert.pem\")\n  -chart string\n        output filename for rendering chart on client\n        '%d' is parallel connection index to host\n        '%s' is hostname:port\n        example: -chart chart-%d-%s.png\n  -connections int\n        number of parallel connections (default 1)\n  -csv string\n        output filename for CSV exporting test results on client\n        '%d' is parallel connection index to host\n        '%s' is hostname:port\n        example: -csv export-%d-%s.csv\n  -defaultPort string\n        default port (default \":8080\")\n  -export string\n        output filename for YAML exporting test results on client\n        '%d' is parallel connection index to host\n        '%s' is hostname:port\n        example: -export export-%d-%s.yaml\n  -hosts value\n        comma-separated list of hosts\n        you may append an optional port to every host: host[:port]\n  -key string\n        TLS key file (default \"key.pem\")\n  -listeners value\n        comma-separated list of listen addresses\n        you may prepend an optional host to every port: [host]:port\n  -localAddr string\n        bind specific local address:port\n        example: -localAddr 127.0.0.1:2000\n  -maxSpeed float\n        bandwidth limit in mbps (0 means unlimited)\n  -passiveClient\n        suppress client writes\n  -passiveServer\n        suppress server writes\n  -reportInterval string\n        periodic report interval\n        unspecified time unit defaults to second (default \"2s\")\n  -tcp\n        set to false to disable TCP (this can be used to test TLS only or UDP only) (default true)\n  -tcpReadSize int\n        TCP read buffer size in bytes (default 1000000)\n  -tcpWriteSize int\n        TCP write buffer size in bytes (default 1000000)\n  -tls\n        set to false to disable TLS (default true)\n  -tlsAuthClient\n        set to true to enable client certificate authentication (check against CA) (default true)\n  -tlsAuthServer\n        set to true to enable server certificate authentication (check against CA) (default true)\n  -totalDuration string\n        test total duration\n        unspecified time unit defaults to second (default \"10s\")\n  -udp\n        run client in UDP mode\n  -udpReadSize int\n        UDP read buffer size in bytes (default 64000)\n  -udpWriteSize int\n        UDP write buffer size in bytes (default 64000)\n```\n\n# Example\n\nServer side:\n\n    $ goben\n    2018/06/28 15:04:26 goben version 0.3 runtime go1.11beta1 GOMAXPROCS=1\n    2018/06/28 15:04:26 connections=1 defaultPort=:8080 listeners=[\":8080\"] hosts=[]\n    2018/06/28 15:04:26 reportInterval=2s totalDuration=10s\n    2018/06/28 15:04:26 server mode (use -hosts to switch to client mode)\n    2018/06/28 15:04:26 serve: spawning TCP listener: :8080\n    2018/06/28 15:04:26 serve: spawning UDP listener: :8080\n\nClient side:\n\n    $ goben -hosts localhost\n    2018/06/28 15:04:28 goben version 0.3 runtime go1.11beta1 GOMAXPROCS=1\n    2018/06/28 15:04:28 connections=1 defaultPort=:8080 listeners=[\":8080\"] hosts=[\"localhost\"]\n    2018/06/28 15:04:28 reportInterval=2s totalDuration=10s\n    2018/06/28 15:04:28 client mode, tcp protocol\n    2018/06/28 15:04:28 open: opening tcp 0/1: localhost:8080\n    2018/06/28 15:04:28 handleConnectionClient: starting 0/1 [::1]:8080\n    2018/06/28 15:04:28 handleConnectionClient: options sent: {2s 10s 50000 50000 false 0}\n    2018/06/28 15:04:28 clientReader: starting: 0/1 [::1]:8080\n    2018/06/28 15:04:28 clientWriter: starting: 0/1 [::1]:8080\n    2018/06/28 15:04:30 0/1  report   clientReader rate:  13917 Mbps  34793 rcv/s\n    2018/06/28 15:04:30 0/1  report   clientWriter rate:  13468 Mbps  33670 snd/s\n    2018/06/28 15:04:32 0/1  report   clientReader rate:  14044 Mbps  35111 rcv/s\n    2018/06/28 15:04:32 0/1  report   clientWriter rate:  13591 Mbps  33978 snd/s\n    2018/06/28 15:04:34 0/1  report   clientReader rate:  12934 Mbps  32337 rcv/s\n    2018/06/28 15:04:34 0/1  report   clientWriter rate:  12517 Mbps  31294 snd/s\n    2018/06/28 15:04:36 0/1  report   clientReader rate:  13307 Mbps  33269 rcv/s\n    2018/06/28 15:04:36 0/1  report   clientWriter rate:  12878 Mbps  32196 snd/s\n    2018/06/28 15:04:38 0/1  report   clientWriter rate:  13330 Mbps  33325 snd/s\n    2018/06/28 15:04:38 0/1  report   clientReader rate:  13774 Mbps  34436 rcv/s\n    2018/06/28 15:04:38 handleConnectionClient: 10s timer\n    2018/06/28 15:04:38 workLoop: 0/1 clientWriter: write tcp [::1]:42130-\u003e[::1]:8080: use of closed network connection\n    2018/06/28 15:04:38 0/1 average   clientWriter rate:  13157 Mbps  32892 snd/s\n    2018/06/28 15:04:38 clientWriter: exiting: 0/1 [::1]:8080\n    2018/06/28 15:04:38 workLoop: 0/1 clientReader: read tcp [::1]:42130-\u003e[::1]:8080: use of closed network connection\n    2018/06/28 15:04:38 0/1 average   clientReader rate:  13595 Mbps  33989 rcv/s\n    2018/06/28 15:04:38 clientReader: exiting: 0/1 [::1]:8080\n    2018/06/28 15:04:38 input:\n     14038 ┤          ╭────╮\n     13939 ┤──────────╯    ╰╮\n     13840 ┼                ╰─╮\n     13741 ┤                  ╰╮                                    ╭──\n     13641 ┤                   ╰╮                               ╭───╯\n     13542 ┤                    ╰─╮                          ╭──╯\n     13443 ┤                      ╰╮                     ╭───╯\n     13344 ┤                       ╰─╮               ╭───╯\n     13245 ┤                         ╰╮          ╭───╯\n     13146 ┤                          ╰─╮    ╭───╯\n     13047 ┤                            ╰────╯\n     12948 ┤\n    2018/06/28 15:04:38 output:\n     13585 ┤          ╭────╮\n     13489 ┤──────────╯    ╰╮\n     13393 ┼                ╰─╮\n     13297 ┤                  ╰╮                                    ╭──\n     13201 ┤                   ╰╮                               ╭───╯\n     13105 ┤                    ╰─╮                          ╭──╯\n     13009 ┤                      ╰╮                     ╭───╯\n     12914 ┤                       ╰─╮               ╭───╯\n     12818 ┤                         ╰╮          ╭───╯\n     12722 ┤                          ╰─╮    ╭───╯\n     12626 ┤                            ╰────╯\n     12530 ┤\n    2018/06/28 15:04:38 handleConnectionClient: closing: 0/1 [::1]:8080\n\n# TLS\n\nFor full a TLS setup please generate (all in PEM format):\n- a self-signed CA (specify -CA CLI option on server and client)\n  - you can have separate server and client CAs, for testing this is the same\n- a server certificate and key (specify -cert and -key CLI options)\n- a client certificate and key (specify -cert and -key CLI options)\n\nYou can use the minimal setup in the \"certs\" make target or look at the folder test/certs\nfor a simple local testing setup that might be adapted for all kinds of use cases.\n\n--x--\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fudhos%2Fgoben","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fudhos%2Fgoben","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fudhos%2Fgoben/lists"}