1
0
mirror of https://github.com/golang/go synced 2024-11-22 22:30:02 -07:00
The Go programming language
Go to file
Andy Pan c8bb3cff9e internal/poll: optimize the maximum amount of bytes that can be transferred by one splice(2) call
Fixes #40222

name                          old time/op    new time/op    delta
Splice/tcp-to-tcp/1024-4        5.16µs ± 1%    5.17µs ± 4%     ~     (p=0.481 n=10+10)
Splice/tcp-to-tcp/2048-4        5.46µs ± 2%    5.48µs ± 2%     ~     (p=0.617 n=10+10)
Splice/tcp-to-tcp/4096-4        6.07µs ± 3%    6.09µs ± 5%     ~     (p=0.927 n=10+10)
Splice/tcp-to-tcp/8192-4        7.07µs ± 5%    7.16µs ± 3%     ~     (p=0.324 n=10+10)
Splice/tcp-to-tcp/16384-4       8.82µs ±10%    8.83µs ±11%     ~     (p=1.000 n=10+10)
Splice/tcp-to-tcp/32768-4       12.3µs ±12%    12.7µs ± 4%     ~     (p=0.268 n=10+9)
Splice/tcp-to-tcp/65536-4       22.1µs ± 3%    22.0µs ± 3%     ~     (p=0.912 n=10+10)
Splice/tcp-to-tcp/131072-4      40.0µs ± 4%    39.9µs ± 4%     ~     (p=1.000 n=9+8)
Splice/tcp-to-tcp/262144-4      69.1µs ± 3%    67.9µs ± 2%   -1.67%  (p=0.010 n=9+10)
Splice/tcp-to-tcp/524288-4       128µs ± 3%     124µs ± 2%   -2.67%  (p=0.001 n=9+10)
Splice/tcp-to-tcp/1048576-4      242µs ± 3%     242µs ± 2%     ~     (p=0.912 n=10+10)
Splice/unix-to-tcp/1024-4       1.97µs ± 3%    1.96µs ± 2%     ~     (p=0.342 n=10+10)
Splice/unix-to-tcp/2048-4       2.19µs ± 2%    2.21µs ± 2%     ~     (p=0.150 n=9+10)
Splice/unix-to-tcp/4096-4       2.52µs ± 5%    2.50µs ± 1%     ~     (p=0.393 n=10+10)
Splice/unix-to-tcp/8192-4       3.27µs ± 4%    3.24µs ± 7%     ~     (p=0.968 n=9+10)
Splice/unix-to-tcp/16384-4      4.68µs ± 9%    4.79µs ± 8%     ~     (p=0.739 n=10+10)
Splice/unix-to-tcp/32768-4      7.82µs ±12%    7.76µs ±12%     ~     (p=0.912 n=10+10)
Splice/unix-to-tcp/65536-4      17.9µs ± 3%    17.3µs ±10%     ~     (p=0.661 n=9+10)
Splice/unix-to-tcp/131072-4     35.9µs ± 1%    31.3µs ± 4%  -12.88%  (p=0.000 n=10+9)
Splice/unix-to-tcp/262144-4     72.4µs ± 3%    55.4µs ± 2%  -23.55%  (p=0.000 n=10+10)
Splice/unix-to-tcp/524288-4      146µs ± 3%     113µs ± 1%  -22.87%  (p=0.000 n=9+9)
Splice/unix-to-tcp/1048576-4     288µs ± 3%     223µs ± 3%  -22.49%  (p=0.000 n=10+9)

name                          old speed      new speed      delta
Splice/tcp-to-tcp/1024-4       198MB/s ± 1%   198MB/s ± 4%     ~     (p=0.481 n=10+10)
Splice/tcp-to-tcp/2048-4       375MB/s ± 2%   374MB/s ± 2%     ~     (p=0.631 n=10+10)
Splice/tcp-to-tcp/4096-4       674MB/s ± 3%   673MB/s ± 5%     ~     (p=0.912 n=10+10)
Splice/tcp-to-tcp/8192-4      1.16GB/s ± 6%  1.15GB/s ± 3%     ~     (p=0.315 n=10+10)
Splice/tcp-to-tcp/16384-4     1.86GB/s ±10%  1.84GB/s ±13%     ~     (p=0.720 n=10+9)
Splice/tcp-to-tcp/32768-4     2.68GB/s ±13%  2.57GB/s ± 7%     ~     (p=0.165 n=10+10)
Splice/tcp-to-tcp/65536-4     2.97GB/s ± 3%  2.98GB/s ± 3%     ~     (p=0.912 n=10+10)
Splice/tcp-to-tcp/131072-4    3.28GB/s ± 4%  3.29GB/s ± 4%     ~     (p=1.000 n=9+8)
Splice/tcp-to-tcp/262144-4    3.80GB/s ± 3%  3.86GB/s ± 2%   +1.70%  (p=0.010 n=9+10)
Splice/tcp-to-tcp/524288-4    4.10GB/s ± 3%  4.21GB/s ± 2%   +2.74%  (p=0.001 n=9+10)
Splice/tcp-to-tcp/1048576-4   4.34GB/s ± 3%  4.33GB/s ± 2%     ~     (p=0.912 n=10+10)
Splice/unix-to-tcp/1024-4      519MB/s ± 3%   523MB/s ± 2%     ~     (p=0.353 n=10+10)
Splice/unix-to-tcp/2048-4      934MB/s ± 2%   926MB/s ± 2%     ~     (p=0.156 n=9+10)
Splice/unix-to-tcp/4096-4     1.63GB/s ± 5%  1.64GB/s ± 1%     ~     (p=0.393 n=10+10)
Splice/unix-to-tcp/8192-4     2.51GB/s ± 3%  2.53GB/s ± 7%     ~     (p=0.968 n=9+10)
Splice/unix-to-tcp/16384-4    3.52GB/s ± 8%  3.43GB/s ± 8%     ~     (p=0.739 n=10+10)
Splice/unix-to-tcp/32768-4    4.21GB/s ±14%  4.24GB/s ±13%     ~     (p=0.912 n=10+10)
Splice/unix-to-tcp/65536-4    3.65GB/s ± 5%  3.81GB/s ±11%     ~     (p=0.436 n=10+10)
Splice/unix-to-tcp/131072-4   3.65GB/s ± 1%  4.19GB/s ± 4%  +14.81%  (p=0.000 n=10+9)
Splice/unix-to-tcp/262144-4   3.62GB/s ± 3%  4.73GB/s ± 2%  +30.78%  (p=0.000 n=10+10)
Splice/unix-to-tcp/524288-4   3.59GB/s ± 3%  4.66GB/s ± 1%  +29.64%  (p=0.000 n=9+9)
Splice/unix-to-tcp/1048576-4  3.65GB/s ± 3%  4.70GB/s ± 3%  +29.01%  (p=0.000 n=10+9)

name                          old alloc/op   new alloc/op   delta
Splice/tcp-to-tcp/1024-4         0.00B          0.00B          ~     (all equal)
Splice/tcp-to-tcp/2048-4         0.00B          0.00B          ~     (all equal)
Splice/tcp-to-tcp/4096-4         0.00B          0.00B          ~     (all equal)
Splice/tcp-to-tcp/8192-4         0.00B          0.00B          ~     (all equal)
Splice/tcp-to-tcp/16384-4        0.00B          0.00B          ~     (all equal)
Splice/tcp-to-tcp/32768-4        0.00B          0.00B          ~     (all equal)
Splice/tcp-to-tcp/65536-4        0.00B          0.00B          ~     (all equal)
Splice/tcp-to-tcp/131072-4       0.00B          0.00B          ~     (all equal)
Splice/tcp-to-tcp/262144-4       0.00B          0.00B          ~     (all equal)
Splice/tcp-to-tcp/524288-4       0.00B          0.00B          ~     (all equal)
Splice/tcp-to-tcp/1048576-4      0.00B          0.00B          ~     (all equal)
Splice/unix-to-tcp/1024-4        0.00B          0.00B          ~     (all equal)
Splice/unix-to-tcp/2048-4        0.00B          0.00B          ~     (all equal)
Splice/unix-to-tcp/4096-4        0.00B          0.00B          ~     (all equal)
Splice/unix-to-tcp/8192-4        0.00B          0.00B          ~     (all equal)
Splice/unix-to-tcp/16384-4       0.00B          0.00B          ~     (all equal)
Splice/unix-to-tcp/32768-4       0.00B          0.00B          ~     (all equal)
Splice/unix-to-tcp/65536-4       0.00B          0.00B          ~     (all equal)
Splice/unix-to-tcp/131072-4      0.00B          0.00B          ~     (all equal)
Splice/unix-to-tcp/262144-4      0.00B          0.00B          ~     (all equal)
Splice/unix-to-tcp/524288-4      0.00B          0.00B          ~     (all equal)
Splice/unix-to-tcp/1048576-4     0.00B          0.00B          ~     (all equal)

name                          old allocs/op  new allocs/op  delta
Splice/tcp-to-tcp/1024-4          0.00           0.00          ~     (all equal)
Splice/tcp-to-tcp/2048-4          0.00           0.00          ~     (all equal)
Splice/tcp-to-tcp/4096-4          0.00           0.00          ~     (all equal)
Splice/tcp-to-tcp/8192-4          0.00           0.00          ~     (all equal)
Splice/tcp-to-tcp/16384-4         0.00           0.00          ~     (all equal)
Splice/tcp-to-tcp/32768-4         0.00           0.00          ~     (all equal)
Splice/tcp-to-tcp/65536-4         0.00           0.00          ~     (all equal)
Splice/tcp-to-tcp/131072-4        0.00           0.00          ~     (all equal)
Splice/tcp-to-tcp/262144-4        0.00           0.00          ~     (all equal)
Splice/tcp-to-tcp/524288-4        0.00           0.00          ~     (all equal)
Splice/tcp-to-tcp/1048576-4       0.00           0.00          ~     (all equal)
Splice/unix-to-tcp/1024-4         0.00           0.00          ~     (all equal)
Splice/unix-to-tcp/2048-4         0.00           0.00          ~     (all equal)
Splice/unix-to-tcp/4096-4         0.00           0.00          ~     (all equal)
Splice/unix-to-tcp/8192-4         0.00           0.00          ~     (all equal)
Splice/unix-to-tcp/16384-4        0.00           0.00          ~     (all equal)
Splice/unix-to-tcp/32768-4        0.00           0.00          ~     (all equal)
Splice/unix-to-tcp/65536-4        0.00           0.00          ~     (all equal)
Splice/unix-to-tcp/131072-4       0.00           0.00          ~     (all equal)
Splice/unix-to-tcp/262144-4       0.00           0.00          ~     (all equal)
Splice/unix-to-tcp/524288-4       0.00           0.00          ~     (all equal)
Splice/unix-to-tcp/1048576-4      0.00           0.00          ~     (all equal)

Change-Id: I899c1fdcb3f7b9997faf2b0d2336016a3f1fd3ea
Reviewed-on: https://go-review.googlesource.com/c/go/+/425051
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2022-08-26 17:47:23 +00:00
.github .github/ISSUE_TEMPLATE: add issue template for Go vulnerability management 2022-08-19 16:55:03 +00:00
api reflect: add Value.SetZero 2022-08-26 17:15:08 +00:00
doc doc/go1.20: populate initial TODOs via relnote 2022-08-24 18:36:56 +00:00
lib/time lib/time, time/tzdata: update to 2022b 2022-08-11 20:03:19 +00:00
misc misc/cgo/testsanitizers: determine compiler version for tsan tests on ppc64le 2022-08-25 11:40:57 +00:00
src internal/poll: optimize the maximum amount of bytes that can be transferred by one splice(2) call 2022-08-26 17:47:23 +00:00
test cmd/compile: align stack offset to alignment larger than PtrSize 2022-08-26 15:24:31 +00:00
.gitattributes all: treat all files as binary, but check in .bat with CRLF 2020-06-08 15:31:43 +00:00
.gitignore internal/buildcfg: move build configuration out of cmd/internal/objabi 2021-04-16 19:20:53 +00:00
codereview.cfg codereview.cfg: add codereview.cfg for master branch 2021-02-19 18:44:53 +00:00
CONTRIBUTING.md all: restore changes from faulty merge/revert 2018-02-12 20:13:59 +00:00
LICENSE
PATENTS
README.md README.md: update wiki link 2022-04-26 16:21:18 +00:00
SECURITY.md SECURITY.md: replace golang.org with go.dev 2022-04-26 19:59:47 +00:00

The Go Programming Language

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.

Gopher image Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.

Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.

Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.

Download and Install

Binary Distributions

Official binary distributions are available at https://go.dev/dl/.

After downloading a binary release, visit https://go.dev/doc/install for installation instructions.

Install From Source

If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.

Contributing

Go is the work of thousands of contributors. We appreciate your help!

To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.

Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.