swoole
Flagship · PHP · tuned configuration
Swoole is an event-driven, asynchronous, coroutine-based concurrency library with high performance for PHP.
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. 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 | 7 of 97 | 707 |
| HTTP/2 | 15 of 29 | 68 |
| WebSocket | 11 of 32 | 79 |
Every result
Alpha Round, 29 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 | 512 | 2,035,856 | 250us | 3.31ms | 6714.5% | 201.6MiB |
| Connection | Baseline | 4,096 | 2,034,436 | 2.01ms | 8.16ms | 6532.1% | 211.5MiB |
| Connection | Pipelined | 512 | 2,833,444 | 2.89ms | 8.99ms | 6494.1% | 169.2MiB |
| Connection | Pipelined | 4,096 | 2,928,585 | 22.33ms | 45.20ms | 6483.1% | 215.0MiB |
| Connection | Short-lived | 512 | 1,511,351 | 327us | 3.59ms | 6059.2% | 215.2MiB |
| Connection | Short-lived | 4,096 | 1,796,637 | 2.26ms | 9.69ms | 6326.8% | 255.7MiB |
| Workload | JSON | 4,096 | 946,517 | 3.97ms | 16.40ms | 6427.0% | 414.8MiB |
| Workload | JSON Comp | 512 | 508,847 | 1.00ms | 7.62ms | 6383.2% | 243MiB |
| Workload | JSON Comp | 4,096 | 524,209 | 7.77ms | 36.00ms | 6687.9% | 261MiB |
| Workload | JSON Comp | 16,384 | 517,669 | 31.25ms | 89.90ms | 6717.7% | 415MiB |
| Workload | JSON TLS | 4,096 | 776,894 | 5.37ms | - | 6497.1% | 355MiB |
| Workload | Upload | 32 | 279 | 112.67ms | 848.30ms | 2304.1% | 660.3MiB |
| Workload | Upload | 256 | 343 | 591.10ms | 3.23s | 7531.6% | 1.7GiB |
| Workload | Static | 1,024 | 1,124,608 | 1.43ms | - | 6557.2% | 230.3MiB |
| Workload | Static | 4,096 | 1,111,770 | 3.81ms | - | 6413.5% | 267.3MiB |
| Workload | Static | 6,800 | 1,112,711 | 6.16ms | - | 6350.8% | 303.2MiB |
| Database | Async DB | 1,024 | 243,187 | 3.66ms | 17.70ms | 4269.3% | 270.9MiB |
| Multi-endpoint | API-4 | 256 | 46,045 | 4.12ms | 27.50ms | 406.4% | 214.7MiB |
| Multi-endpoint | API-16 | 1,024 | 131,689 | 5.99ms | 42.90ms | 1757.8% | 258.8MiB |
| HTTP/2 | Baseline | 256 | 1,328,208 | 20.74ms | - | 5428.1% | 201.4MiB |
| HTTP/2 | Baseline | 1,024 | 1,254,047 | 74.92ms | - | 5187.5% | 259.3MiB |
| HTTP/2 | Static | 256 | 357,361 | 81.44ms | - | 4724.3% | 619.4MiB |
| HTTP/2 | Static | 1,024 | 380,483 | 254.80ms | - | 4627.2% | 1.9GiB |
| 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 |
How the benchmark is run · The machine · Add or fix an entry