Sorry, you need to enable JavaScript to visit this website.

Nightly Builds: Zend PHP Environment Setup

This page describes the details of software environment configuration for the platform used to run Zend PHP based workloads. Information about hardware platform setup can be found here.

Workload execution

Our main intention was to be able to highlight daily performance trends of PHP engine only (usually with deltas <1% from one day to another). We focused strictly on isolating as much as possible PHP in a way ensuring good reproducibility of measurements. In concequence the measurement environment is not really matching production environments as the target is mainly addressing measurements stability and reproducibility.

Content Management Workloads: WordPress, Drupal, MediaWiki

As stated above we tried to reduce the bias caused by the influence and latencies induced by the other components of the LAMP stack, so we used the following setup:

  • single thread runs of php-cgi
  • optimized lightweight backend database server (MariaDB) running on the same station
  • both php-cgi and MariaDB server are assigned to fixed cores using taskset (this reduces run to run variations caused by cache access latency variations when processes migrate from a core to another)
  • no HTTP server involved
  • IO is quite small (almost no network IO and good caching of SSD storage accesses).


For now we use a simple scenario invoking only the index.php default page of the web site; although we are tempted to think this is a light test the truth is that the default page calls other scores of PHP pages generating quite complex runs. A typical measurement session has the following steps:

  • 2 warm-up runs: taskset 4 php-cgi -T1000 /path/to/workload/index.php
  • 5 measured runs: taskset 4 php-cgi -T10000 /path/to/workload/index.php
  • Average and Relative Standard Deviation (Standard Deviation/Average) are aggregated from the measured performance (expressed in fetches/second)

Synthetic Benchmarks: mandelbrot, bench, micro_bench

These are PHP intensive computing micro-benchmarks:


The measurements are performed similar to content management workloads runs:

  • 2 warm-up runs: taskset 4 php-cgi -T1 /path/to/micro-benchmark.php
  • 5 measured runs: taskset 4 php-cgi -T1 /path/to/micro-benchmark.php
  • Average and Relative Standard Deviation (Standard Deviation/Average) are aggregated from the measured performance (expressed in seconds)

LAMP Stack configuration

  • Linux OS: CentOS 7.1 on 64bits
  • Apache/Nginx: not used for now
  • MySQL: MariaDB v5.5
  • PHP: Zend PHP 7 (sources downloaded from

Enable Huge Pages in CentOS

PHP has good performance benefits if the engine code is loaded in huge pages. Here is a guide on how to configure HugePages in order to have the OS support for Huge pages: (some minor changes are needed for CentOS) 

MariaDB Configuration

After default installation my.cnf file was configured according with hints from "fast connection + small set of queries + disconnect" section.

Zend PHP 7

This is the procedure we used for building PHP7 from sources (build with GCC 4.8):

./configure \
  --with-apxs2 \
  --with-libdir=lib64 \
  --enable-fpm \
  --disable-phpdbg \
  --enable-mbstring \
  --enable-zip \
  --enable-bcmath \
  --enable-pcntl \
  --enable-ftp \
  --enable-exif \
  --enable-calendar \
  --enable-sysvmsg \
  --enable-sysvsem \
  --enable-sysvshm \
  --enable-wddx \
  --enable-soap \
  --enable-shmop \
  --enable-sockets \
  --with-curl \
  --with-mcrypt \
  --with-iconv \
  --with-gmp \
  --with-gd \
  --with-pdo-pgsql \
  --with-jpeg-dir=/usr \
  --with-png-dir=/usr \
  --with-zlib-dir=/usr \
  --with-xpm-dir=/usr \
  --with-freetype-dir=/usr \
  --enable-gd-native-ttf \
  --enable-gd-jis-conv \
  --with-openssl \
  --with-pdo-mysql=mysqlnd \
  --with-gettext=/usr \
  --with-zlib=/usr \
  --with-bz2=/usr \
  --with-recode=/usr \

make install

Specific PHP tunings in php.ini file:

; Enable opcache extension

; Reduce error reporting overhead
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = Off

; This is needed for running Drupal via php-cgi
cgi.force_redirect = 0


Workloads Setup

WordPress 4.2.2: After downloading the package follow default setup rules as documented here:


MediaWiki 1.23.9: Default setup was obtained based on these indications:


Drupal 7.36: We followed default installation steps (from 1 to 4) for Drupal with MySQL as described here:

Random content was added based on the steps bellow:

1. Install drush (

2. Install drush extensions in Drupal

cd /path/to/drupal # web site folder
sudo drush en devel
sudo drush en devel_generate
3. Generate random content
sudo drush genc 10 10 --kill # Warning: --kill will delete all existing content



Intel technologies' features and benefits depend on system configuration and may require enabled hardware, software or service activation. Performance varies depending on system configuration.