View on GitHub

RadarGun

Benchmarking framework for data grids and distributed caches

Using scripts

Scripts

RadarGun ships with a number of scripts to help you deploy the framework across a cluster of nodes. The scripts currently require:

Important

worker.sh

Designed to be run for each worker on local or remote machine, to start up the local worker process. Workers need to be aware of the IP[:port] of the main. Main must be running before starting a worker.

main.sh

Designed to be run on the main node, in order to start the main

dist.sh

Starts the main and then it starts all the workers. For starting the main it relies on main.sh, for workers it relies on worker.sh. In order to be able to start the workers, it ssh on workers’s machine and runs worker.sh there. Addresses of workers can be specified in environment.sh.

Using the dist.sh script on a single machine (Fedora 22)

  1. Create virtual interfaces (eth0 is some physical interface)

     sudo ifconfig eth0:1 192.168.11.101 netmask 255.255.255.0
     sudo ifconfig eth0:2 192.168.11.102 netmask 255.255.255.0
     sudo ifconfig eth0:3 192.168.11.103 netmask 255.255.255.0
    
  2. Make sshd listen on the new interfaces - add the following to /etc/ssh/sshd_config

     ListenAddress 192.168.11.101
     ListenAddress 192.168.11.102
     ListenAddress 192.168.11.103
    
  3. Create aliases - add the following to /etc/hosts

     192.168.11.101 test1
     192.168.11.102 test2
     192.168.11.103 test3
    
  4. Restart everything

     sudo systemctl restart network
     sudo systemctl restart sshd
    
  5. If you don’t have a passwordless ssh key, you will need to create one. Make sure you set an output file other than ~/.ssh/id_rsa, so as not to override your old key. Other than that, just hit enter.

     ssh-keygen -t rsa
    
  6. Test it

     ssh -i --path to the passwordless key-- test1 echo "Interfaces set up"
    
  7. Finally, run Radargun with the dist.sh script

     sh bin/dist.sh test1 test2 test3
    

environment.sh

Used by other scripts to set environment variables (JVM options, binding addresses of workers , etc.).

detect_worker_ips.sh

This script helps detect worker IPs if workers are assigned IPs using DHCP and no proper domain is set. Assumes that the script is run on the main node, and the main node runs the DHCP server which the workers use to obtain IPs. Worker names are added to /etc/hosts so that workers can easily be reached after running this script. This script shall be run manually, i.e. it is not called implicitly by main.sh or worker.sh.

ssh_key_acceptor.sh

Useful when workers are reprovisioned each time, e.g., using PXE boot and kickstart. This adds each worker’s SSH keys/fingerprints to the local user’s SSH known_hosts file so that the user isn’t prompted to accept the fingerprint the first time an SSH connection is made.

clean.sh

Will kill all RadarGun processes and remove all files created by RadarGun, including results folder.

report.sh

This script will generate reports from serialized data (generated by serialized reporter), according to provided benchmark configuration file. Mostly useful during reporter deveploment in order to avoid running the whole benchmark on each test execution.

tests.sh

Will execute all benchmars in conf folder one after another.

includes.sh

Utility script storing functions shared by other scripts.