Giter Club home page Giter Club logo

php-framework-benchmarks's Introduction

This project attempts to benchmark the baseline level of responsiveness of various PHP frameworks to discover the overhead involved in using each one.

The previous version of this project is at Google Code here: http://code.google.com/p/web-framework-benchmarks/. This version supersedes the previous version at Google Code.

Benchmarking Server Setup

Hardware and Operating System

The benchmark is performed on an Amazon EC2 m1.large instance. This provides 4 EC2 compute units and 7.5 G of RAM. The operating system is a stock 64-bit Ubuntu 10.10 image provided by http://alestic.com/.

Installation instructions for EC2 are beyond the scope of this project. Once you have an EC2 account at Amazon and the appropriate EC2 shell tools, run a new instance under your own username ...

ec2-run-instances ami-08f40561 --instance-type=m1.large -k {$USERNAME}

... then SSH into the running instance to continue.

ssh -i /path/to/id_rsa-{$USERNAME} ubuntu@{$SUBDOMAIN}.amazonaws.com

Software Installation

After the instance comes online, issue the following shell commands to install and configure the necessary packages.

# become root
sudo -s

# initial updates
aptitude update
aptitude dist-upgrade -y

# apache2, php, git, siege
aptitude install -y \
    apache2-mpm-prefork \
    libapache2-mod-php5 \
    php-apc \
    php5-cli \
    php5-common \
    php5-dev \
    git-all \
    siege

# install http_load
cd /root
wget http://www.acme.com/software/http_load/http_load-12mar2006.tar.gz
tar -zxvf http_load-12mar2006.tar.gz
cd http_load-12mar2006
make
make install

# modify the Apache DocumentRoot for the project checkout
cd /etc/apache2/sites-available/
sed -i "s~/var/www~/var/www/htdocs~" default
sed -i "s/AllowOverride None/AllowOverride All/" default

# turn off mod_deflate, turn on mod_rewrite
a2dismod deflate
a2enmod rewrite

# replace /var/www with the project checkout
rm -rf /var/www
git clone git://github.com/pmjones/php-framework-benchmarks.git /var/www

# switch to /var/www and open all permissions (e.g. for caches)
cd /var/www
chmod -R 777 htdocs

# create real config file from the distribution copy
cp config.ini-dist config.ini

# restart apache
/etc/init.d/apache2 restart

Now you can run the benchmarks against a series of framework targets.

Running the Benchmarks

At the EC2 command line, issue the following:

cd /var/www
./bench/ab target/all.ini

(There are other bench scripts and target files as well.)

The script will do the following for each framework target:

  • Restart Apache
  • Browse to the framework once to warm up the cache
  • Benchmark the the framework 5 times for 1 minute each with 10 users
  • Log the results

At the end of the benchmarking, the script will collate the logged benchmark results and print a report on the framework responsiveness.

php-framework-benchmarks's People

Stargazers

 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.