# Go and PHP: capacity per core

> Go, FrankenPHP and PHP-FPM on the same OAuth2 service: requests per core, CPU per request, PostgreSQL load and instance count.

- Kind: Infographic
- Published: 2026-10-03
- Based on: https://muhammetsafak.com/research/capacity-per-core-go-php-oauth2/
- Source: https://muhammetsafak.com/visuals/i/capacity-per-core/
- Language: en-US
- Author: Muhammet Şafak

---
## Requests per second per core

OAuth2 service · medium confidence

-   14,330 Go Go 1.27.1
-   6,415 FrankenPHP 1.12.7, worker mode
-   5,152 PHP-FPM PHP 8.5.10

## Panel 2

On four cores

Go does 2.78 times the work of PHP-FPM.

2.23 times that of FrankenPHP. The measurement was published with medium confidence; the number is a saturation ceiling, not an SLO.

## Requests per second on four cores

Ceiling

req/s

-   Go 57,321
-   FrankenPHP 25,659
-   PHP-FPM 20,606

Read/write mix 50%/50%, PostgreSQL 17.11.

## Req/s by core count

Ceiling

Ceiling req/s of Go, FrankenPHP and PHP-FPM on 1, 2 and 4 cores

| Cores | Go | FrankenPHP | PHP-FPM |
| --- | --- | --- | --- |
| 1 | 16,883 | 6,544 | 6,218 |
| 2 | 29,449 | 14,306 | 11,211 |
| 4 | 57,321 | 25,659 | 20,606 |

## CPU per request on four cores

Efficiency

µs

-   Go 66.77
-   FrankenPHP 110.74
-   PHP-FPM 187.74

On a single core: 57.8 / 82.77 / 157.07 µs. FrankenPHP's CPU per request is 41% lower than PHP-FPM's.

## FrankenPHP does not fill the core

Efficiency

-   0.54 Used on 1 core Go and PHP-FPM 0.98
-   1.44 Used on 2 cores Go 1.87, PHP-FPM 1.95
-   2.84 Used on 4 cores Go 3.83, PHP-FPM 3.87

## Latency and memory

At the ceiling

Read and write p50 and p99 latencies and memory use of the three candidates at the ceiling

| Candidate | p50 read / write | p99 read / write | RSS |
| --- | --- | --- | --- |
| Go | 1.81 / 2.42 ms | 4.69 / 5.41 ms | 30.4 MiB |
| FrankenPHP | 4.77 / 4.96 ms | 8.80 / 9.06 ms | 60.3 MiB |
| PHP-FPM | 6.03 / 6.24 ms | 8.27 / 8.45 ms | 60.0 MiB |

## PostgreSQL's share

Database

The writes and reads that reach PostgreSQL as each candidate saturates, the cores it uses and its CPU per request

| Saturating candidate | Writes + reads | PostgreSQL cores | CPU per request |
| --- | --- | --- | --- |
| Go | 24,930 + 32,392 | 2.34 | 40.75 µs |
| FrankenPHP | 12,575 + 13,084 | 1.11 | 43.2 µs |
| PHP-FPM | 10,128 + 10,478 | 1.46 | 71.07 µs |

## Cores needed for 30,000 req/s

Capacity

-   2.0 Go
-   3.3 FrankenPHP
-   5.6 PHP-FPM

## Instance count by target rate

Capacity

Instances Go, FrankenPHP and PHP-FPM need for targets between 10,000 and 100,000 req/s

| Target req/s | Go | FrankenPHP | PHP-FPM |
| --- | --- | --- | --- |
| 10,000 | 1 | 1 | 1 |
| 20,000 | 1 | 1 | 1 |
| 30,000 | 1 | 2 | 2 |
| 50,000 | 1 | 2 | 3 |
| 100,000 | 2 | 4 | 5 |

## Pool size and the cost of a wrong choice

Tuning

The best pool size of each candidate on 1, 2 and 4 cores, and the throughput lost with the worst pool choice

| Candidate | Best pool (1/2/4 cores) | Cost of the worst choice |
| --- | --- | --- |
| Go | 16 / 64 / 64 | 70.6% |
| PHP-FPM | 8 / 16 / 32 | 30.7% |
| FrankenPHP | 8 / 8 / 8 | 29.6% |

## Panel 12

Formula

Below 20,000 req/s, all three candidates fit on a single instance. Beyond that: target rate × CPU per request = cores; +⅓ for FrankenPHP.

## The limits of these numbers

As you read

-   **Ceiling** The published number is a saturation ceiling, not an SLO. 45 of 45 repetitions passed the load-generator probe.
-   **Environment** In one run, a headless Chromium on the host machine dropped Go to 17,490 req/s instead of 57,321; that run was discarded.
-   **Disk** The VM disk's fsync guarantee was not verified; absolute write numbers may be optimistic, the comparison is not affected.
