Table of Contents

Request for Comments: Better benchmarks for PHP

Contributors: Add your name to the bottom of the page

Replace PHP's current bench.php with a benchmark suite from which meaningful performance measurements can be taken.

Introduction

PHP's current bench.php is a micro-benchmark which tests a number of language features. Since it does not behave like a 'real' application, it cannot provide meaningful information about the performance of PHP in general. This RFC will attempt to replace bench.php with a better suite of benchmarks, upon which meaningful performance measurements can be taken.

What are we trying to measure

Performance impact of changes to PHP or its libraries

We need to be able to see how changes to the Zend engine affect real programs, not synthetic benchmarks.

Realistic profiling

We need realistic applications and workloads in order to get useful profiling info. Useful to know which pieces of the VM need optimization.

Performance improvement of other PHP implementations relative to PHP

There is a need for other PHP implementations to be able to measure their performance against the Zend engine.

What do we want in a benchmark

Benchmark applications should be straightforward to deploy, preferably with no manual setup, even when multiple machines are required.

Basically we would like to see real-world apps tweaked so that automated deployment and testing is easy and simple. Each benchmark should also have a set of representative workload inputs (e.g. from real-world log files).

Benchmarks should be licensed under a liberal open-source license, so that they can be “safely” customized and redistributed for our needs.

The plan

THIS IS NOT SET IN STONE - FEEDBACK ESPECIALLY NEEDED

What benchmarks currently exist

Microbenchmarks

Large benchmarks

Applications which could make good web-app benchmarks

Not much so far

Applications which could make good CLI benchmarks

Porting other benchmark suites

Benchmarking in other languages

* Python: http://code.google.com/p/unladen-swallow/wiki/ProjectPlan#Performance

* Ruby: http://groups.google.com/group/ruby-benchmark-suite

Desired Benchmark Features

For command-line apps applications

*TODO*

For web-apps

Status

Completed Tests

Still unfinished

Collaboration

CVS

The benchmarks are hosted in CVS: http://cvs.php.net/viewvc.cgi/php-benchmarks/. Checkout with 'cvs -d :pserver:cvsread@cvs.php.net:/repository co php-benchmarks'. More info at http://php.net/anoncvs.php

If you don't have karma, you won't be able to edit the wiki, or commit benchmarks to the suite. Since this takes time, please do not wait for karma to contact us. If you have contributions to make, we'd like hear them, and can make changes to the wiki on your behalf.

To get karma, please fill in the form on http://php.net/cvs-php.php. In the text box, fill in 'Contributing benchmarks'. For 'Type of initial karma' enter 'PHP Group'. Please email Nuno (email below) when you have submitted the form. Once you get karma, please add your username (and other details, if missing), to the contributors section below.

Discussion

Discussion on the QA mailing list (php-qa@lists.php.net). Please include [benchmarks] in the subject.

Contributors

Add your name here if you want to help.