Test Environment
- Local Configuration
(Win 10 i7-8565U 16G)(Nginx 1.15.11)(MySQL 5.5.62) - Cloud Server
(1 Core 2G)(Nginx 1.16.1)(MySQL 5.5.62)
Performance Results
| Software | Database Model | Local QPS | Cloud Server QPS |
|---|---|---|---|
Laravel 6.3.0 (with session) |
ORM | 12.11 | 5.15 |
Laravel 6.3.0 (with session) |
PDO | 13.85 | 5.31 |
| Laravel 6.3.0 | ORM | 13.06 | 5.69 |
| Laravel 6.3.0 | PDO | 13.98 | 5.89 |
| Slim 4.3.0 | PDO | 41.04 | 43.65 |
| PHP 7.1.9 Native | PDO | 52.85 | 51.81 |
Notes
- All tests performed using ApacheBench (ab) with command:
ab -n 1000 -c 100 [test_url] - ORM vs PDO comparison shows raw database driver performance differences
- Session handling significantly impacts Laravel’s performance
- Slim framework demonstrates ~3x performance advantage over Laravel in these tests
- Native PHP implementation achieves the highest QPS as expected