A BOSH release containing benchmarking tools and utilities to setup the performance testing for the gorouter and TCP router.
This release will deploy:
- a static backend app that returns 1kB of static data by default (configurable using
gostatic.response_size
property) - a VM for running the load test
- processes that populate the routing table for both routers with test data
- Fetch release repo
mkdir -p ~/workspace
cd ~/workspace
git clone https://github.com/cloudfoundry-incubator/routing-perf-release.git
cd routing-perf-release/
./scripts/update
- Automate
$GOPATH
and$PATH
setup
This BOSH release doubles as a $GOPATH
. It will automatically be set up for you if you have direnv installed.
direnv allow
If you do not wish to use direnv, you can simply source
the .envrc
file in
the root of the release repo. You may manually need to update your $GOPATH
and $PATH
variables as you switch in and out of the directory.
-
Install and start BOSH on AWS.
-
Upload the latest AWS Trusty Go-Agent stemcell to BOSH. You can download it first if you prefer.
bosh upload stemcell https://bosh.io/d/stemcells/bosh-aws-xen-hvm-ubuntu-trusty-go_agent
-
Make sure you have NATS and gorouter deployed. The
http_route_populator
job will need gorouter listening on NATS to populate the routing table with routes pointing to the static backend. -
Make sure you have Routing API and TCP Router deployed. The
tcp_route_populator
will require the Routing API in order to have TCP routes pointing to the static backend.NOTE: The
routing_api.auth_disabled
property should be set totrue
since the tcp_route_populator does not support grabbing a UAA token for authentication.
-
Clone this repo; see Get the code.
-
Create and upload the release
cd ~/workspace/routing-perf-release/
./scripts/update
bosh create release
bosh -n upload release
-
Fill out the cloud-config file and the deployment manifest with the proper values.
-
Update the cloud-config on your director. Beware that support for using v2 manifests on the same director as v1 manifest deployments is supported after BOSH v257.
bosh update cloud-config manifests/cloud-config-aws.yml
- Deploy the release
bosh -n -d manifests/perf.yml deploy
This assumes you have running CF and Routing Release deployments running on BOSH Lite and that BOSH Lite is updated to a recent version that can support v2 manifest and v1 manifest deployments.
You can follow the above instructions with this cloud-config and deployment manifest Verify that the parameters in the deployment manifest are correct and simply BOSH deploy.
If you are deploying this release on any other IaaS's, you can update the
cloud-config with the correct
cloud_properties
. For more information, refer to the
BOSH documentation.
Deploy performance release on your environment. Run the below command
bosh run errand throughputramp
Errand will upload CPU stats and performance results to an S3 bucket specified in the manifest.
-
If you have not already done so, download this repo to your local machine.
-
Install Docker locally.
-
Verify the installation by running
docker -v
. -
Download CPU stats and performance test files from the S3 bucket specified in the above section. Save these files into the
src/jupyter_notebook
folder in your localrouting-perf-release
repo. -
Rename CPU stats file to
cpuStats.csv
and performance test file toperfResults.csv
. Currently the notebook is configured to look for files with these names. Keep track of what the file names were before to provide a reference point for multiple investigations. -
Run the below command to start the Docker container. Replace
PATH_TO_ROUTING_PERF_RELEASE
with the actual path to this repo on your local machine. The-v LOCAL_DIR:CONTAINER_DIR
command will mount a local directory on your machine to a volume located atCONTAINER_DIR
inside this Docker container.docker run -it -p 8888:8888 -v PATH_TO_ROUTING_PERF_RELEASE/src/jupyter_notebook:/home/jovyan/work jupyter/scipy-notebook
-
The
docker
command will present a token URL that you should copy/paste into a browser to start the notebook session. For example:... [I 19:17:28.023 NotebookApp] The Jupyter Notebook is running at: http://[all ip addresses on your system]:8888/?token=1ce634bd85e4101a74d4114880642381e4f7244af7843093 [I 19:17:28.023 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 19:17:28.023 NotebookApp] Copy/paste this URL into your browser when you connect for the first time, to login with a token: http://localhost:8888/?token=1ce634bd85e4101a74d4114880642381e4f7244af7843093
-
Click on the file named
Performance_Data.ipynb
. -
Click on the title menu
Cell
and click onRun All
to regenerate the notebook outputs. -
To compare the current data set with another follow these instructions
- Add CPU stats and performance results to folder $routing-perf-release-path/src/jupyter_notebook/
- Rename CPU stats file to
old_cpuStats.csv
and performance test file toold_perfResults.csv
. - Go to the Notebook server page and update variable
compareDatasets
toTrue
and rerun all the cells
- If you have problem connecting to
localhost:8888
, you could add the-network=host
flag to the above Docker command. You will have to use the IP of the Docker host instead oflocalhost
to connect to the Notebook server. To obtain the IP address of the Docker host, run the commanddocker-machine ls
.