This just swaps out the fdbased endpoint for an XDP one. Some related
changes in here:
- Moved the AF_XDP BPF program into its own Go package so it can be
shared.
- Added a flag to tcp_benchmark to disable user namespaces. This helps
when running as root, which is required to install BPF programs.
Fix the redis test after the image has been changed. The new image has a
different output format, so update the report function to accomodate.
This also means we can collect more metrics easily.
Also use the redis-cli to check that the server is serving instead of
wget --spider.
PiperOrigin-RevId: 558181384
Enforce that `IODepth` must be `1` when using the `sync` IO engine, since
it has no effect with that engine.
Also add unit names to `tools.Fio` struct fields for easier readability.
PiperOrigin-RevId: 550710273
Calling `fallocate` is not a typical operation for an application to do when
it is only trying to read a file.
This has performance implications for gVisor, so we override `fio`'s default
behavior for read-only benchmarks to be more representative of real-world
read-only performance.
PiperOrigin-RevId: 547912572
- Get rid of `os.Exit()`, which didn't actually run any of the defers.
- Warn users that putting profiles in /tmp/ will lead to hours of perplexed
frustration.
PiperOrigin-RevId: 534534483
This has been enabled most everywhere for a long time -- leaving it off
artificially deflates gVisor performance for users that don't know to set the
option.
Also enable it by default in tcp_benchmark.
PiperOrigin-RevId: 532532579
The important change here is in tcpip/tcpip.go, where tcpip.Address is defined.
The rest is updating uses of tcpip.Address.
This is preparation for netip.Addr or []byte based addresses, which should save
us a bunch of allocations. Currently, we allocate every time we want to, say,
get a tcpip.Address from a header. This is because the header is a byte slice,
but Address is a string. Strings are immutable, so Go allocates and copies.
PiperOrigin-RevId: 532284732
As of right now, BenchmarkRubySpecTest is not too useful because majority of
the reported time is consumed by the various tests running. We care about this
workload's start up time. It's output has the load time in the format
"files took X seconds to load". This metric is important for us. So capture it
and report it.
PiperOrigin-RevId: 521819612
After update to Go 1.20 in 3217061ac5 ("Bump go version to 1.20"), the
benchmark jobs have been failing on BuildKite. This seems to be happening
because benchmark test binaries are built in Docker containers but are run on
the host. On some hosts, the glibc isn't compatible with glibc in our docker
container. So dynamically linked binaries may fail. Linking them statically
resolves this glibc compatibility issue.
As a result, this change also adds support for static test binaries to
tools/bazeldefs/go.bzl.
PiperOrigin-RevId: 510455271
The addition of the "Parameterized" version of iperf requires a filter
so that only the original tests run. Otherwise, we get test timeouts.
PiperOrigin-RevId: 506938451
Add the usage benchmark which queries memory usage from the container. This
is meant to replace the size benchmark which has a ton of noise.
Flakes are due to the complicated measurement technique of dropping caches ->
parse /proc/meminfo -> start containers -> drops caches again -> parse
/proc/meminfo -> take the diference. This was done because not all runtimes
support docker/containerd stats.
Buuuut...gVisor does, so we'll just take the stats figures to reduce noise
for the memory usage benchmark.
In addition, the returned types.StatsJSON object contains several useful stats
like page faults and CPU usage, so adding these will be trivial and will not
slow down benchmark performance.
[types.StatsJSON linky link](https://github.com/moby/moby/blob/42c8b314993e5eb3cc2776da0bbe41d5eb4b707b/api/types/stats.go#LL153)
PiperOrigin-RevId: 503342363
A full run of all tensorflow test cases can take upwards of an hour
with very little benefit gained for most workloads. Reduce the number
of cases for dashboard runs.
PiperOrigin-RevId: 501043752
The redis benchmark has inconsistent data due to timeouts. In general,
operations on a redis DB are pretty uniform WRT performance and having
a large set of operations is not useful for regression checks.
Add another test method with a smaller subset of operations and a filter in
the buildkite pipeline files.
PiperOrigin-RevId: 499574468
Also, revise hackbench to use b.N to scale. There was some discussion
on the [original PR](https://github.com/google/gvisor/pull/7989#discussion_r973206930) about
making this fixed. However, after looking again, loops should scale
by b.N. Fixed number of loops can use -test.benchtime=100x or whatever
and comparison can be done using golang's 'ns/op' metric where the op is
number of loops.
PiperOrigin-RevId: 487678691
This CL uses container links rather than going over the host network stack.
This avoids relying on that network stack, making the benchmarks more reliable,
and simplifies benchmark setup code.
#codehealth
PiperOrigin-RevId: 486221868
According to iperf help page:
```
-l, --len #[kmKM] length of buffer in bytes to read or write
(Defaults: TCP=128K, v4 UDP=1470, v6 UDP=1450).
```
So "--length 64K" option is invalid for iperf, actually it will be
regard as default option "--len 128K".
Signed-off-by: Chen Hui <[email protected]>
This fixes `iperf` getting stuck on some versions of Docker, and mirrors the
way other multi-container tests do networking.
PiperOrigin-RevId: 468049041