23 Commits
Author SHA1 Message Date
Etienne PerotandgVisor bot 77fbe844ad PGO benchmarks: Only run a representative subset of benchmark tests.
Speeds up the PGO profile pipeline.

PiperOrigin-RevId: 784392458
2025-07-17 18:50:53 -07:00
Etienne PerotandgVisor bot 8f1257c31a Docker tests and benchmarks: Remove use of exposed ports.
All these tests and benchmarks rely on networking between containers,
not on these ports being exposed on the host, so there is no need to
expose them on the host.

This avoids random errors like "Error starting userland proxy:
listen tcp4 0.0.0.0:12345: bind: address already in use".

#codehealth

PiperOrigin-RevId: 778272096
2025-07-01 18:26:32 -07:00
Etienne PerotandgVisor bot eaa5848e64 Run more benchmarks for PGO profiling.
The previous set of benchmarks is limited to ffmpeg. This means the
profile doesn't cover much of the gVisor codebase. Increasing the set
of PGO benchmarks ensures coverage data for network and I/O stuff.

PiperOrigin-RevId: 776641891
2025-06-27 10:51:04 -07:00
Andrei Vagin 67266e9403 Fix a few typos 2025-01-29 21:16:51 -08:00
Etienne PerotandgVisor bot 6d12a0cecc PGO: Add make target to refresh profiles for PGO.
This runs all benchmarks tagged as PGO-enabled, of which there is
currently just one for simplicity (the ffmpeg benchmark). All other
benchmarks are initially tagged out of PGO. I will send a different
change to enroll other benchmarks in PGO.

The make target runs each such benchmark and gathers profiles for each
benchmark. Multiple profile files for multiple runs of the same benchmark
are merged into one, then compared against the existing checked-in profile
used for PGO builds (which right now doesn't exist). If such a profile
doesn't exist or differs widely from the freshly-collected profile, then
this new profile is copied into the repository.

Such profiles are not used at all in builds yet, this is just the glue
that keeps them fresh in the repo.

PiperOrigin-RevId: 714311978
2025-01-10 19:44:15 -08:00
Etienne PerotandgVisor bot 6f6226f276 metricsviz: Integrate library in a few benchmarks.
This is part of a series of changes to add metric charts in performance
benchmarks.

This change showcases how to process profiling metrics logs and is meant as
a demo. A future change will add it to other benchmarks.

PiperOrigin-RevId: 631694169
2024-05-08 01:26:11 -07:00
gVisor bot f0327ad87e Fix typos in license headers.
PiperOrigin-RevId: 605057759
2024-02-07 12:07:58 -08:00
Jing ChenandgVisor bot 70ce036c8a Re-order loads in BUILD files to make transformations reversible in Copybara.
PiperOrigin-RevId: 598898756
2024-01-16 11:21:40 -08: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
Adin ScannellandgVisor bot 2911d8c3b8 Add default_applicable_licenses rules to packages.
PiperOrigin-RevId: 513581243
2023-03-02 10:50:04 -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
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
Zach KoopmansandgVisor bot 38ce79e080 [benchmarks] Fix redis benchmark.
Intermittenly, the connection between the client redis_benchmark container can be
flaky with the server, even if the server has been up for a long time. If this
happens, just re-run a client until we get a result.

Also, don't start a new server for each operation.

Also also, modify Makefile run-benchmark call to accept RUNTIME=runc correctly.

PiperOrigin-RevId: 378918886
2021-06-11 11:56:15 -07:00
Adin ScannellandgVisor bot 6a8145514a Remove eternal and enormous tests.
PiperOrigin-RevId: 366573366
2021-04-03 00:18:34 -07:00
Adin ScannellandgVisor bot caec235b70 Simplify profiling and benchmarks.
- Tweak the benchmarks to work with b.N where appropriate. In many cases,
  b.N was simply being ignored. This creates an implicit dependency in the
  user passing a reasonable benchtime (less than or equal to the actual
  runtime of the test, or using the X syntax) otherwise the test runs
  forever.
- In cases where the above is impossible, explicitly set benchtime from
  the test wrapper, to prevent the above behavior (tensorflow).
- Drop the *Reverse variants, which are simply hey benchmarks. We should
  just add a hey benchmark. The platforms benchmarks already include a
  native platform, and thus these benchmarks are incredibly confusing.
  (In other words, BenchmarkNginxReverse has nothing to do with an nginx
  benchmark for runsc.)
- Remove the redunant Harness object, which contains no state, in order
  to slightly simplify the code.
- Make Block and Heap profiling actually work, but setting appropriate
  runtime parameters (and plumbing them through the config).
- Split the profiling into two phases: start and stop, since some will
  need to be started early, and others will need to happen at the end.

PiperOrigin-RevId: 349495377
2020-12-29 18:29:12 -08:00
Zach KoopmansandShentubot ffdf53ed98 Add tensorflow, ffmpeg, and redis jobs.
PiperOrigin-RevId: 346603153
2020-12-09 15:56:08 -08:00
Zach KoopmansandgVisor bot a9fc861467 Fix tags on benchmark targets.
PiperOrigin-RevId: 346203209
2020-12-07 16:20:12 -08:00
Zach KoopmansandgVisor bot 384dabc619 Add parsers golang benchmarks.
Add parser and formatting for golang benchmarks for docker benchmarks.
Change adds a library for printing and parsing Test parameters and metrics.
Benchmarks use the library to print parameters in the Benchmark title
(e.g. the name field in b.Run()), and to report CustomMetrics. Parser
uses the library to parse printed data from benchmark output and
put it into BigQuery structs.

PiperOrigin-RevId: 336365628
2020-10-09 14:29:21 -07:00
Adin ScannellandgVisor bot e6393a0700 Add nogo support to go_binary and go_test targets.
Updates #3374

PiperOrigin-RevId: 328378700
2020-08-25 12:18:25 -07:00
Zach KoopmansandgVisor bot 92caeeacee Add benchmarks to continuous build.
PiperOrigin-RevId: 325892974
2020-08-10 14:52:36 -07:00
Zach KoopmansandgVisor bot 25cb3228a0 Port sysbench benchmark.
PiperOrigin-RevId: 324918229
2020-08-04 16:51:04 -07:00
Zach KoopmansandgVisor bot 50157a0317 Port nginx and move parsers to own package.
This change:
- Ports the nginx benchmark.
- Switches the Httpd benchmark to use 'hey' as a client.
- Moves all parsers to their own package 'tools'.

Parsers are moved to their own package because 1) parsing output of a command
is often dependent on the format of the command (e.g. 'fio --json'), 2) to
enable easier reuse, and 3) clean up and simplify actual running benchmarks
(no TestParser functions and ugly sample output in benchmark files).

PiperOrigin-RevId: 324144165
2020-07-30 21:17:45 -07:00
Zach KoopmansandgVisor bot e619833e2c Port redis benchmark
PiperOrigin-RevId: 323381964
2020-07-27 10:01:45 -07:00