Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #119 from hjr3/benchmark
Browse files Browse the repository at this point in the history
Update benchmarking info
  • Loading branch information
hjr3 authored Jun 30, 2017
2 parents 8a2f989 + bc962b3 commit aa0aa59
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
10 changes: 8 additions & 2 deletions benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,31 @@

## 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:

```
$ 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`:
Expand Down
12 changes: 12 additions & 0 deletions benchmark/install-wrk.sh
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions benchmark/install.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit aa0aa59

Please sign in to comment.