When updating code in Envoy it is often useful to try to reason about the performance impact of a change you are making. It is handy to have a suite of scripts to help measure performance. These scripts should not be used for absolute benchmarking.
When running performance benchmarks, some basic principles can help give the best results:
- Run performance benchmarks on optimized builds:
bazel build -c opt source/exe:envoy-static
. - Don't let any other software run on the machine at the same time.
- Make sure the configuration you are testing actually hits the code you are editing.
- If you are testing code changes, interleave runs between an envoy-static built from master and one built from your branch.
Siege is a github project that efficiently pummels an HTTP 1.1 server with requests and measures overall throughput, error rate, and max latency. It is also available pre-built on Debian and possibly other distros.
You must have python3 and the siege binary installed, either from the distro or by building from https://github.com/JoeDog/siege.
sudo apt-get install siege
cd ../envoy
bazel build -c opt source/exe:envoy-static
mv bazel /tmp/envoy.experimental
git checkout master
bazel build -c opt source/exe:envoy-static
mv bazel /tmp/envoy.clean