Commit Graph
115 Commits
Author SHA1 Message Date
Kevin Krakauer 7c236fdb07 netstack: benchmark xdp endpoint
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.
2023-08-31 11:09:15 -07:00
Zach KoopmansandgVisor bot f65ca898d2 Rearrange fio tests cases so regexs aren't ridiculous.
Rearrange benchmark function so calls in buildkite pipelines
are correct without 100 charecter regexes.

PiperOrigin-RevId: 558213872
2023-08-18 12:17:18 -07:00
Zach KoopmansandgVisor bot e51cab7e62 Fix redis test after new image is used.
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
2023-08-18 10:22:59 -07:00
Ayush RanjanandgVisor bot 4aa6b5b692 Add generic tooling to scrape output from fastlane ruby test suite.
PiperOrigin-RevId: 554562254
2023-08-07 12:49:30 -07:00
Etienne PerotandgVisor bot be5373de33 gVisor fio benchmarks: Use libaio where it makes sense.
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
2023-07-24 16:48:03 -07:00
Etienne PerotandgVisor bot 11278a7cf6 Add O_DIRECT version of fio benchmarks to track direct I/O performance.
PiperOrigin-RevId: 549470615
2023-07-19 17:27:02 -07:00
Etienne PerotandgVisor bot c095565dd8 fio benchmark: Do not call fallocate in read-only benchmarks.
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
2023-07-13 14:00:59 -07:00
Etienne PerotandgVisor bot 14f360868f runsc: Make Systrap the default platform.
As per announced on gvisor-users:
https://groups.google.com/g/gvisor-users/c/OhGupJ5bTuo

PiperOrigin-RevId: 540085417
2023-06-13 15:09:54 -07:00
Kevin KrakauerandgVisor bot 5b733965e4 tcp_benchmark: fix typo
Not every run of tcp_benchmark is a client run.

PiperOrigin-RevId: 538885507
2023-06-08 14:07:20 -07:00
Kevin KrakauerandgVisor bot 8583bdb241 tcp_benchmark: only output the relevant CPU usage
This just makes it easier to script and automate benchmarking.

PiperOrigin-RevId: 538827909
2023-06-08 10:41:32 -07:00
Kevin KrakauerandgVisor bot 667a42d6dc netstack: have tcp_benchmark use iperf3 by default
PiperOrigin-RevId: 537353920
2023-06-02 10:55:59 -07:00
Kevin KrakauerandgVisor bot 28c42347d3 tcp_benchmark: allow packet sniffing/logging
PiperOrigin-RevId: 534910831
2023-05-24 11:10:50 -07:00
Ayush RanjanandgVisor bot ce67fed07f Add back filesystem type dimensions to benchmarks.
Fixes bb5d1731d6 ("Add FUSE dimension to gvisor macrobenchmarks.").

PiperOrigin-RevId: 534591592
2023-05-23 16:09:20 -07:00
Kevin KrakauerandgVisor bot c45c6c805b minor quality-of-life improvements to tcp_benchmark
- 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
2023-05-23 13:19:24 -07:00
Lucas ManningandgVisor bot bb5d1731d6 Add FUSE dimension to gvisor macrobenchmarks.
PiperOrigin-RevId: 534131305
2023-05-22 11:35:58 -07:00
Kevin KrakauerandgVisor bot 302b35dfa7 netstack: default recv buf auto tuning to on
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
2023-05-16 12:07:10 -07:00
Kevin KrakauerandgVisor bot ef88b30bff netstack: make tcpip.Address an opaque type
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
2023-05-15 18:07:03 -07:00
Zach KoopmansandgVisor bot c3266b558d Fix parsing error w/ RubyDev benchmark.
PiperOrigin-RevId: 531299491
2023-05-11 13:59:48 -07:00
Kevin KrakauerandgVisor bot 40c6cb09ad tcp_benchmark: make it easy to switch to iperf3
PiperOrigin-RevId: 530952739
2023-05-10 11:00:38 -07:00
Kevin KrakauerandgVisor bot f24f47e96a tcp_benchmark: make compatible with iperf3
iperf3 outputs a different error message when failing to connect. We need to
recognize it to know to retry.

PiperOrigin-RevId: 530721657
2023-05-09 14:59:29 -07:00
Ayush RanjanandgVisor bot 7e82e1b509 Add loadtime metric to BenchmarkRubySpecTest.
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
2023-04-04 11:33:11 -07:00
Andrei VaginandgVisor bot 4036d73b48 benchmarks/syscallbench: a few fixes
PiperOrigin-RevId: 513967221
2023-03-04 00:55:39 -08:00
Zach KoopmansandgVisor bot c0bee8539b Add getpidopt case to docker benchmarks.
getpidopt is an important test case for the systrap platform,
so add it to our syscall test.

PiperOrigin-RevId: 513657968
2023-03-02 15:37:50 -08:00
Adin ScannellandgVisor bot 2911d8c3b8 Add default_applicable_licenses rules to packages.
PiperOrigin-RevId: 513581243
2023-03-02 10:50:04 -08:00
Ayush RanjanandgVisor bot 574b815456 Statically link benchmark test binaries.
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
2023-02-17 09:59:36 -08:00
Zach KoopmansandgVisor bot 0296489633 Ensure only Upload/Download iperf tests run on buildkite.
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
2023-02-03 10:36:25 -08:00
Zach KoopmansandgVisor bot d2e2b3730e Add usage benchmarks
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
2023-01-19 21:00:49 -08:00
Zach KoopmansandgVisor bot f3eb095bb8 Reduce number of Tensorflow test cases for dashboard.
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
2023-01-10 11:12:34 -08:00
Zach KoopmansandgVisor bot 36177aa343 Reduce number of operations in Redis benchmark.
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
2023-01-04 14:11:07 -08:00
Zach KoopmansandgVisor bot 270c446d4d Add hackbench and syscall benchmarks to buildkite runs.
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
2022-11-10 17:12:52 -08:00
Kevin KrakauerandgVisor bot ae6bddb3c6 netstack: make GRO timeout configurable in tcp_benchmark
Also: don't turn of GRO when --disable-linux-gso is set.
PiperOrigin-RevId: 487346882
2022-11-09 14:25:57 -08:00
Kevin KrakauerandgVisor bot 3bafc9f303 fix lint warnings in tcp_benchmark.sh
PiperOrigin-RevId: 487085546
2022-11-08 16:45:48 -08:00
Kevin KrakauerandgVisor bot 3a76efe831 convert uses of interface{} to any
Done via:
  find . -name "*.go" | xargs sed -i -E 's/interface\{\}/any/g'

PiperOrigin-RevId: 487033228
2022-11-08 13:14:06 -08:00
Etienne PerotandgVisor bot 0b11e47f3e Make all network benchmarks use container links.
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
2022-11-04 13:51:45 -07:00
Etienne PerotandgVisor bot f7a003773f Label all benchmarks with tag gvisor_benchmark.
This makes it easy to list all the available benchmark targets with `bazel`.

PiperOrigin-RevId: 486212679
2022-11-04 13:10:21 -07:00
Etienne PerotandgVisor bot 446b816501 Typo fixes.
PiperOrigin-RevId: 486017439
2022-11-03 17:43:00 -07:00
Ayush RanjanandgVisor bot 92b95875ae Make tensorflow benchmark order deterministic.
Makes it easier to compare output from different runs. Consistent
with what other benchmarks do.

PiperOrigin-RevId: 481192191
2022-10-14 11:26:55 -07:00
gVisor bot 20abf688a3 Merge pull request #7989 from cedriccchen:benchmarks
PiperOrigin-RevId: 477586197
2022-09-28 16:53:58 -07:00
Chen Hui 09dbb4e1c2 benchmarks: add BenchmarkIperfParameterized testcase for iperf benchmark
Signed-off-by: Chen Hui <[email protected]>
2022-09-23 12:32:19 +08:00
Chen Hui a94ef289ba benchmarks: fix invalid option of length for iperf benchmark
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]>
2022-09-23 12:32:18 +08:00
Chen Hui 5ccf79eff0 benchmarks: add more blocksize arguments for fio benchmark
Signed-off-by: Chen Hui <[email protected]>
2022-09-23 12:32:18 +08:00
Chen Hui 7ac43911da benchmarks: fix wrong file size for fio read
According to MakeCmd function of fio, the unit of --size option is MB.

Signed-off-by: Chen Hui <[email protected]>
2022-09-23 12:32:18 +08:00
Chen Hui 318b55899f benchmarks: add more threads arguments for sysbench benchmark
Signed-off-by: Chen Hui <[email protected]>
2022-09-23 12:32:18 +08:00
Chen Hui 3d45ef4eab benchmarks: add hackbench benchmark for scheduler performance
Signed-off-by: Chen Hui <[email protected]>
2022-09-23 12:32:16 +08:00
Chen Hui b33c282f78 benchmarks: add syscallbench benchmark for syscall performance
Signed-off-by: Chen Hui <[email protected]>
2022-09-22 10:13:45 +08:00
Bhasker HariharanandgVisor bot 79e305411a Add support for block/mutex/trace profiles.
PiperOrigin-RevId: 474912515
2022-09-16 15:22:02 -07:00
Etienne PerotandgVisor bot a0282a593e iperf benchmark: Use container networking links rather than default bridge.
This fixes `iperf` getting stuck on some versions of Docker, and mirrors the
way other multi-container tests do networking.

PiperOrigin-RevId: 468049041
2022-08-16 16:08:56 -07:00
Lucas ManningandgVisor bot 8cd998667f Add a flag to tcp_benchmarks that runs the workload over ipv6.
PiperOrigin-RevId: 465404721
2022-08-04 14:28:11 -07:00
Zach KoopmansandgVisor bot d0244d1efb [benchmarks] Remove broken runsc benchmark.
This has been replaced by the gRPC build benchmark
which is below the removed BuildRunsc benchmark.

PiperOrigin-RevId: 463393704
2022-07-26 12:06:33 -07:00
Kevin KrakauerandgVisor bot 423d10a336 benchmarks: add --disable-linux-gro
PiperOrigin-RevId: 462516480
2022-07-21 18:53:45 -07:00