Skip to content
Benchmark test of gnet
Go Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
evio-echo-server
eviop-echo-server
fasthttp-server
gev-echo-server
gnet-echo-server
gnet-http-server
gnet_examples
net-echo-server
net-http-server
results
LICENSE
README.md
analyze.go
bench-echo.sh
bench-http.sh
bench.sh
go.mod
go.sum

README.md

gnet benchmark tools

Required tools:

Required Go packages:

go get gonum.org/v1/plot/...
go get -u github.com/valyala/fasthttp

And of course Go is required.

Run bench.sh for all benchmarks.

Notes

  • The current results were run on both Linux and FreeBSD.
  • The servers started in multiple-threaded mode (GOMAXPROCS=Default).
  • Network clients connected over Ipv4 localhost.

Like all benchmarks ever made in the history of whatever, YMMV. Please tweak and run in your environment and let me know if you see any glaring issues.

Benchmark Test

On Linux (epoll)

Test Environment

# Machine information
        OS : Ubuntu 18.04/x86_64
       CPU : 8 Virtual CPUs
    Memory : 16.0 GiB

# Go version and configurations
Go Version : go1.12.9 linux/amd64
GOMAXPROCS=8

Contrast of the similar networking libraries:

Echo Server

HTTP Server

On FreeBSD (kqueue)

Test Environment

# Machine information
        OS : macOS Mojave 10.14.6/x86_64
       CPU : 4 CPUs
    Memory : 8.0 GiB

# Go version and configurations
Go Version : go version go1.12.9 darwin/amd64
GOMAXPROCS=4

Echo Server

HTTP Server

You can’t perform that action at this time.