Implementation
Laravel
Laravel 13.42.0 · PHP · Full-stack frameworks · ranked
Scores
| Category | Position | Score | ± |
|---|---|---|---|
| Hello world | 14 | 0.006* | ±21.7% |
| Database | 14 | 0.055*† | ±20.9% |
| Application | 14 | 0.017* | ±31.6% |
| Memory (high-water mark) | 6 | 0.76 | ±0.4% |
| Startup | 1–13 | 1.00≈ | ±0.0% |
Runner CPUs: EPYC 9V74, EPYC 9V74, EPYC 7763
Settings
- Runtime
- PHP 8.5.12 with OPcache
- Server
- Nginx with PHP-FPM, as in Laravel's deployment documentation
- Workers
- Nginx: BENCH_WORKERS (2) workers; PHP-FPM: pm = static with pm.max_children = DB_POOL_SIZE (16) processes
- Database layer
- Eloquent (pdo_pgsql); a new connection for every request, no persistent PDO connections (Laravel's default; at most 16 open, one per PHP-FPM process)
- Templates
- Blade
- Logging
- none (Nginx and PHP-FPM access logs off; Laravel logs warnings and errors to stderr)
- Dependency source
- –
- Status
- measured
Notes
- Structure: Nginx (2 workers) and PHP-FPM (16 processes) share the 2 vCPUs
- Database: opens a new PostgreSQL connection for every request (PHP-FPM; Laravel's documentation does not recommend persistent PDO connections)
Application endpoints: mechanisms
- Validation
- whereNumber('id') (404); $request->validate (422; integer:strict for the JSON body; an invalid form post is redirected back, 302)
- CSRF
- token (built-in): PreventRequestForgery (web group): Sec-Fetch-Site same-origin accepted, else the session's _token field; 419
- Session store
- cookie-encrypted (built-in): session guard with the cookie session driver (Laravel's default database driver is not used: decision 4, pending; see README.md)
Tier 1 endpoints
| Endpoint | req/s | vs Axum | Efficiency (req/CPU-s) | p99 (ms) | Errors | Limits |
|---|---|---|---|---|---|---|
| /text | 725 (672–792) | 0.01 | 362 | 186.83 | 0 | |
| /json | 713 (667–789) | 0.01 | 357 | 190.45 | 0 | |
| /db-single | 232 (217–238) | 0.02 | 235 | 578.78 | 0 | PostgreSQL-bound 15/15 |
| /html | 570 (528–617) | 0.00 | 285 | 239.04 | 0 | |
| /queries?queries=20 | 139 (132–150) | 0.17 | 99 | 937.90 | 0 | PostgreSQL-bound 15/15 |
| /fortunes | 244 (224–250) | 0.01 | 214 | 552.87 | 0 | PostgreSQL-bound 15/15 |
| GET /world/{id} | 229 (211–237) | 0.02 | 224 | 580.07 | 0 | PostgreSQL-bound 15/15 |
| GET /worlds | 201 (182–206) | 0.02 | 180 | 659.64 | 0 | PostgreSQL-bound 15/15 |
| POST /form | 476 (438–526) | 0.01 | 239 | 281.61 | 0 | |
| GET /me | 220 (207–228) | 0.03 | 174 | 601.99 | 0 | PostgreSQL-bound 15/15 |
| /updates?queries=20 | 100 (92–107) | 0.28 | 64 | 1,322.64 | 0 | PostgreSQL-bound 15/15 |
| PUT /world/{id} | 217 (200–225) | 0.02 | 197 | 607.14 | 0 | PostgreSQL-bound 15/15 |
Measured versions
laravel/framework13.42.0nginx1.26.3php8.5.12symfony/http-foundation8.1.11symfony/http-kernel8.1.11
Runner jobs
| Job | CPU model | Rounds | Status |
|---|---|---|---|
| 1 | EPYC 9V74 | 5 | measured |
| 2 | EPYC 9V74 | 5 | measured |
| 3 | EPYC 7763 | 5 | measured |