Prerequisites
- Download and install jmeter: http://jmeter.apache.org
#!/bin/bash # get source from an apache mirror wget http://supergsego.com/apache//jmeter/binaries/apache-jmeter-3.1.tgz # verify the md5 local_md5=`md5 -q apache-jmeter-3.1.tgz` remote_md5=`curl https://www.apache.org/dist/jmeter/binaries/apache-jmeter-3.1.tgz.md5 | cut -f 1 -d ' '` cat apache-jmeter-3.1.tgz.md5 if [ "$local_md5" != "$remote_md5" ] then echo "md5's do not match" exit else echo "congratulations md5s match" fi # untar it. tar xvfz apache-jmeter-3.1.tgz # move it sudo mv apache-jmeter-3.1 /usr/local/apache-jmeter-3.1 # link it sudo ln -s /usr/local/apache-jmeter-3.1/bin/jmeter /usr/bin/jmeter
Document Your Instance Setup
(Perhaps we might want to think about a yaml config file in case we want to build some tooling)
- Instance Specs
- OS (type and version)
- Processor Speed
- Number of Cores
- Disk Type (SSD or Hard Disk)
- RAM
- IOPS (if applicable)
- any java configuration options (e.g. -Xmx 2G)
- binary configuration: local, network, S3
- is virtual?
- is test runner on the same machine?
- Database Specs
- type (mysql, postgresql, aurora, etc)
- deployment: local or remote
- if remote
- processor speed
- processor count
- RAM
- if RDS, RDS type (e.g. db1.small)
Generate Test Data
Download the test scripts and read the README (https://github.com/fcrepo4-labs/fcrepo4-jmeter)
git clone https://github.com/fcrepo4-labs/fcrepo4-jmeter.git
Run a test. For example:
jmeter -Dfedora_4_server=localhost -Dfedora_4_context=rest -Dfilesize_min=0 -Dfilesize_max=4096 -Dbinary_threads=1 -n -t /path/to/fcrepo4-jmeter/fedora.jmx
(dbernstein: I was not able to run this test without modifying the fedora.jmx file - namely I had to make jmeter continue on error.)
Generate Graphs Based on Your Test Data
Clone the Performance Analysis Project
git clone https://github.com/fcrepo4-labs/fcrepo_perf_analysis.git
Download and install the latest version of R (3.4.0)
Follow steps outlined in https://github.com/fcrepo4-labs/fcrepo_perf_analysis
dbernstein: I was unable to get past the column checking step
Rscript 01-check-jmeter-log.r ~/code/performance-tests/2017-03-16/log/perf.log Header check: Expected: 12 encountered: 10 [1] "Unexpected number of input fields!"