Laravel for Rust vs php-fpm, Octane, FrankenPHP and artisan serve

Measured 2026-12-03 (SAST) on a 4 core mini PC. All five setups ran in one session, each alone in a Docker container capped at 2 CPUs and 1 GB, against the same MySQL 8.4 database (a small kanban app: about 130 tasks, 6 projects, 480 history rows). The PHP side is a real Laravel 13 app with Filament installed, opcache on, artisan optimize run, production mode (PHP 8.5 for php-fpm, 8.4 for the FrankenPHP based setups). The Rust side is the saapp ported to Laravel for Rust 0.1.4 (beta), release build. php-fpm mirrors a typical Laravel Forge production server: nginx, unix socket, pm = static with 8 children, opcache 512 MB, no timestamp checks. Octane runs on FrankenPHP with 4 workers; artisan serve runs with 4 workers. Load from wrk: 2 s warm-up, then 5 s at 1, 32 and 128 connections. Memory is the container working set read from its cgroup every 100 ms. Green cells are the best value in each row. One run, expect about ±10%.

The six endpoints

Identical in both apps: hello returns plain text; json returns a small static object; task loads one row through the ORM; tasks loads 50 rows with a belongs-to relation eager loaded and returns them as JSON; stats runs four count queries; write loads one row and updates it through the ORM (model events fire).

Rust vs php-fpm, reads at 32 connections30× to 220×
Rust vs php-fpm, ORM write5×
Rust vs Octane, reads9× to 74×
Lowest memory under loadRust and php-fpm, about 70 MiB

Throughput at 32 connections

Requests per second

1 connection (one user, sequential)

EndpointRustphp-fpmOctaneFrankenPHPartisan serveRust vs php-fpm
hello (plain text)7,98113151712110161×
json (static)7,77313052612010160×
task (1 row)2,93084.229271.772.835×
tasks (50 rows + projects)1,06134.237.627.831.031×
stats (4 counts)1,24876.825268.168.716×
write (ORM update)34265.215657.259.25×

32 connections

EndpointRustphp-fpmOctaneFrankenPHPartisan serveRust vs php-fpm
hello (plain text)26,068119507104115219×
json (static)25,723132476111134195×
task (1 row)7,98311631084.080.169×
tasks (50 rows + projects)2,51229.934.124.226.384×
stats (4 counts)2,94197.632375.490.830×
write (ORM update)54210334785.578.05×

128 connections

EndpointRustphp-fpmOctaneFrankenPHPartisan serveRust vs php-fpm
hello (plain text)28,955125481106107232×
json (static)26,545116529101144230×
task (1 row)4,81810837475.084.745×
tasks (50 rows + projects)2,49826.932.625.927.293×
stats (4 counts)2,94684.531182.012035×
write (ORM update)53312931773.778.24×

Latency (ms)

Median at 1 connection

EndpointRustphp-fpmOctaneFrankenPHPartisan serveRust vs php-fpm
hello (plain text)0.127.51.87.99.265×
json (static)0.127.51.87.99.163×
task (1 row)0.3111.53.413.712.938×
tasks (50 rows + projects)0.8728.726.235.631.833×
stats (4 counts)0.7212.63.714.313.617×
write (ORM update)2.915.06.017.015.95×

p99 at 1 connection

EndpointRustphp-fpmOctaneFrankenPHPartisan serveRust vs php-fpm
hello (plain text)0.3110.53.811.014.434×
json (static)0.3010.13.410.916.834×
task (1 row)0.7615.35.920.421.420×
tasks (50 rows + projects)1.736.433.844.042.821×
stats (4 counts)1.522.27.419.623.215×
write (ORM update)5.322.110.924.426.24×

Median at 32 connections

EndpointRustphp-fpmOctaneFrankenPHPartisan serveRust vs php-fpm
hello (plain text)1.128471.3317291251×
json (static)1.224277.4308218208×
task (1 row)3.924910540239465×
tasks (50 rows + projects)12.21,0309381,3101,12084×
stats (4 counts)10.132410342735732×
write (ORM update)58.528981.83834075×

p99 at 32 connections

EndpointRustphp-fpmOctaneFrankenPHPartisan serveRust vs php-fpm
hello (plain text)3.0362100380424123×
json (static)3.036099.3374405121×
task (1 row)7.745014948550458×
tasks (50 rows + projects)21.61,3601,0901,4601,85063×
stats (4 counts)21.045715250449722×
write (ORM update)82.24661494845296×

Median at 128 connections

EndpointRustphp-fpmOctaneFrankenPHPartisan serveRust vs php-fpm
hello (plain text)4.21,0302831,1501,200246×
json (static)4.61,1002601,220783240×
task (1 row)26.09293271,6701,48036×
tasks (50 rows + projects)49.91,04083384394521×
stats (4 counts)41.71,5204261,42094936×
write (ORM update)2379013871,7001,5004×

p99 at 128 connections

EndpointRustphp-fpmOctaneFrankenPHPartisan serveRust vs php-fpm
hello (plain text)9.41,1903151,3801,360126×
json (static)10.11,1903071,3801,430118×
task (1 row)47.41,5904891,7901,71034×
tasks (50 rows + projects)65.91,9201,9902,0001,96029×
stats (4 counts)80.81,6105121,8001,81020×
write (ORM update)2801,1105101,8001,8604×

Memory

Per server (container working set)

ServerIdleAfter warm-upPeak under load5 s after loadImage
Rust32 MiB35 MiB70 MiB62 MiB206 MB
php-fpm50 MiB66 MiB71 MiB67 MiB792 MB
Octane224 MiB227 MiB225 MiB221 MiB895 MB
FrankenPHP53 MiB51 MiB73 MiB69 MiB895 MB
artisan serve98 MiB101 MiB113 MiB108 MiB895 MB

Rust's figure includes its 20 MB binary mapped from disk, which the kernel counts or not depending on recent use (12 MiB idle in yesterday's run, 32 MiB today, same image). Its private memory at idle is 7 MiB. PHP's figure includes the workers and, for php-fpm, nginx. Image sizes are the built containers, not runtime memory.

Peak MiB during each load run, 32 connections

EndpointRustphp-fpmOctaneFrankenPHPartisan serve
hello (plain text)37.065.022561.0106
json (static)37.066.021463.0107
task (1 row)44.067.021568.0107
tasks (50 rows + projects)59.069.021568.0109
stats (4 counts)60.069.021773.0109
write (ORM update)55.068.021571.0109

Peak MiB during each load run, 128 connections

EndpointRustphp-fpmOctaneFrankenPHPartisan serve
hello (plain text)40.067.022067.0106
json (static)40.067.022165.0106
task (1 row)58.069.022470.0111
tasks (50 rows + projects)70.071.021673.0109
stats (4 counts)66.070.022171.0109
write (ORM update)66.069.022270.0113

Efficiency: requests per second per MiB, 32 connections

EndpointRustphp-fpmOctaneFrankenPHPartisan serve
hello (plain text)704.51.82.31.71.1
json (static)695.22.02.21.81.3
task (1 row)181.41.71.41.20.7
tasks (50 rows + projects)42.60.40.20.40.2
stats (4 counts)49.01.41.51.00.8
write (ORM update)9.91.51.61.20.7

Reading it

Caveats: the PHP app boots Filament on every request, so a bare Laravel install would narrow the gap on hello and json. Single run on a machine that was also running other services. Laravel for Rust is a beta; numbers may change between releases.