TrueAsync PHP 0.6.6
What's Changed
- libuv bumped to 1.52.1 — versions below 1.52.1 have known IO-URING issues on Linux; all UNIX/Linux builds and Docker images now ship with the fixed version.
- OPcache production config in Docker images — both
php-true-async(Debian) and FrankenPHP images now ship with a tunedopcache.iniout of the box: JIT tracing mode,validate_timestamps=0(files don't change in containers), 256 MB bytecode cache, 128 MB JIT buffer.
Performance Benchmarks
We ran a realistic benchmark against Laravel + PostgreSQL (10 SQL queries per request, 1000 req/s constant load, 30s duration) comparing TrueAsync against Swoole NTS, Swoole ZTS, and FrankenPHP Octane.
Throughput (16 workers)
| Server | req/s | vs TrueAsync | Dropped requests |
|---|---|---|---|
| TrueAsync | 993 req/s | — | 1.1% |
| Swoole NTS | 599 req/s | TrueAsync +66% | ~38% |
| Swoole ZTS | 601 req/s | TrueAsync +65% | ~36% |
| FrankenPHP Octane | 556 req/s | TrueAsync +79% | ~41% |
TrueAsync handles the full target load with just 4 workers. Blocking servers need ~25 workers to reach the same throughput — a 6× worker efficiency advantage.
Latency at 4 workers
| Server | P50 | P95 |
|---|---|---|
| TrueAsync | 28 ms | 60 ms |
| Swoole NTS | 5,440 ms | 5,630 ms |
| Swoole ZTS | 5,320 ms | 5,520 ms |
| FrankenPHP Octane | 5,240 ms | 5,390 ms |
The entire difference is queue wait: with 4 blocking workers at 1000 req/s, requests sit in queue for ~5,400 ms. TrueAsync coroutines handle requests immediately — queue wait is ~0 ms.
Memory footprint (idle)
| Server | 4 workers | 16 workers |
|---|---|---|
| TrueAsync | 147 MB | 326 MB |
| Swoole NTS | 481 MB (+227%, 3.3×) | 762 MB (+134%, 2.3×) |
| Swoole ZTS | 512 MB (+248%, 3.5×) | 765 MB (+135%, 2.3×) |
| FrankenPHP Octane | 357 MB (+143%, 2.4×) | 421 MB (+29%, 1.3×) |
Each Swoole worker bootstraps its own full copy of the Laravel application (~22 MB/worker). TrueAsync coroutines share the bootstrap within a single worker — ~2.5 MB per coroutine, ~89% less than Swoole (9× lighter).
Full results and charts: https://github.com/YanGusik/ta_benchmark/blob/main/RESULTS.md