Tilly The Coder
Tilly The Coder
PHP 8.6.0 8.2.0 · Doctrine ORM 3.8.0 · PHP 8.6.0 #3 M1 Max · #1 €1.99 VPS

Symfony 8.2 + Doctrine Benchmarks

Tested across 4 isolated modes (FPM object, FrankenPHP worker object, scalar JIT-off, and scalar tracing-JIT) with Symfony 8.2's single built-in services_resetter lifecycle verified. Symfony crushed Laravel PHP even with full Doctrine entity hydration (3,100 vs. 600 RPS) — proving PHP itself wasn't the bottleneck — before topping out at 5,000 RPS behind Laravel Go (5,600) and Laravel Rust (6,750).

Test Hardware

10-core Apple Silicon (8P + 2E) · 32 GB RAM · MySQL 8.4 · PHP 8.6.0 · Go 1.27.4 · Rust 1.100.1

1 vCPU (Intel Xeon Gold 6142) · 1.9 GiB RAM · Ubuntu 26.04 LTS · PHP 8.6.0 · Go 1.27.4 · Rust 1.100.1

Peak Confirmed RPS

5,000 RPS

FrankenPHP Worker · Scalar + Tracing JIT

Confirm p50 / p95

14.3 / 54.0ms

Fails at 5,100 RPS

50 RPS Latency & RAM

2.57ms p50

137.5 MB total (137.5 MB app)

Cold Build Time

~2s

Composer autoload + Symfony prod container warmup

Peak Confirmed RPS

145 RPS

FrankenPHP Worker · Scalar + Tracing JIT

Confirm p50 / p95

10.9 / 80.5ms

Fails at 150 RPS

50 RPS Latency & RAM

6.06ms p50

138.2 MB total (138.2 MB app)

Cold Build Time

Seconds

Composer install + cache:warmup

All 4 Tested Configurations

Fixed-rate binary-search holds, confirmation latency, exact failure threshold, CPU split, and steady-state telemetry.

Inside Symfony 8.2 + Doctrine — Configuration Impact (Apple M1 Max (Local))

FrankenPHP Worker · Scalar + Tracing JIT
5,000 RPS
FrankenPHP Worker · Scalar (JIT Off)
4,700 RPS
FrankenPHP Worker · Doctrine Object
3,100 RPS
No Worker (FPM) · Doctrine Object
1,800 RPS

FrankenPHP Worker · Scalar + Tracing JIT

symfony-frankenphp-scalar-jit
FrankenPHP 1.14 / PHP 8.6 2-query Doctrine JOIN (HYDRATE_SCALAR) JIT: Tracing (64 MiB) 4 workers (max 500 req)

5,000 RPS

Confirmed twice · 0 fails

Confirmation Latency

14.3 / 54.0 ms

p50 / p95 · max 68 ms · 0.00% drops

Next Failing Step

5,100 RPS

1.51% drops · p95 178 ms

Steady 50 RPS Hold

2.57 / 9.0 ms

App+HTTP 14.1% · MySQL 3.4% CPU

Memory (50 RPS → Peak)

137.5 → 258.5 MB

App-only peak: 258.5 MB

CPU Split at Confirmed Ceiling (612% total)
App+HTTP 269.0% MySQL 84.1% k6 258.5%
Upstream-style 10→7,000 RPS ramp note: Best zero-failure 10s window scored 4,613.6 RPS at p50 319.0 ms (window drops: 19,264).
Inspect all 9 fixed-rate binary-search trials (12s holds)
Target RPS Result Delivered p50 p95 Drops HTTP Fail App / DB / k6 CPU RAM
2,500 PASS 2,499.2 0.76 ms 1.76 ms 0.00% 0 131% / 42% / 143% 147.3 MB
7,000 FAIL 4,867.6 303.96 ms 325.42 ms 29.07% 0 274% / 83% / 275% 256.4 MB
4,700 PASS 4,697.1 2.84 ms 10.41 ms 0.00% 0 250% / 79% / 248% 256.5 MB
5,800 FAIL 4,891.4 297.35 ms 319.65 ms 13.75% 0 272% / 82% / 287% 258.2 MB
5,200 FAIL 4,945.5 131.82 ms 282.35 ms 2.71% 0 275% / 87% / 281% 258.3 MB
4,900 PASS 4,898.1 6.91 ms 27.04 ms 0.00% 0 267% / 85% / 265% 258.4 MB
5,000 PASS 4,987.3 13.45 ms 46.91 ms 0.00% 0 269% / 84% / 264% 258.4 MB
5,100 FAIL 4,956.3 90.17 ms 178.45 ms 1.51% 0 271% / 85% / 267% 258.5 MB
5,000 PASS 4,993.0 14.34 ms 53.98 ms 0.00% 0 269% / 84% / 259% 258.5 MB

FrankenPHP Worker · Scalar (JIT Off)

symfony-frankenphp-scalar-nojit
FrankenPHP 1.14 / PHP 8.6 2-query Doctrine JOIN (HYDRATE_SCALAR) JIT: Disabled 4 workers (max 500 req)

4,700 RPS

Confirmed twice · 0 fails

Confirmation Latency

48.5 / 98.6 ms

p50 / p95 · max 154 ms · 0.43% drops

Next Failing Step

4,800 RPS

2.59% drops · p95 271 ms

Steady 50 RPS Hold

2.50 / 10.2 ms

App+HTTP 12.6% · MySQL 3.3% CPU

Memory (50 RPS → Peak)

125.2 → 249.8 MB

App-only peak: 249.8 MB

CPU Split at Confirmed Ceiling (618% total)
App+HTTP 282.0% MySQL 78.9% k6 257.5%
Inspect all 8 fixed-rate binary-search trials (12s holds)
Target RPS Result Delivered p50 p95 Drops HTTP Fail App / DB / k6 CPU RAM
2,000 PASS 1,999.4 0.90 ms 1.54 ms 0.00% 0 115% / 32% / 111% 138.1 MB
6,000 FAIL 4,642.1 316.14 ms 332.77 ms 20.73% 0 287% / 78% / 268% 248.8 MB
4,000 PASS 3,996.2 1.06 ms 6.00 ms 0.00% 0 236% / 67% / 222% 249.0 MB
5,000 FAIL 4,634.3 214.11 ms 329.44 ms 4.98% 0 285% / 79% / 259% 249.6 MB
4,500 PASS 4,495.0 4.17 ms 11.78 ms 0.00% 0 264% / 75% / 232% 249.6 MB
4,700 PASS 4,649.7 71.61 ms 99.78 ms 0.48% 0 281% / 79% / 249% 249.7 MB
4,800 FAIL 4,574.9 173.44 ms 270.85 ms 2.59% 0 282% / 78% / 262% 249.8 MB
4,700 PASS 4,653.6 48.51 ms 98.58 ms 0.43% 0 282% / 79% / 258% 249.8 MB

FrankenPHP Worker · Doctrine Object

symfony-frankenphp-object
FrankenPHP 1.14 / PHP 8.6 2-query Doctrine JOIN (entity hydration) JIT: Disabled 4 workers (max 500 req)

3,100 RPS

Confirmed twice · 0 fails

Confirmation Latency

6.0 / 13.9 ms

p50 / p95 · max 24 ms · 0.00% drops

Next Failing Step

3,200 RPS

0.70% drops · p95 139 ms

Steady 50 RPS Hold

2.78 / 7.0 ms

App+HTTP 16.8% · MySQL 3.0% CPU

Memory (50 RPS → Peak)

130.8 → 257.6 MB

App-only peak: 257.6 MB

CPU Split at Confirmed Ceiling (549% total)
App+HTTP 325.4% MySQL 51.9% k6 171.4%
Upstream-style 10→7,000 RPS ramp note: Best zero-failure 10s window scored 3,053.8 RPS at p50 489.1 ms (window drops: 16,531).
Inspect all 8 fixed-rate binary-search trials (12s holds)
Target RPS Result Delivered p50 p95 Drops HTTP Fail App / DB / k6 CPU RAM
1,500 PASS 1,499.5 1.52 ms 2.13 ms 0.00% 0 150% / 25% / 84% 135.4 MB
4,500 FAIL 3,082.3 478.63 ms 493.17 ms 28.83% 0 325% / 51% / 186% 249.6 MB
3,000 PASS 2,997.3 2.64 ms 7.97 ms 0.00% 0 310% / 49% / 162% 249.7 MB
3,700 FAIL 3,099.6 471.16 ms 492.84 ms 13.01% 0 335% / 53% / 186% 257.4 MB
3,300 FAIL 3,083.6 211.07 ms 375.80 ms 3.63% 0 327% / 53% / 184% 257.5 MB
3,100 PASS 3,096.6 6.31 ms 15.49 ms 0.00% 0 326% / 52% / 173% 257.5 MB
3,200 FAIL 3,133.3 66.07 ms 138.80 ms 0.70% 0 330% / 54% / 175% 257.5 MB
3,100 PASS 3,097.4 6.04 ms 13.86 ms 0.00% 0 325% / 52% / 171% 257.6 MB

No Worker (FPM) · Doctrine Object

symfony-fpm-object
PHP 8.6-FPM + Caddy gzip 2-query Doctrine JOIN (entity hydration) JIT: Disabled 4 static FPM workers

1,800 RPS

Confirmed twice · 0 fails

Confirmation Latency

6.2 / 23.9 ms

p50 / p95 · max 40 ms · 0.00% drops

Next Failing Step

1,850 RPS

293 HTTP fails

Steady 50 RPS Hold

3.77 / 7.3 ms

App+HTTP 23.7% · MySQL 2.9% CPU

Memory (50 RPS → Peak)

175.9 → 208.7 MB

App-only peak: 104.8 MB

CPU Split at Confirmed Ceiling (435% total)
App+HTTP 277.8% MySQL 54.9% k6 102.4%
Upstream-style 10→7,000 RPS ramp note: Best zero-failure 10s window scored 500.8 RPS at p50 3.0 ms (window drops: 0).
Inspect all 10 fixed-rate binary-search trials (12s holds)
Target RPS Result Delivered p50 p95 Drops HTTP Fail App / DB / k6 CPU RAM
400 PASS 400.0 2.47 ms 3.06 ms 0.00% 0 74% / 12% / 25% 182.0 MB
1,600 PASS 1,598.6 2.73 ms 8.35 ms 0.00% 0 249% / 50% / 99% 186.1 MB
3,600 FAIL 3,578.4 0.60 ms 87.74 ms 0.00% 23,318 298% / 56% / 136% 206.7 MB
2,600 FAIL 2,583.1 70.68 ms 85.00 ms 0.00% 10,202 278% / 56% / 116% 206.8 MB
2,100 FAIL 2,087.5 70.71 ms 81.72 ms 0.00% 3,588 278% / 56% / 107% 206.8 MB
1,850 FAIL 1,839.6 62.96 ms 76.91 ms 0.00% 293 267% / 56% / 107% 206.8 MB
1,700 PASS 1,698.9 3.50 ms 12.04 ms 0.00% 0 270% / 53% / 104% 207.0 MB
1,750 PASS 1,748.6 4.52 ms 15.15 ms 0.00% 0 268% / 55% / 105% 211.7 MB
1,800 PASS 1,797.6 9.09 ms 20.66 ms 0.00% 0 279% / 56% / 107% 208.7 MB
1,800 PASS 1,797.4 6.21 ms 23.90 ms 0.00% 0 278% / 55% / 102% 208.7 MB

Inside Symfony 8.2 + Doctrine — Configuration Impact (Euronodes €1.99/mo VPS)

FrankenPHP Worker · Scalar + Tracing JIT
145 RPS
FrankenPHP Worker · Scalar (JIT Off)
135 RPS
FrankenPHP Worker · Doctrine Object
90 RPS
No Worker (FPM) · Doctrine Object
45 RPS

FrankenPHP Worker · Scalar + Tracing JIT

symfony-frankenphp-scalar-jit
FrankenPHP 1.14 / PHP 8.6 2-query Doctrine JOIN (HYDRATE_SCALAR) JIT: Tracing (64 MiB) 4 workers (max 500 req)

145 RPS

Confirmed twice · 0 fails

Confirmation Latency

10.9 / 80.5 ms

p50 / p95 · max 174 ms · 0.00% drops

Next Failing Step

150 RPS

p95 143 ms

Steady 50 RPS Hold

6.06 / 16.9 ms

App+HTTP 11.2% · MySQL 5.5% CPU

Memory (50 RPS → Peak)

138.2 → 136.4 MB

App-only peak: 136.4 MB

CPU Split at Confirmed Ceiling (79% total)
App+HTTP 31.4% MySQL 14.7% k6 32.9%
Inspect all 9 fixed-rate binary-search trials (12s holds)
Target RPS Result Delivered p50 p95 Drops HTTP Fail App / DB / k6 CPU RAM
50 PASS 50.3 5.50 ms 15.04 ms 0.00% 0 11% / 5% / 13% 137.5 MB
100 PASS 100.3 7.01 ms 59.63 ms 0.00% 0 24% / 11% / 27% 133.1 MB
200 FAIL 171.9 413.26 ms 802.92 ms 14.67% 0 36% / 18% / 39% 149.6 MB
150 FAIL 150.3 25.63 ms 142.76 ms 0.06% 0 33% / 16% / 36% 153.5 MB
125 PASS 125.3 7.59 ms 60.39 ms 0.00% 0 27% / 13% / 30% 155.8 MB
135 PASS 135.6 12.01 ms 76.50 ms 0.00% 0 30% / 14% / 34% 145.9 MB
140 PASS 140.3 7.55 ms 39.70 ms 0.00% 0 28% / 15% / 32% 135.7 MB
145 PASS 145.3 10.75 ms 87.88 ms 0.00% 0 30% / 15% / 34% 136.4 MB
145 PASS 145.5 10.89 ms 80.45 ms 0.00% 0 31% / 15% / 33% 136.4 MB

FrankenPHP Worker · Scalar (JIT Off)

symfony-frankenphp-scalar-nojit
FrankenPHP 1.14 / PHP 8.6 2-query Doctrine JOIN (HYDRATE_SCALAR) JIT: Disabled 4 workers (max 500 req)

135 RPS

Confirmed twice · 0 fails

Confirmation Latency

16.0 / 95.5 ms

p50 / p95 · max 305 ms · 0.00% drops

Next Failing Step

140 RPS

p95 183 ms

Steady 50 RPS Hold

5.73 / 18.3 ms

App+HTTP 12.6% · MySQL 5.7% CPU

Memory (50 RPS → Peak)

127.3 → 130.2 MB

App-only peak: 130.2 MB

CPU Split at Confirmed Ceiling (81% total)
App+HTTP 33.9% MySQL 15.0% k6 32.2%
Inspect all 8 fixed-rate binary-search trials (12s holds)
Target RPS Result Delivered p50 p95 Drops HTTP Fail App / DB / k6 CPU RAM
50 PASS 50.3 5.31 ms 16.45 ms 0.00% 0 12% / 6% / 13% 128.4 MB
100 PASS 100.3 6.00 ms 19.31 ms 0.00% 0 23% / 10% / 23% 126.6 MB
200 FAIL 165.6 488.34 ms 897.06 ms 17.50% 0 39% / 19% / 35% 136.8 MB
150 FAIL 150.3 51.80 ms 137.37 ms 0.00% 0 36% / 17% / 37% 142.1 MB
125 PASS 125.3 8.56 ms 43.23 ms 0.00% 0 28% / 12% / 28% 149.2 MB
135 PASS 135.3 10.56 ms 63.00 ms 0.00% 0 31% / 14% / 31% 149.2 MB
140 FAIL 140.1 58.10 ms 183.31 ms 0.18% 0 37% / 18% / 34% 130.2 MB
135 PASS 135.3 16.04 ms 95.45 ms 0.00% 0 34% / 15% / 32% 130.2 MB

FrankenPHP Worker · Doctrine Object

symfony-frankenphp-object
FrankenPHP 1.14 / PHP 8.6 2-query Doctrine JOIN (entity hydration) JIT: Disabled 4 workers (max 500 req)

90 RPS

Confirmed twice · 0 fails

Confirmation Latency

12.9 / 61.0 ms

p50 / p95 · max 161 ms · 0.00% drops

Next Failing Step

95 RPS

p95 225 ms

Steady 50 RPS Hold

7.90 / 18.8 ms

App+HTTP 21.9% · MySQL 5.9% CPU

Memory (50 RPS → Peak)

129.8 → 129.6 MB

App-only peak: 129.6 MB

CPU Split at Confirmed Ceiling (68% total)
App+HTTP 35.9% MySQL 9.3% k6 22.6%
Inspect all 7 fixed-rate binary-search trials (12s holds)
Target RPS Result Delivered p50 p95 Drops HTTP Fail App / DB / k6 CPU RAM
50 PASS 50.3 6.79 ms 15.09 ms 0.00% 0 20% / 5% / 13% 130.2 MB
100 FAIL 100.3 20.00 ms 103.77 ms 0.00% 0 44% / 11% / 25% 126.3 MB
75 PASS 75.3 9.35 ms 33.27 ms 0.00% 0 32% / 8% / 19% 127.7 MB
85 PASS 85.3 10.67 ms 33.22 ms 0.00% 0 35% / 9% / 22% 127.2 MB
90 PASS 90.3 12.13 ms 35.87 ms 0.00% 0 37% / 9% / 22% 126.6 MB
95 FAIL 95.3 19.84 ms 224.95 ms 0.00% 0 43% / 11% / 25% 126.9 MB
90 PASS 90.3 12.92 ms 61.01 ms 0.00% 0 36% / 9% / 23% 129.6 MB

No Worker (FPM) · Doctrine Object

symfony-fpm-object
PHP 8.6-FPM + Caddy gzip 2-query Doctrine JOIN (entity hydration) JIT: Disabled 4 static FPM workers

45 RPS

Confirmed twice · 0 fails

Confirmation Latency

26.5 / 59.0 ms

p50 / p95 · max 157 ms · 0.00% drops

Next Failing Step

50 RPS

p95 302 ms

Steady 50 RPS Hold

52.97 / 282 ms

App+HTTP 58.4% · MySQL 9.8% CPU

Memory (50 RPS → Peak)

196.8 → 194.9 MB

App-only peak: 137.9 MB

CPU Split at Confirmed Ceiling (65% total)
App+HTTP 44.5% MySQL 7.3% k6 13.1%
Inspect all 7 fixed-rate binary-search trials (12s holds)
Target RPS Result Delivered p50 p95 Drops HTTP Fail App / DB / k6 CPU RAM
50 FAIL 50.3 64.21 ms 274.15 ms 0.00% 0 60% / 10% / 16% 196.9 MB
25 PASS 25.3 18.25 ms 46.27 ms 0.00% 0 22% / 4% / 8% 195.6 MB
50 FAIL 50.3 33.24 ms 302.07 ms 0.00% 0 50% / 8% / 14% 195.4 MB
35 PASS 35.3 20.63 ms 46.09 ms 0.00% 0 34% / 6% / 11% 194.4 MB
40 PASS 40.3 23.18 ms 57.02 ms 0.00% 0 39% / 7% / 12% 194.2 MB
45 PASS 45.3 26.13 ms 53.50 ms 0.00% 0 43% / 7% / 12% 194.9 MB
45 PASS 45.3 26.48 ms 58.99 ms 0.00% 0 45% / 7% / 13% 194.9 MB

Where Symfony 8.2 + Doctrine Sits vs. the Full Field

Highlighted bars belong to Symfony 8.2 + Doctrine. Click any row to jump directly to that framework’s deep-dive.

Actual Benchmark Source Code

The exact controller/handler code executed during the timed runs for Symfony 8.2 + Doctrine.

src/ChirpController.php (Supports object & scalar hydration)

102-line Symfony controller toggling HYDRATE_OBJECT (3,100 RPS) vs. HYDRATE_SCALAR (4,700–5,000 RPS).

php
<?php

namespace App;

use App\Entity\Chirp;
use Doctrine\ORM\AbstractQuery;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Attribute\Route;

final class ChirpController
{
    private const SCALAR_PROJECTION = 'c.id AS chirp_id, c.text AS chirp_text, c.createdAt AS chirp_created_at, c.updatedAt AS chirp_updated_at, a.id AS author_id, a.username AS author_username, a.createdAt AS author_created_at, a.updatedAt AS author_updated_at';

    private readonly string $projection;
    private readonly int $hydrationMode;

    public function __construct(#[Autowire('%env(BENCHMARK_HYDRATION)%')] string $hydration)
    {
        if (!in_array($hydration, ['object', 'scalar'], true)) {
            throw new \InvalidArgumentException('BENCHMARK_HYDRATION must be object or scalar.');
        }
        $this->projection = 'scalar' === $hydration ? self::SCALAR_PROJECTION : 'c, a';
        $this->hydrationMode = 'scalar' === $hydration ? AbstractQuery::HYDRATE_SCALAR : AbstractQuery::HYDRATE_OBJECT;
    }

    #[Route('/up', methods: ['GET'])]
    public function health(): JsonResponse
    {
        return new JsonResponse(['status' => 'ok']);
    }

    #[Route('/api/v1/chirps', methods: ['GET'])]
    public function index(Request $request, EntityManagerInterface $em): JsonResponse
    {
        $page = max(1, $request->query->getInt('page', 1));
        $total = $em->getRepository(Chirp::class)->count();
        $last = max(1, (int) ceil($total / 50));
        $rows = $em->createQuery('SELECT '.$this->projection.' FROM App\Entity\Chirp c JOIN c.author a ORDER BY c.id DESC')
            ->setFirstResult(($page - 1) * 50)->setMaxResults(50)->getResult($this->hydrationMode);
        $path = '/api/v1/chirps';
        $url = static fn (int $number): string => $path.'?page='.$number;
        $links = [['url' => $page > 1 ? $url($page - 1) : null, 'label' => '&laquo; Previous', 'active' => false]];
        for ($i = 1; $i <= $last; ++$i) {
            $links[] = ['url' => $url($i), 'label' => (string) $i, 'active' => $i === $page];
        }
        $links[] = ['url' => $page < $last ? $url($page + 1) : null, 'label' => 'Next &raquo;', 'active' => false];

        return new JsonResponse([
            'current_page' => $page,
            'data' => array_map(self::serializeChirp(...), $rows),
            'first_page_url' => $url(1),
            'from' => $rows ? ($page - 1) * 50 + 1 : null,
            'last_page' => $last,
            'last_page_url' => $url($last),
            'links' => $links,
            'next_page_url' => $page < $last ? $url($page + 1) : null,
            'path' => $path,
            'per_page' => 50,
            'prev_page_url' => $page > 1 ? $url($page - 1) : null,
            'to' => $rows ? ($page - 1) * 50 + count($rows) : null,
            'total' => $total,
        ]);
    }

    #[Route('/api/v1/chirps/{id}', requirements: ['id' => '\d+'], methods: ['GET'])]
    public function show(int $id, EntityManagerInterface $em): JsonResponse
    {
        $chirp = $em->createQuery('SELECT '.$this->projection.' FROM App\Entity\Chirp c JOIN c.author a WHERE c.id = :id')
            ->setParameter('id', $id)->getOneOrNullResult($this->hydrationMode);

        return null !== $chirp ? new JsonResponse(self::serializeChirp($chirp)) : new JsonResponse(['message' => 'Not found'], 404);
    }

    private static function serializeChirp(Chirp|array $chirp): array
    {
        if ($chirp instanceof Chirp) {
            return $chirp->toArray();
        }

        return [
            'id' => (int) $chirp['chirp_id'],
            'text' => $chirp['chirp_text'],
            'author_id' => (int) $chirp['author_id'],
            'created_at' => self::formatTimestamp($chirp['chirp_created_at']),
            'updated_at' => self::formatTimestamp($chirp['chirp_updated_at']),
            'author' => [
                'id' => (int) $chirp['author_id'],
                'username' => $chirp['author_username'],
                'created_at' => self::formatTimestamp($chirp['author_created_at']),
                'updated_at' => self::formatTimestamp($chirp['author_updated_at']),
            ],
        ];
    }

    private static function formatTimestamp(?string $timestamp): ?string
    {
        // The schema uses second-precision UTC timestamps. Preserve the entity JSON format.
        return null === $timestamp ? null : str_replace(' ', 'T', $timestamp).'.000000Z';
    }
}

Architecture & Audit Notes

  • Compiled DI container + lean HTTP kernel means dramatically lower per-request framework tax than Laravel's dynamic container and Octane sandbox reset.
  • Audit finding we fixed: Symfony 8.2's Kernel::handle() already marks resetServices = true and invokes services_resetter->reset() on the next boot() — ensuring Doctrine's UnitOfWork does not silently cache entities across requests without double-resetting.
  • Missing test from the viral X post: running Doctrine with full HYDRATE_OBJECT entity hydration (JIT disabled) STILL sustained 3,100 RPS in worker mode (5.2× Laravel Octane Eloquent) and 1,800 RPS on classic PHP-FPM!
  • Isolated JIT A/B test: scalar hydration without JIT hit 4,700 RPS (p95 98.58 ms); turning tracing JIT on added +300 RPS (+6.4%) to 5,000 RPS and dropped confirmation p95 from 98.58 ms to 53.98 ms.

Strengths

  • + 5.2× faster than Laravel Octane Eloquent even when hydrating full Doctrine entities (3,100 RPS).
  • + 8.3× faster with Doctrine HYDRATE_SCALAR + tracing JIT (5,000 RPS) while staying 100% in PHP.
  • + Even without worker mode (classic PHP-FPM), Doctrine object hydration hit 1,800 RPS — beating Laravel FPM toBase() + JIT (1,400 RPS).
  • + Gradual migration path for existing PHP teams without switching languages or compilers.

Trade-offs

  • − Peak 5,000 RPS requires 90+ lines of explicit DQL scalar projections, manual pagination links, and manual timestamp formatting.
  • − Still trails idiomatic Laravel Go (5,600 RPS) and Laravel Rust (6,750 RPS) once you remove the 2,000 RPS cap.
  • − No Laravel Livewire / Filament rapid-UI DX out of the box.

Reproduce Locally

Exact commands to build, migrate/seed, and serve the Symfony 8.2 + Doctrine Chirper benchmark repository against MySQL 8.4:

composer install --no-dev --prefer-dist --optimize-autoloader --no-interaction
export APP_ENV=prod APP_DEBUG=0 BENCHMARK_HYDRATION=scalar
export DATABASE_URL="mysql://benchmark:[email protected]:3306/bench_symfony"
php bin/console cache:warmup --env=prod && php bin/seed.php
APP_PUBLIC_PATH="$PWD/public" PORT=8080 FRANKENPHP_WORKERS=4 FRANKENPHP_MAX_REQUESTS=500 \
  frankenphp run --config ./Caddyfile.benchmark --adapter caddyfile