2015年9月9日水曜日

Load Test of PHP require performance with PHP 5.6, PHP 7

Orange: H2O + PHP 7 (RC1)
RedH2O + PHP 5.6
Blue: Nginx + PHP 5.6

Spredsheet:
https://docs.google.com/spreadsheets/d/1XBqaxzJWtYQ1z28qHnUgoVOj2WVCypVeL0DaNQCkmcQ/edit?usp=sharing

Build Environment:
Amazon Linux AMI 2015.03.1 (HVM), SSD Volume Type - ami-1c1b9f1c
c4.xlarge + EBS (General Purpose SSD) 100GB

Load Test Description:
index.php has some require. and required file has only return ture.
# cat index.php
<?php
print 1;
require '/var/h2o/require1.php';
require '/var/h2o/require2.php';
require '/var/h2o/require3.php';
require '/var/h2o/require4.php';

# cat require1.php
<?php
return true;
Add require to index.php, make require file and do Apache Bench by this load test script.
https://gist.github.com/takeshiyako2/f8d8c6e1fc87dd6bd920

Note that:
Maybe, this test has noise, because I use cloud. so please confirm that with your own eyes.