Skip to content

Tutorial: Benchmarking Raddit

yungsters edited this page Sep 14, 2010 · 9 revisions

Raddit is a clone of Digg for use in Berkeley RAD Lab cloud computing research. This tutorial will help you use Rain to benchmark multiple servers running the Raddit web application.

Requirements

  • A “web server” with Rails (v2.3.4), Thin (a lightweight Rails server), and Nginx (a load balancer).
  • A “database server” with MySQL.
  • A “workload server” with Java.

Deploying Raddit

  1. SSH into the “application server”.
  2. Checkout Raddit from the repository.
    • Newer versions of Git support the --recursive argument.
      1. Use: git clone --recursive git://github.com/yungsters/raddit.git
    • Older versions of Git do not support the --recursive argument.
      1. First, clone the repository: git clone git://github.com/yungsters/raddit.git
      2. Change to the cloned directory: cd raddit
      3. Checkout the submodules: git submodule update --init
  3. If you haven’t already, change to the Radddit directory: cd raddit
  4. Use a text editor to update the production database configuration in config/database.yml.
  5. Create the production database: rake db:create RAILS_ENV=production
  6. Load the database schema: rake db:schema:load RAILS_ENV=production
  7. Start the Thin servers: thin start -e production -s <number of Rails servers>
  8. Configure Nginx to point to localhost on the Rails ports.

Running the Benchmark

  1. git clone git://github.com/yungsters/rain-workload-toolkit.git
  2. cd rain-workload-toolkit
  3. ant package
  4. ant package-raddit
  5. java -Xmx1g -Xms256m -cp "rain.jar:workloads/raddit.jar" radlab.rain.Benchmark <path to Rain JSON configuration file>

See the instructions on the Getting Started page for more information.

Clone this wiki locally