Name: diego-perf-release
Owner: Cloud Foundry
Description: Used to deploy multiple app-pushers and fezzik-runners for performance-testing a Diego(+Runtime) deployment
Created: 2015-02-05 22:14:42.0
Updated: 2018-04-23 13:46:18.0
Pushed: 2018-02-07 22:29:07.0
Homepage: null
Size: 1237
Language: Shell
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a release to measure the performance of Diego. See the proposal here.
Note: To deploy with a cf-deployment style manifest using BOSH 2.0, include the ops file under operations/add-diego-perf-release.yml
. You will also need to modify the ops file to use your local copy of diego-perf-release
:
e:
th: /releases/-
lue:
name: diego-perf-release
url: file://<path-to-workspace>/diego-perf-release
version: create
Deploy diego-release, cf-release. To deploy this release, create a BOSH deployment manifest with as many pusher instances as you want to use for testing.
bosh ssh stress_tests 0
/var/vcap/jobs/caddy/bin/1_fezzik
multiple times./var/vcap/packages/fezzik/src/github.com/cloudfoundry-incubator/fezzik/reports.json
The steps mentioned in the previous section are automated by the
./cedar_script
. The script will push 10 batches of apps each in its own
spaces. Details below on how to run it:
Run cd /var/vcap/jobs/cedar/bin
.
Run the following command to run the experiment:
dar_script
To resume the experiment from the n
th batch (where n
is a number from 1
to 10
), add n
as an argument to the script. For example, to run from the
fourth batch:
dar_script 4
Note: if the spaces are already present from a previous run of the script, the script will not fail and will instead continue to push to those existing spaces. Manually delete spaces or the entire CF org if required.
This script also then pushes an extra batch of apps via cedar
and monitors them with arborist
. The file
/var/vcap/sys/log/cedar/cedar-arborist-output.json
contains the results from that cedar
run, and the file
/var/vcap/sys/log/arborist/arborist-output.json
contains the arborist
results.
The script will also output the min/max timestamp for each batch in
/var/vcap/data/cedar/min-<batch#>.json
and
/var/vcap/data/cedar/max-<batch#>.json
.
./scripts/generate-deployment-manifest
and deploy diego-perf-release
with the generated manifest. If on BOSH-Lite, you can use
./scripts/generate-bosh-lite-manifests
.bosh ssh
to SSH to the cedar
VM in the cf-warden-diego-perf
deployment.sudo su
.t the CF CLI on the PATH
rt PATH=/var/vcap/packages/cf-cli/bin:$PATH
rget CF and create an org and space for the apps
pi api.bosh-lite.com --skip-ssl-validation
uth admin admin
reate-org o
reate-space cedar -o o
arget -o o -s cedar
var/vcap/packages/cedar
/vcap/packages/cedar/bin/cedar \
1 \
2 \
yload /var/vcap/packages/cedar/assets/temp-app \
nfig /var/vcap/packages/cedar/config.json \
main bosh-lite.com \
cd src/code.cloudfoundry.org/diego-stress-tests/cedar/assets/stress-app
.assets/temp-app
by running GOOS=linux GOARCH=amd64 go build -o ../temp-app/stress-app
.cd ../..
to change back to src/code.cloudfoundry.org/diego-stress-tests/cedar
.go build
to build the cedar
binary.dar -n <number_of_batches> -k <max_in_flight> [-tolerance <tolerance-factor>]
Run ./cedar -h
to see the list of options you can provide to cedar.
One of the most important options is a JSON-encoded config file that
provides the manifest paths for the different apps being pushed. The
default config.json
can be found
here.
Note: Arborist depends on a successful cedar
run, as it uses the output file from
cedar
as an input.
Run the example below to monitor apps on a BOSH-Lite installation:
./scripts/generate-bosh-lite-manifests
and deploy diego-perf-release
with the generated manifest.bosh ssh
to SSH to the cedar
VM in the cf-warden-diego-perf
deployment.sudo su
.arborist
from a tmux session:art a new tmux session
/vcap/packages/tmux/bin/tmux new -s arborist
var/vcap/packages/arborist
/vcap/packages/arborist/bin/arborist \
-file <cedar-output-file> \
ation 10m \
Level info \
uest-interval 10s \
ult-file output.json &
tmux
session, send Ctrl-b d
.tmux
session, run /var/vcap/packages/tmux/bin/tmux attach -t arborist
.cd to src/code.cloudfoundry.org/diego-stress-tests/arborist
Build the arborist binary with go build
.
Run the following to start a test:
borist \
-file <cedar-output-file> \
ation 10m \
Level info \
uest-interval 10s \
ult-file output.json
Arborist has the following usage options:
pp-file string
path to json application file
omain string
domain where the applications are deployed (default "bosh-lite.com")
uration duration
total duration to check routability of applications (default 10m0s)
ogLevel string
log level: debug, info, error or fatal (default "info")
equest-interval duration
interval in seconds at which to make requests to each individual app (default 1m0s)
esult-file string
path to result file (default "output.json")
The team has created three grafana dashboards that include graphs to monitor interesting metrics. Below are the names and description of each one of those dashboards:
aggregation/bosh_influxdb_dashboard.json
System metrics (i.e. cpu usage, system load and disk usage) across the entire cluster
aggregation/diego_influxdb_dashboard.json
Diego metrics, e.g. bbs api latency, bbs requests/s, etc.
aggregation/golang_stats_influxdb_dashboard.json
Golang metrics (i.e. number of goroutines, gc pause, etc.)
To import any/all of those dashboards. From the home page:
Home
(or the dashboard search dropdown)Import
CTRL+S
or the drive icon next to the dashboard dropdown)See grafana export/import doc for more info
To export a dashboard after editing it, do the following:
Manage dashboard
button (the gear icon next to the dashboard dropdown)Export
See grafana export/import doc for more info
perfchug
is a tool that ships with the diego-perf-release. It takes log
output from cedar, bbs and auctioneer, processes it, and converts it into
something that can be fed into InfluxDB.
To use perfchug
locally:
cd <path>/diego-perf-release/src/code.cloudfoundry.org/diego-stress-tests/perfchug
.go install
to build the executable.$PATH
.Once on the $PATH
, supply lager-formatted logs to perfchug
on its stdin.
For example:
/var/vcap/sys/log/cedar/cedar.stdout.log | perfchug
will emit influxdb-formatted metrics to stdout.
We wrote a script to automate the entire process. The script does the following:
In order to use the script, you need to do the following:
You are on a jump box inside the deployment, e.g. director
You are bosh targeted to the right environment
You have perfchug, veritas and bosh on your PATH
Create a new directory and cd
into it. This will be used as the working
directory for the script. BOSH logs will be downloaded in this directory.
From that directory run:
h/to/diego_results.sh \
://url.to.influxdb:8086 \
h/to/diego/manifest \
h/to/perf/manifest \
th/to/output/file]\
The output file will contain one line per query. All query results are valid
json. If there are no data points in InfluxDB, e.g. no failures, InfluxDB will
result an empty result, e.g. {"results":[]}
If the output file parameter is provided, diego_results.sh
will also trigger
a post-processing script that condenses the output into metrics.csv
, a more
human-readable format.
/etc/mtab
on the influxdb vm to add the new filesystem from /dev/sd[a-z]
to /var/vcap/store2
.mkdir -p /var/vcap/store2 && cd /var/vcap/store2 && mount /dev/sd[a-z]1
./var/vcap/store
-> /var/vcap/store2
in /var/vcap/jobs/influxdb
.monit restart influxdb
.These tests are meant to be run against a real IaaS. However, it is possible to
run them against BOSH-Lite during development. A deployment manifest template is
in templates/bosh-lite.yml
. Use
spiff to merge it with a
director_uuid
stub.