All Projects → kenjis → Php Framework Benchmark

kenjis / Php Framework Benchmark

PHP Framework Benchmark

Projects that are alternatives of or similar to Php Framework Benchmark

php-framework-benchmark
php framework benchmark (include laravel、symfony、silex、lumen、slim、yii2、tastphp etc)
Stars: ✭ 17 (-98.36%)
Mutual labels:  benchmark, php-framework
Grade
Track Go benchmark performance over time by storing results in InfluxDB
Stars: ✭ 41 (-96.04%)
Mutual labels:  benchmark
Thinker
更自由的PHP框架,使用Composer进行包管理
Stars: ✭ 10 (-99.03%)
Mutual labels:  php-framework
Segmentation Networks Benchmark
Evaluation framework for testing segmentation networks in Keras
Stars: ✭ 34 (-96.71%)
Mutual labels:  benchmark
Bench Scripts
A compilation of Linux server benchmarking scripts.
Stars: ✭ 873 (-15.65%)
Mutual labels:  benchmark
Nvidia libs test
Tests and benchmarks for cudnn (and in the future, other nvidia libraries)
Stars: ✭ 36 (-96.52%)
Mutual labels:  benchmark
Blink
A high performance web framework and application server in PHP.
Stars: ✭ 837 (-19.13%)
Mutual labels:  php-framework
Java Sec Code
Java web common vulnerabilities and security code which is base on springboot and spring security
Stars: ✭ 1,033 (-0.19%)
Mutual labels:  benchmark
Torch Scan
Useful information about PyTorch modules (FLOPs, MACs, receptive field, etc.)
Stars: ✭ 41 (-96.04%)
Mutual labels:  benchmark
Serverless Faas Workbench
FunctionBench
Stars: ✭ 32 (-96.91%)
Mutual labels:  benchmark
Core
Runn Me! core library
Stars: ✭ 31 (-97%)
Mutual labels:  php-framework
Sysbench Docker Hpe
Sysbench Dockerfiles and Scripts for VM and Container benchmarking MySQL
Stars: ✭ 14 (-98.65%)
Mutual labels:  benchmark
Okutama Action
Okutama-Action: An Aerial View Video Dataset for Concurrent Human Action Detection
Stars: ✭ 36 (-96.52%)
Mutual labels:  benchmark
Laravel Blog 5.6.5
Learning Laravel by making simple Blog
Stars: ✭ 12 (-98.84%)
Mutual labels:  php-framework
Tbcf
Tracking Benchmark for Correlation Filters
Stars: ✭ 1,011 (-2.32%)
Mutual labels:  benchmark
Sequelize Benchmark
Benchmarks for sequelize
Stars: ✭ 8 (-99.23%)
Mutual labels:  benchmark
Esnext Benchmarks
Benchmarks comparing ESNext features to their ES5 and various pre-processor equivalents
Stars: ✭ 28 (-97.29%)
Mutual labels:  benchmark
Rtb
Benchmarking tool to stress real-time protocols
Stars: ✭ 35 (-96.62%)
Mutual labels:  benchmark
Dana
Test/benchmark regression and comparison system with dashboard
Stars: ✭ 46 (-95.56%)
Mutual labels:  benchmark
Pibench
Benchmarking framework for index structures on persistent memory
Stars: ✭ 46 (-95.56%)
Mutual labels:  benchmark

PHP Framework Benchmark

This project attempts to measure minimum overhead (minimum bootstrap cost) of PHP frameworks in the real world.

So I think the minimum applications to benchmark should not include:

  • cost of template engine (HTML output)
  • cost of database manipulation
  • cost of debugging information

Components like Template engine or ORM/Database libraries are out of scope in this project.

Benchmarking Policy

This is master branch.

  • Install a framework according to the official documentation.
  • Use the default configuration.
    • Don't remove any components/configurations even if they are not used.
    • With minimum changes to run this benchmark.
  • Set environment production/Turn off debug mode.
  • Run optimization which you normally do in your production environment, like Composer's --optimize-autoloader.
  • Use controller or action class if a framework has the functionality.

Some people may think using default configuration is not fair. But I think a framework's default configuration is an assertion of what it is. Default configuration is a good starting point to know a framework. And I can't optimize all the frameworks. Some frameworks are optimized, some are not, it is not fair. So I don't remove any components/configurations.

But if you are interested in benchmarking with optimization (removing components/configurations which are not used), See optimize branch.

If you find something wrong with my code, please feel free to send Pull Requests. But please note optimizing only for "Hello World" is not acceptable. Building fastest "Hello World" application is not the goal in this project.

Results

Benchmarking Environment

  • CentOS 6.8 64bit (VM; VirtualBox)
    • PHP 5.6.30 (Remi RPM)
      • Zend OPcache v7.0.6-dev
    • Apache 2.2

Hello World Benchmark

These are my benchmarks, not yours. I encourage you to run on your (production equivalent) environments.

(2017/02/14)

Benchmark Results Graph

framework requests per second relative peak memory relative
siler-0.6 2,069.69 20.3 0.25 1.0
kumbia-1.0-dev 1,753.60 17.2 0.29 1.2
staticphp-0.9 1,665.28 16.3 0.27 1.1
phalcon-2.0 1,618.39 15.9 0.26 1.1
tipsy-0.10 1,376.97 13.5 0.32 1.3
fatfree-3.5 965.16 9.5 0.41 1.7
ci-3.0 753.09 7.4 0.42 1.7
nofuss-1.2 667.24 6.5 0.40 1.6
slim-3.0 550.43 5.4 0.61 2.5
bear-1.0 502.52 4.9 0.73 3.0
lumen-5.1 415.57 4.1 0.85 3.5
yii-2.0 410.08 4.0 1.32 5.4
ze-1.0 403.34 4.0 0.75 3.1
cygnite-1.3 369.12 3.6 0.71 2.9
fuel-1.8 344.26 3.4 0.63 2.6
silex-2.0 342.81 3.4 0.78 3.2
phpixie-3.2 267.24 2.6 1.25 5.1
aura-2.0 233.54 2.3 0.88 3.6
cake-3.2 174.91 1.7 1.95 7.9
zf-3.0 133.87 1.3 2.24 9.1
symfony-3.0 131.50 1.3 2.18 8.9
laravel-5.3 101.94 1.0 2.83 11.5

Note(1): All the results are run on php with phalcon.so and ice.so. If you don't load phalcon.so or ice.so, the rps except for Phalcon or Ice probably increase a bit.

Note(2): This benchmarks are limited by ab performance. See #62.

How to Benchmark

If you want to benchmark PHP extension frameworks like Phalcon, you need to install the extenstions.

Install source code as http://localhost/php-framework-benchmark/:

$ git clone https://github.com/kenjis/php-framework-benchmark.git
$ cd php-framework-benchmark
$ bash setup.sh

Run benchmarks:

$ bash benchmark.sh

See http://localhost/php-framework-benchmark/.

If you want to benchmark some frameworks:

$ bash setup.sh fatfree-3.5/ slim-3.0/ lumen-5.1/ silex-1.3/
$ bash benchmark.sh fatfree-3.5/ slim-3.0/ lumen-5.1/ silex-1.3/

Linux Kernel Configuration

I added below in /etc/sysctl.conf

# Added
net.netfilter.nf_conntrack_max = 100000
net.nf_conntrack_max = 100000
net.ipv4.tcp_max_tw_buckets = 180000
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_fin_timeout = 10

and run sudo sysctl -p.

If you want to see current configuration, run sudo sysctl -a.

Apache Virtual Host Configuration

<VirtualHost *:80>
  DocumentRoot /home/vagrant/public
</VirtualHost>

References

Other Benchmarks

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].