yggvault ratatoskr-space connected via regular web
Color theme
also available via yggdrasil mesh http://[203:b338:2a84:a18f:986:47ae:1a4:d8d3]/pkg/gnet/v2.3.0
vault / gnet / v2.3.0

gnet @ v2.3.0

integrity

size
170.1 KiB
downloaded
last checked
overlays
go
detected
go module github.com/panjf2000/gnet/v2
source https://github.com/panjf2000/gnet · available · github

release notes

p2635052547

[!TIP] GC latency caused by a mass of connections is about to be significantly reduced in this release.

🚀 Features

🛩 Enhancements

🐛 Bugfixes

📚 Documentation

🧳 Misc

❇️ Notices

The two major updates in this release are #460 and #461.

We introduced a new data structure matrix in #460 to displace the default map for managing connections internally, with the help of this new data structure, we can eliminate the pointers in map and store connections in the form of a matrix (an array of slices), which will significantly reduce GC (Garbage Collection) latency:

goos: darwin
goarch: arm64
pkg: github.com/panjf2000/gnet/v2
                                    │     old      │                 new                  │
                                    │    sec/op    │    sec/op     vs base                │
GC4El100k/Run-4-eventloop-100000-10    30.74m ± 3%   19.68m ± 10%  -35.98% (p=0.000 n=10)
GC4El200k/Run-4-eventloop-200000-10    63.64m ± 3%   38.16m ± 11%  -40.04% (p=0.000 n=10)
GC4El500k/Run-4-eventloop-500000-10   177.28m ± 8%   95.21m ±  4%  -46.29% (p=0.000 n=10)
geomean                                70.26m        41.51m        -40.92%

                                    │     old     │                new                 │
                                    │    B/op     │    B/op      vs base               │
GC4El100k/Run-4-eventloop-100000-10   27.50 ± 35%   25.50 ± 33%       ~ (p=0.423 n=10)
GC4El200k/Run-4-eventloop-200000-10   27.50 ± 53%   20.50 ± 66%       ~ (p=0.642 n=10)
GC4El500k/Run-4-eventloop-500000-10   16.00 ±   ?   18.00 ±   ?       ~ (p=0.357 n=10)
geomean                               22.96         21.11        -8.04%

                                    │     old      │                 new                 │
                                    │  allocs/op   │ allocs/op   vs base                 │
GC4El100k/Run-4-eventloop-100000-10   0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=10) ¹
GC4El200k/Run-4-eventloop-200000-10   0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=10) ¹
GC4El500k/Run-4-eventloop-500000-10   0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=10) ¹
geomean                                          ²               +0.00%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean

The more connections there are, the more pronounced the effect.

While we have performed sufficient testing on matrix, we are still using map as the default connection storage in this RC version for the sake of caution, but you can enable the new data structure by specifying build tags: -tags=gc_opt. This can be considered as a precautionary measure so that in case matrix has any unexpected bugs, you can quickly fall back to the default map. We will consider promoting matrix to be the default storage for connections in a subsequent official release.

Another significant leap is #461, you can now run gnet on Windows, it should be noted that the Windows version of gnet is intended for development purposes and is not recommended for use in production.

Full Changelog: https://github.com/panjf2000/gnet/compare/v2.2.0...v2.3.0

Thanks to all these contributors: @0-haha, @GXKe, @gocurr, @jinxing3114 and @panjf2000 for making this release possible.

download

unix · zip
curl -fL -o v2.3.0.zip https://ratatoskr.space/pkg/gnet/v2.3.0.zip
                    printf '%s  %s\n' '67d7e9b6b7d35c34d06cb014fba51187c50104148b22e8509aa90aafef5eca4e' 'v2.3.0.zip' | sha256sum -c -
windows · zip
$url = "https://ratatoskr.space/pkg/gnet/v2.3.0.zip"
$out = "v2.3.0.zip"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "67d7e9b6b7d35c34d06cb014fba51187c50104148b22e8509aa90aafef5eca4e") { throw "sha256 mismatch" }
unix · tar.gz
curl -fL -o v2.3.0.tar.gz https://ratatoskr.space/pkg/gnet/v2.3.0.tar.gz
                    printf '%s  %s\n' '4c08ad8ac8e0729e5892ade92aef94e7464705c0ce2079368f44233833db24ea' 'v2.3.0.tar.gz' | sha256sum -c -
windows · tar.gz
$url = "https://ratatoskr.space/pkg/gnet/v2.3.0.tar.gz"
$out = "v2.3.0.tar.gz"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "4c08ad8ac8e0729e5892ade92aef94e7464705c0ce2079368f44233833db24ea") { throw "sha256 mismatch" }
download via yggdrasil mesh
unix · zip
curl -fL -o v2.3.0.zip http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/gnet/v2.3.0.zip
                    printf '%s  %s\n' '67d7e9b6b7d35c34d06cb014fba51187c50104148b22e8509aa90aafef5eca4e' 'v2.3.0.zip' | sha256sum -c -
windows · zip
$url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/gnet/v2.3.0.zip"
$out = "v2.3.0.zip"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "67d7e9b6b7d35c34d06cb014fba51187c50104148b22e8509aa90aafef5eca4e") { throw "sha256 mismatch" }
unix · tar.gz
curl -fL -o v2.3.0.tar.gz http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/gnet/v2.3.0.tar.gz
                    printf '%s  %s\n' '4c08ad8ac8e0729e5892ade92aef94e7464705c0ce2079368f44233833db24ea' 'v2.3.0.tar.gz' | sha256sum -c -
windows · tar.gz
$url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/gnet/v2.3.0.tar.gz"
$out = "v2.3.0.tar.gz"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "4c08ad8ac8e0729e5892ade92aef94e7464705c0ce2079368f44233833db24ea") { throw "sha256 mismatch" }
artifact format size hashes
v2.3.0.zip zip 169.4 KiB
blake3-24 cddfee5b5075677b7c1262ff5fc66121b35b71eda5dae96a
sha256 67d7e9b6b7d35c34d06cb014fba51187c50104148b22e8509aa90aafef5eca4e
sha1 99aa017d7a23afdc6b1aba7621089a868ad535b9
v2.3.0.tar.gz tar.gz 92.2 KiB
blake3-24 f92e68d6d3be76c68065a7d535efe7074baa55a7e8844fcb
sha256 4c08ad8ac8e0729e5892ade92aef94e7464705c0ce2079368f44233833db24ea
sha1 2aef1752951fd52be0eb211c283311fa77f567e8

go module archive

module zip with the module path rewritten to this mirror; fetched by go get through the GOPROXY route

artifact format size hashes
v2.3.0.zip zip 172.4 KiB
blake3-24 2adfdceaf147d7f5b48a2553f7f23efaef8b8ce636aacf78
sha256 1187963e24479b5337f2ddd9524004ed341b50c024c7a5e48d6709983949daee
sha1 8ba901b10c60d5f2457691e182be9603fca94f41

install

bazel
http_archive(
    name = "gnet",
    urls = ["https://ratatoskr.space/pkg/gnet/v2.3.0.tar.gz"],
    integrity = "sha256-TAitisjgcp5Ykq3pKu+U50ZHBcDOIHk2j0QjODPbJOo=",
    strip_prefix = "gnet-v2.3.0",
)
zig
.url = "https://ratatoskr.space/pkg/gnet/v2.3.0.tar.gz",
go
GOPROXY=https://ratatoskr.space GOSUMDB=off go get ratatoskr.space/pkg/gnet/v2@v2.3.0
install via yggdrasil mesh
bazel
http_archive(
    name = "gnet",
    urls = ["http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/gnet/v2.3.0.tar.gz"],
    integrity = "sha256-TAitisjgcp5Ykq3pKu+U50ZHBcDOIHk2j0QjODPbJOo=",
    strip_prefix = "gnet-v2.3.0",
)
zig
.url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/gnet/v2.3.0.tar.gz",
go
GOPROXY=http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg GOSUMDB=off GOINSECURE=14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/* go get 14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/gnet/v2@v2.3.0
← v2.4.0v2.2.0 →