(Image source: Photo by Jason Dent on Unsplash)
This PHP container was developed, adjusted, and maintained together with a friend and colleague. The original design purpose was to combine php-fpm with nginx, creating a simplified environment that facilitates the operation of Laravel in cloud-native environments, AWS Fargate, Amazon ECS, etc. We use it as a base for teaching and implementing various projects, comparative testing, including comparisons of x86/ARM computing architectures, and more.
With the update and release of new PHP versions, we plan to share the performance tests comparisons we’ve conducted every quarter (if not forgotten) with fellow PHP enthusiasts.
- If you find this container project helpful, we look forward to you applying it to your projects, sharing it with friends, or giving this project a star ⭐ :)
- The released Docker image is available at Docker Hub: dwchiang/nginx-php-fpm
- The original Dockerfiles are placed at GitHub: dwchiang/nginx-php-fpm
- If you are using this container in any project, we welcome you to share your application with us, and let us know how many resources should be planned for this container project.
- If you’re also interested in the topic Running Laravel on Amazon ECS, you might find these resources useful:
- This self-paced online workshop with complete architecture diagrams: GitHub: dwchiang/laravel-on-aws-ecs-workshops,
- Or my presentation, which includes slides and a recording: Running Laravel/PHP Container Applications on AWS (AWS Builders Day Taiwan 2022)
Preview
Contents
Our PHP Benchmarks
- Machine
- Apple M1, 16 GB
- Variables
- OS
- Debian 11 bullseye, Debian 12 bookworm
- alpine3.17, alpine3.18
- PHP
- 8.4.0beta4, 8.4.0beta3, 8.4.0alpha4, 8.4.0alpha2, 8.4.0alpha1
- 8.3.11, 8.3.10, 8.3.9, 8.3.8, 8.3.7, 8.3.6, 8.3.4, 8.3.3, 8.3.2, 8.3.0
- 8.2.23, 8.2.22, 8.2.21, 8.2.20, 8.2.19, 8.2.18, 8.2.17, 8.2.16, 8.2.15, 8.2.13, 8.2.12, 8.2.11, 8.2.10, 8.2.9
- 8.1.29, 8.1.28, 8.1.27, 8.1.26, 8.1.25, 8.1.24, 8.1.23, 8.1.22
- 8.0.30, 8.0.29, 8.0.28, 8.0.27, 8.0.26
- 7.4.33, 7.4.32, 7.4.30, 7.4.29, 7.4.28
- 7.3.33, 7.3.32, 7.3.31, 7.3.30, 7.3.29
- nginx
- 1.24.0
- 1.25.4
- 1.26.2
- 1.27.1
- OS
- Test
- 1 Thread
- 1 Conn
- 60s
- Test 10 times of each variable combination (N = 10)
Organizing this kind of comparative data, from designing the environment, implementation, measurement, data collection, organization, chart making, to summarizing and inducing, is quite brain-intensive but also very interesting. If there’s anything in the content that can be adjusted or improved, or if you have suggestions for other measurement methods, please feel free to leave a comment or open an issue for us. We greatly appreciate it.
Test 01 phpinfo
RPS (phpinfo)
- RPS = Requests per second. More is Better.
Latency (phpinfo)
- Latency. Fewer is Better.
History
Reference
PHP 8.4
- TBD for Migration
PHP 8.3
PHP 8.2
- PHP: Migrating from PHP 8.1.x to PHP 8.2.x - Manual
- PHP 8.2 Performance Continues Moving In The Right Direction - Phoronix by Michael Larabel on 2022-05-23
PHP 8.1
- PHP: Migrating from PHP 8.0.x to PHP 8.1.x - Manual
- PHP 8.1 Performance Is Continuing To Improve With Early Benchmarks - Phoronix