From bc962b3f502a2e0901147c4b3cc6e69b61412b8a Mon Sep 17 00:00:00 2001 From: "Herman J. Radtke III" Date: Fri, 16 Jun 2017 14:19:23 -0700 Subject: [PATCH] Update benchmarking info - change to using packet.net bare metal servers - create install scripts to automate the benchmarking --- benchmark/README.md | 10 ++++++++-- benchmark/install-wrk.sh | 12 ++++++++++++ benchmark/install.sh | 12 ++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 benchmark/install-wrk.sh create mode 100644 benchmark/install.sh diff --git a/benchmark/README.md b/benchmark/README.md index 832ecdc..baf84a0 100644 --- a/benchmark/README.md +++ b/benchmark/README.md @@ -2,9 +2,9 @@ ## Environment -Bare metal Rackspace instance Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz 20 physical cores 40 hyperthreaded CPU +[Bare metal Type 2 Packet instance 24 Physical Cores @ 2.2 GHz (2 × E5-2650 v4)](https://www.packet.net/bare-metal/) - * https://www.rackspace.com/en-us/cloud/servers/onmetal/specs see Compute specs + * The [Techempower benchmarks](https://www.techempower.com/benchmarks/#section=environment&hw=ph&test=fortune) use a [2.0 GHz processor](http://ark.intel.com/products/53574/Intel-Xeon-Processor-E7-4850-24M-Cache-2_00-GHz-6_40-GTs-Intel-QPI) on the Dell R910 Need to add at least one server to the proxy prior to testing: @@ -12,15 +12,21 @@ Need to add at least one server to the proxy prior to testing: $ curl -vvv -H "Host: www.example.com" localhost:8687/servers -d '{"url":"http://127.0.0.1:12345"}' ``` +Note: For a real test, should be running on its own server. + ## Tests * techempower plaintext benchmark per https://www.techempower.com/benchmarks/#section=code ### wrk +To run the plaintext benchmark using `wrk`: + * example command: `wrk --connection 100 --duration 30s --threads 4 http://localhost:8080` * techempower plaintext benchmark: `wrk -c 256 -t 32 -d 15 -s ./benchmark/pipeline.lua --latency http://localhost:8080 -- 16` +Note: For a real test, `wrk` should be running on its own server. + ### Flamegraphs Add the following to `Cargo.toml`: diff --git a/benchmark/install-wrk.sh b/benchmark/install-wrk.sh new file mode 100644 index 0000000..ac0f9e6 --- /dev/null +++ b/benchmark/install-wrk.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +apt-get update +apt-get install build-essential libssl-dev git -y +cd /root +git clone https://github.com/wg/wrk.git +cd /root/wrk +make +cp wrk /usr/local/bin +git clone https://github.com/hjr3/weldr.git diff --git a/benchmark/install.sh b/benchmark/install.sh new file mode 100644 index 0000000..929f492 --- /dev/null +++ b/benchmark/install.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +apt-get update +apt-get install gcc libssl-dev pkg-config capnproto git -y +cd /root +curl https://sh.rustup.rs -sSf | sh -s -- -y +. /root/.cargo/env +git clone https://github.com/hjr3/weldr.git +cd /root/weldr +cargo build --release