-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fuzz: H1 capture fuzz test performance improvements. (#10281)
The main contribution in this patch is a "persistent" mode for h1_capture_[direct_response_]fuzz_test. Based on profiling observations, we were spending 30-40% of time rebuilding the Envoy server on each run. This is avoided by having fuzzer variants that makes the integration test proxy static. There is a downside of this approach, since different fuzz invocations may interfere with each other. Ideally we would snapshot/fork for each fuzz invocation, but Envoy doesn't like forking once events/dispatchers are up. So, for now we have two builds of the fuzzer, where we trade fuzz engine efficacy for fuzz target performance. Some form of VM snapshotting would be ideal. The persistent mode takes the H1 replay tests to O(10 exec/s) from O(1 exec/s). This is still not great. Doing some perf analysis, it seems that we're spending the bulk of time in ASAN. Running the fuzzers without ASAN gives O(100 exec/s), which seems reasonable for a LPM-style integration test. It's future work why ASAN is so expensive, ASAN advertises itself as generally a 2x slowdown. There is also some secondary effect from the cost of mocks used in the integration test TCP client (mock watermark buffer), this speaks to our general mocking performance problem in fuzzing. In addition to the above, this patch has an optimization for the direct response fuzzer (don't initiate upstream connections) and a --config=plain-fuzz mode for peformance work without confounding ASAN. Risk level: Low Testing: Manual bazel runs of the fuzzers, observing exec/s. Signed-off-by: Harvey Tuch <htuch@google.com>
- Loading branch information
Showing
7 changed files
with
67 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters