1. Computers
  2. Display Drivers
  3. Graphics Cards
  4. Memory
  5. Motherboards
  6. Processors
  7. Software
  8. Storage
  9. Operating Systems


Facebook RSS Twitter Twitter Google Plus


Phoronix Test Suite

OpenBenchmarking.org

Benchmarking The Performance Of PHP 5.5

Free Software

Published on 08 April 2013 06:07 PM EDT
Written by Michael Larabel in Free Software
1 Comment

With version 5.5 of the common PHP server-side language due for release soon, here's some interesting benchmarks showing off the performance of PHP 5.5 compared to the earlier 5.4, 5.3, and 5.2 releases of this popular scripting language.

PHP 5.5 is a major release to this programming language update that's due out soon. Aside from introducing the new Zend Opcache extension by default, it also adds in an array_column() function, various bug-fixes, support for non-scalar Iterator keys in the foreach() function, PCRE 8.32, and tons of bug-fixes and other improvements.

For some initial benchmarking of PHP 5.5, the performance of some common Phoronix Test Suite operations were compared. With the Git code it's as simple as PHP_BIN=/location/to/php phoronix-test-suite debug-self-test to run several tests of common Phoronix Test Suite code-paths and to time their completion.

The debug-self-test command isn't meant for benchmarking per se like the rest of the Phoronix Test Suite itself, but mostly is a utility for stressing common Phoronix Test Suite code-paths of the automated testing framework itself and not the actual benchmarks you generally see on Phoronix. It's just testing the framework that allows for the benchmarking to happen with timing (and unit testing) operations like listing available tests/suites, rendering SVG graph files from the XML result file sample data, converting result data into a text dump, and other common tasks.

With the Phoronix Test Suite being around 58k lines of PHP code as a command-line application, it's a good stress of PHP itself with it extensively using objects, the various file I/O functions, string functions, the Document Object Model (DOM), and many other core PHP functions.

With using PHP 5.5.0 Beta 2, PHP 5.4.13, PHP 5.3.23, and PHP 5.2.17, the Phoronix Test Suite performance for its basic commands were compared.

The test system was running Ubuntu 12.04.2 LTS with the Linux 3.5 kernel. The hardware was an Apple MacBook Pro with Intel Core i5 520M processor.

With this test, each operation was carried out three times and the time averaged. For all testing, the same php.ini configuration file was used as was the PHP builds all happening from source using the same configure switches. Here's the raw PHP 5.5 performance data:
PHP 5.5.0beta2
DETAILED_SYSTEM_INFO:          0.104 seconds
LIST_AVAILABLE_TESTS:          0.379 seconds
LIST_AVAILABLE_SUITES:         43.937 seconds
INFO:                          0.014 seconds
CLONE_OPENBENCHMARKING_RESULT: 122.711 seconds
RESULT_FILE_TO_TEXT:           13.044 seconds
DIAGNOSTICS:                   0.003 seconds
DUMP_POSSIBLE_OPTIONS:         0.003 seconds

ELAPSED TIME:                  540.585 seconds
PEAK MEMORY USAGE:             35.75 MB
PEAK MEMORY USAGE (emalloc):   32.607 MB

PHP 5.4.13
DETAILED_SYSTEM_INFO:          0.100 seconds
LIST_AVAILABLE_TESTS:          0.369 seconds
LIST_AVAILABLE_SUITES:         33.157 seconds
INFO:                          0.014 seconds
CLONE_OPENBENCHMARKING_RESULT: 123.430 seconds
RESULT_FILE_TO_TEXT:           12.614 seconds
DIAGNOSTICS:                   0.002 seconds
DUMP_POSSIBLE_OPTIONS:         0.001 seconds

ELAPSED TIME:                  509.066 seconds
PEAK MEMORY USAGE:             34.5 MB
PEAK MEMORY USAGE (emalloc):   32.776 MB


PHP 5.3.23
DETAILED_SYSTEM_INFO:          0.105 seconds
LIST_AVAILABLE_TESTS:          0.351 seconds
LIST_AVAILABLE_SUITES:         31.991 seconds
INFO:                          0.013 seconds
CLONE_OPENBENCHMARKING_RESULT: 127.437 seconds
RESULT_FILE_TO_TEXT:           13.217 seconds
DIAGNOSTICS:                   0.003 seconds
DUMP_POSSIBLE_OPTIONS:         0.002 seconds

ELAPSED TIME:                  519.356 seconds
PEAK MEMORY USAGE:             49.5 MB
PEAK MEMORY USAGE (emalloc):   48.687 MB

PHP 5.2.17
DETAILED_SYSTEM_INFO:          0.245 seconds
LIST_AVAILABLE_TESTS:          0.599 seconds
LIST_AVAILABLE_SUITES:         49.462 seconds
INFO:                          0.154 seconds
CLONE_OPENBENCHMARKING_RESULT: 121.991 seconds
RESULT_FILE_TO_TEXT:           12.858 seconds
DIAGNOSTICS:                   0.375 seconds
DUMP_POSSIBLE_OPTIONS:         0.186 seconds

ELAPSED TIME:                  557.61 seconds
PEAK MEMORY USAGE:             52.25 MB
PEAK MEMORY USAGE (emalloc):   51.025 MB
From these results, the performance of PHP has improved between PHP 5.2 and 5.5 The debug-self-test operation took a total of 540 seconds on PHP 5.5.0 Beta 2 while on PHP 5.2 it came in at 557 seconds. However, between PHP 5.4.13 and 5.5.0 Beta 2 the performance has regressed, going from 509 seconds to 540 seconds. The main slowdown appears to be with the phoronix-test-suite list-available-suites command taking noticeably more time on PHP 5.5. The list-available-suites command mostly comes down to mostly file I/O and string-related calls.

When it comes to the peak memory usage (as measured through the memory_get_peak_usage() call), the memory usage on PHP 5.4/5.5 is also much better than its predecessors. The peak memory usage during this test was about 35MB while on PHP 5.2/5.3 it was hovering around 50MB.

While PHP 5.4 offered lots of performance improvements over PHP 5.3, in a stock configuration it seems to be less of an impact, at least for the real-world workload produced by the Phoronix Test Suite PHP framework. More tests looking at toggling and tuning the new Zend Optimizer+ and other tunables will be saved for another article. The performance of Facebook's HipHop HHVM will also be tested in a separate article soon.

About The Author
Michael Larabel is the principal author of Phoronix.com and founded the web-site in 2004 with a focus on enriching the Linux hardware experience and being the largest web-site devoted to Linux hardware reviews, particularly for products relevant to Linux gamers and enthusiasts but also commonly reviewing servers/workstations and embedded Linux devices. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics hardware drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated testing software. He can be followed via and or contacted via .
Latest Linux Hardware Reviews
  1. Rosewill RS-MI-01: An Ultra Low-Cost Mini-ITX Chassis
  2. D-Link DCS-2330L HD Wireless Network Camera
  3. Gigabyte AM1M-S2H
  4. AMD's New Athlon/Semprons Give Old Phenom CPUs A Big Run For The Money
Latest Linux Articles
  1. AMD Catalyst 14.4 Brings Few Linux Performance Improvements
  2. The Performance Of Fedora 20 Updated
  3. Clang Fights GCC On AMD's Athlon AM1 APU With Jaguar Cores
  4. Ubuntu 14.04 LTS vs. Oracle Linux vs. CentOS vs. openSUSE
Latest Linux News
  1. Fedora 21 To Get A Playground, New Features
  2. PC-BSD Is Developing Its Own Desktop Environment
  3. Valve Is Bringing VOGL To Windows & Working On Regression Tests
  4. Canonical Is Taking Over Linux 3.13 Kernel Maintenance
  5. Google Web Designer Is Now Natively Available On Linux
  6. Ubuntu 14.10 Is Codenamed The Utopic Unicorn
  7. Audacious 3.5 Lightweight Audio Player Released
  8. Steam Updated For Ubuntu 14.04 LTS, SteamOS
  9. DNF 0.5 Yum Replacement Now Supports Groups
  10. Red Hat Enterprise Linux 7.0 Is Looking Fantastic
  11. Intel Is Launching An Interesting Bay Trail NUC Next Week
  12. Another X.Org EVoC Proposed For OpenGL 4+ Tests
Latest Forum Discussions
  1. The GNOME Foundation Is Running Short On Money
  2. Linux Kernel Developers Fed Up With Ridiculous Bugs In Systemd
  3. The Most Amazing OpenGL Tech Demo In 64kb
  4. Announcing radeontop, a tool for viewing the GPU usage
  5. HTPC-upgrade advice: AMD Richland A8-7600 or Kaveri A10-6700T ???
  6. New card. Open source drivers only.
  7. Script for Fan Speed Control
  8. Torvalds Is Unconvinced By LTO'ing A Linux Kernel