swoole
Flagship · PHP · tuned configuration · completeness 1/4
Swoole is an event-driven, asynchronous, coroutine-based concurrency library with high performance for PHP.
Achievements
🥈 1 Silver · 🥉 1 Bronze. Top three of a field, taken in this entry's own league: the family composite, the same composite among entries written in the same language, and each test profile it is scored on. Every field is the one the badges publish, so a medal and a badge always say the same thing. How medals are awarded.
| Medal | Award | Field | Rank |
|---|---|---|---|
| 🥈 Silver | Within its language | PHP · HTTP/1.1 | 2 of 5 |
| 🥉 Bronze | Within its language | PHP · HTTP/2 | 3 of 4 |
Composite rank
Each profile of a family is worth 100 to the entry that leads it, and the composite is the sum over the family, less 2.5% for each of routing, middleware, request and response the entry does not do for you - its completeness factor, which the WebSocket and gRPC families do not carry. The field is this entry's own league: engines and reverse proxies are scored apart from frameworks. How it works.
| Family | Rank | Composite |
|---|---|---|
| HTTP/1.1 | 11 of 93 | 5040 |
| HTTP/2 | 17 of 28 | 537 |
| WebSocket | 12 of 25 | 881 |
Every result
Alpha Round, 23 runs. Requests per second is the best of three; latency, CPU and memory come from that run.
| Category | Profile | Conns | Req/sec | Avg | p99 | CPU | Memory |
|---|---|---|---|---|---|---|---|
| Connection | Baseline | 4,096 | 2,310,475 | 1.77ms | 9.83ms | 6548.5% | 200MiB |
| Connection | Pipelined | 4,096 | 3,298,449 | 19.84ms | 44.50ms | 6503.7% | 202MiB |
| Connection | Short-lived | 4,096 | 1,940,869 | 2.10ms | 10.00ms | 6572.8% | 245MiB |
| Concurrency | Async Delay | 32,000 | 12,618 | 2.20s | 5.00s | 77.0% | 749MiB |
| Efficiency | Latency-10K | 1,024 | 9,982 | 76.9us | 117.0us | 34.3% | 367MiB |
| Efficiency | Latency-1M | 1,024 | 997,438 | 120.5us | 210.0us | 4055.9% | 364MiB |
| Efficiency | Latency-500K/8 | 1,024 | 331,021 | 2829169.8us | 10416128.0us | 810.9% | 356MiB |
| Workload | JSON Comp | 4,096 | 544,249 | 7.49ms | 35.00ms | 6509.5% | 277MiB |
| Workload | JSON Comp | 16,384 | 539,064 | 30.10ms | 100.20ms | 6428.1% | 438MiB |
| Workload | JSON TLS | 4,096 | 797,654 | 5.27ms | 111.38ms | 6526.4% | 370MiB |
| Workload | 8Gbit | 512 | 49,356 | 106.7us | 142.0us | 282.9% | 439MiB |
| Workload | Static TLS | 1,024 | 415,524 | 2.79ms | 54.98ms | 6617.5% | 312MiB |
| Database | Async DB | 1,024 | 249,837 | 3.51ms | 25.70ms | 4565.9% | 256MiB |
| HTTP/2 | Baseline | 256 | 1,778,401 | 14.65ms | 81.09ms | 6663.7% | 208MiB |
| HTTP/2 | Baseline | 1,024 | 1,760,872 | 54.07ms | 313.28ms | 6445.0% | 244MiB |
| HTTP/2 | Static | 256 | 325,925 | 26.65ms | 182.69ms | 6532.0% | 496MiB |
| HTTP/2 | Static | 1,024 | 327,382 | 96.29ms | 568.41ms | 6560.8% | 917MiB |
| WebSocket | Echo | 512 | 3,056,601 | 166us | 3.04ms | 6657.4% | 184.5MiB |
| WebSocket | Echo | 4,096 | 3,354,954 | 1.22ms | 6.79ms | 6338.1% | 194.5MiB |
| WebSocket | Echo | 16,384 | 3,168,894 | 5.04ms | 13.70ms | 6468.8% | 346.9MiB |
| WebSocket | Echo Pipelined | 512 | 3,750,207 | 2.18ms | 8.47ms | 6428.3% | 180MiB |
| WebSocket | Echo Pipelined | 4,096 | 3,778,342 | 17.33ms | 37.30ms | 6364.5% | 196MiB |
| WebSocket | Echo Pipelined | 16,384 | 3,557,596 | 72.32ms | 136.10ms | 6262.9% | 354MiB |
Compared with
The PHP entries around swoole on the HTTP/1.1 composite, and the one leading them. The last column shows every profile side by side.
| Entry | Composite | vs swoole | |
|---|---|---|---|
| true-async-server | 5290 | +5% | head to head |
| hyperf | 1778 | -65% | head to head |
| php-fpm | 1356 | -73% | head to head |
Compare swoole with any PHP entry · Compare swoole with any entry, in any language · Every PHP entry, ranked
Results updated · How the benchmark is run · The machine · Add or fix an entry