UserCache\Cache Performance Report
Compares UserCache\Cache with APCu/igbinary, APCu/php and Yac/php on the same machine. Every value is the median across 3 runs, with all measurements pinned to CPUs 0-3. Generated at 2026-09-30T08:35:35+00:00.
- Times are microseconds (µs) per operation, or per batch for bulk reads; lower is faster.
- Speedup is the other backend time divided by the UserCache time: above 1.00x UserCache is faster (green), below 1.00x it is slower (amber).
- Faster lists the backends from fastest to slowest, each as its time divided by the fastest time; the fastest cell is green, including ties.
- Workload names link to a description of what each workload measures. The data behind this page is embedded as JSON (see Data).
Related report: FrankenPHP persistence comparison
- vs APCu/igbinary
- 17.9x faster
- vs APCu/php
- 26.8x faster
- vs Yac/php
- 34.8x faster
- vs APCu/igbinary
- 1.59x slower
- vs APCu/php
- 1.35x slower
- vs Yac/php
- 1.22x faster
- vs APCu/php
- 6.50x faster
- vs Yac/php
- 7.70x faster
- vs APCu/igbinary
- 4.77x faster
- vs Yac/php
- 7.93x faster
- vs APCu/php
- 25.0x faster
- vs Yac/php
- 31.2x faster
- vs APCu/igbinary
- 16.4x faster
- vs Yac/php
- 32.9x faster
- 32 keys vs APCu/php fetch array
- 21.6x faster
- 128 keys vs APCu/php fetch array
- 21.8x faster
- Geomean
- 1.18x faster
- Reference faster
- 0
- Within noise
- 3
UserCache vs APCu/igbinary
Speedup is the APCu/igbinary median divided by the UserCache median from the same measurement session; above 1.00x UserCache is faster. FPM rows pair UserCache with the run that used the same APCu serializer. The geometric mean weighs every workload equally; Lowest and Highest name the workloads with the smallest and largest speedup.
| Section | Workloads | UserCache faster | Geomean speedup | Lowest | Highest |
|---|---|---|---|---|---|
| CLI repeated read | 28 | 28/28 | 17.9x | 1.07xcarbon_ | 501xlarge_ |
| FPM one fetch/request | 28 | 28/28 | 4.77x | 1.07xcarbon_ | 40.5xroute_ |
| FPM hot read | 26 | 26/26 | 16.4x | 1.09xcarbon_ | 326xlarge_ |
| CLI storestore trade-off note | 28 | 1/28 | 0.63x | 0.31xspl_ | 1.17xlarge_ |
Speedup per workload
| Workload | CLI repeated read | FPM one fetch/request | FPM hot read | CLI store |
|---|---|---|---|---|
constant_ | 15.3x | 2.65x | n/a | 0.47x |
route_ | 433x | 40.5x | 311x | 0.80x |
large_ | 501x | 31.9x | 326x | 0.74x |
large_ | 58.2x | 3.63x | 39.5x | 1.17x |
large_ | 323x | 23.8x | 242x | 0.57x |
metadata_ | 363x | 28.8x | 310x | 0.65x |
metadata_ | 249x | 30.6x | 225x | 0.64x |
sleep_ | 24.0x | 4.39x | 16.8x | 0.52x |
serialize_ | 8.99x | 2.24x | 7.01x | 0.57x |
unserialize_ | 7.05x | 2.11x | 6.29x | 0.46x |
sleep_ | 3.75x | 3.40x | 3.39x | 0.35x |
sleep_ | 245x | 27.1x | 168x | 0.55x |
recursive_ | 3.69x | 3.10x | 4.03x | 0.45x |
mixed_ | 20.5x | 5.28x | 17.6x | 0.68x |
product_ | 8.25x | 4.04x | 7.68x | 0.53x |
multi_ | 39.2x | 5.96x | 27.6x | 0.59x |
safe_ | 5.03x | 1.71x | 4.63x | 0.90x |
spl_ | 8.50x | 3.28x | 8.72x | 0.31x |
spl_ | 5.00x | 2.93x | n/a | 0.37x |
spl_ | 9.03x | 5.07x | 9.82x | 0.48x |
carbon_ | 1.14x | 1.07x | 1.09x | 0.84x |
carbon_ | 1.07x | 1.08x | 1.24x | 0.93x |
raw_ | 10.0x | 4.84x | 11.8x | 0.77x |
raw_ | 13.5x | 5.97x | 15.7x | 0.86x |
serialized_ | 2.94x | 1.40x | 2.85x | 0.84x |
reference_ | 3.94x | 1.30x | 2.93x | 0.87x |
cycle_ | 3.53x | 1.39x | 2.77x | 0.85x |
nested_ | 50.6x | 7.22x | 36.6x | 0.77x |
Bulk read, median per batch
Multi-key reads: UserCache fetchMultiple() against APCu/igbinary fetching an array of keys, with per-key loops for reference. Speedup compares the two multi-key calls.
| Keys | UserCache fetchMultiple | UserCache fetch loop | APCu/igbinary fetch array | APCu/igbinary fetch loop | Speedup (array vs array) |
|---|---|---|---|---|---|
| 32 | 0.490 µs | 0.968 µs | 10.659 µs | 11.759 µs | 21.8x |
| 128 | 1.846 µs | 4.563 µs | 42.010 µs | 52.418 µs | 22.8x |
UserCache vs FrankenPHP zval.h reference
UserCache compared with a reference cache built on the official FrankenPHP zval.h helpers, running in the same persistent FrankenPHP worker threads. PHP fetch batches show the speedup, reference time ÷ UserCache time; HTTP rows show the throughput ratio, UserCache ÷ reference. Above 1.00x UserCache is faster in both. Each value comes from randomized matched pairs; a case counts, and its cell is colored, only when the paired bootstrap 95% interval excludes 1.00x. Per-case timings, memory, A/A noise and provenance are in the FrankenPHP persistence report.
Mode worker · micro 15 pairs × 2 sessions · A/A 15 pairs · HTTP 5 rounds × 5 s · CPUs 0-3 · FrankenPHP 51e6246e71f3 · measured 2026-09-30T07:54:36+00:00
| Cases | Count | UserCache faster | Within interval | Reference faster | Geomean speedup |
|---|---|---|---|---|---|
| PHP fetch batches | 33 | 30 | 3 | 0 | 1.177x |
| Read | 21 | 20 | 1 | 0 | 1.206x |
| Fetch and mutate | 12 | 10 | 2 | 0 | 1.128x |
| HTTP, 100 ops/request (throughput) | 12 | 7 | 4 | 1 | 1.029x |
| HTTP, 1 op/request (throughput) | 12 | 1 | 8 | 3 | 0.986x |
A/A runs (the reference measured against itself) show the noise floor: their medians range from 0.943x to 1.132x. Cases marked † have A/A noise above ±2%, so differences of that size are not meaningful there.
PHP fetch batches, speedup (reference time ÷ UserCache time)
| Payload | 1 key, warm, read | 1 key, warm, read, TTL 3600 | 1 key, warm, mutate | 32,768 keys, warm, read | 32,768 keys, warm, mutate | 32,768 keys, cold, read |
|---|---|---|---|---|---|---|
null | 1.155x1.124–1.180 | - | - | - | - | - |
bool | 1.176x1.164–1.195 | - | - | - | - | - |
int | 1.163x1.145–1.178 | - | - | 1.198x1.189–1.201 | 1.192x1.185–1.197 | 1.420x †1.410–1.446 |
double | 1.157x1.141–1.170 | - | - | - | - | - |
string32 | 1.221x †1.198–1.240 | - | 1.165x1.142–1.190 | - | - | - |
string300 | 1.208x1.187–1.224 | - | 1.192x †1.172–1.196 | 1.296x1.274–1.310 | 1.256x1.234–1.269 | 1.024x1.000–1.057 |
string4k | 1.229x †1.213–1.238 | - | 1.078x1.071–1.098 | - | - | - |
string64k | 1.218x †1.200–1.225 | - | 1.023x0.998–1.045 | - | - | - |
packed8 | 1.271x1.259–1.277 | 1.201x1.191–1.221 | 1.162x1.157–1.172 | 1.305x1.288–1.335 | 1.208x1.194–1.217 | 1.126x1.114–1.150 |
packed512 | 1.270x †1.263–1.286 | - | 1.052x1.049–1.062 | - | - | - |
hash32 | 1.224x1.208–1.234 | - | 1.083x1.069–1.093 | 1.301x †1.225–1.351 | 1.087x †0.991–1.401 | 1.082x †1.047–1.108 |
nested | 1.139x1.122–1.147 | - | 1.069x1.051–1.081 | - | - | - |
HTTP worker scaling, throughput ratio (UserCache ÷ reference)
The Go HTTP client and FrankenPHP workers share the pinned CPU set, so intervals widen as workers grow. With one operation per request, the cache call is a small part of each request.
| Fixture / mix | 1 worker, 100 ops/request | 2 workers, 100 ops/request | 4 workers, 100 ops/request | 1 worker, 1 op/request | 2 workers, 1 op/request | 4 workers, 1 op/request |
|---|---|---|---|---|---|---|
| array / read | 0.998x0.976–1.022 | 0.970x0.870–1.229 | 1.028x1.009–1.036 | 0.976x0.942–0.990 | 1.077x1.032–2.041 | 0.987x0.979–1.014 |
| array / 99% read + 1% store | 0.907x0.767–0.985 | 1.033x0.733–1.261 | 1.141x1.139–1.153 | 0.989x0.932–1.014 | 0.874x0.811–1.267 | 0.993x0.976–1.092 |
| scalar / read | 1.037x1.025–1.089 | 1.025x1.001–1.096 | 1.052x1.041–1.063 | 0.986x0.955–1.015 | 0.996x0.990–0.997 | 0.998x0.985–1.044 |
| scalar / 99% read + 1% store | 1.031x1.021–1.051 | 1.048x0.995–1.173 | 1.100x1.093–1.109 | 0.981x0.946–0.995 | 0.993x0.992–1.009 | 0.998x0.984–1.009 |
CLI Repeated Read
A warm CLI process stores each payload once, then times fetch() plus a small access probe on the fetched value. Each run times 2,000 operations × 12 iterations after 2 warmup iterations. Cells show the median µs per operation, with the mean below it.
| Workload | UserCache | APCu/php | APCu/igbinary | Yac/php | Faster |
|---|---|---|---|---|---|
constant_ | 0.107 µsmean 0.110 | 2.212 µsmean 2.203 | 1.644 µsmean 1.626 | 2.803 µsmean 2.786 | UserCache 1.00xAPCu/igbinary 15.29xAPCu/php 20.58xYac/php 26.08x |
route_ | 0.139 µsmean 0.140 | 168.996 µsmean 176.716 | 60.411 µsmean 61.510 | 197.490 µsmean 200.483 | UserCache 1.00xAPCu/igbinary 433.18xAPCu/php 1,211.80xYac/php 1,416.12x |
large_ | 0.110 µsmean 0.111 | 96.725 µsmean 99.437 | 55.209 µsmean 55.488 | 115.753 µsmean 118.882 | UserCache 1.00xAPCu/igbinary 500.67xAPCu/php 877.16xYac/php 1,049.72x |
large_ | 0.068 µsmean 0.068 | 3.952 µsmean 3.964 | 3.949 µsmean 3.947 | 50.229 µsmean 53.148 | UserCache 1.00xAPCu/igbinary 58.19xAPCu/php 58.23xYac/php 740.13x |
large_ | 0.158 µsmean 0.158 | 98.450 µsmean 105.051 | 51.219 µsmean 54.017 | 112.697 µsmean 115.085 | UserCache 1.00xAPCu/igbinary 323.46xAPCu/php 621.75xYac/php 711.72x |
metadata_ | 0.218 µsmean 0.218 | 171.744 µsmean 175.136 | 78.897 µsmean 78.996 | 222.300 µsmean 223.950 | UserCache 1.00xAPCu/igbinary 362.50xAPCu/php 789.10xYac/php 1,021.38x |
metadata_ | 0.279 µsmean 0.280 | 182.362 µsmean 185.543 | 69.309 µsmean 72.928 | 211.466 µsmean 213.408 | UserCache 1.00xAPCu/igbinary 248.65xAPCu/php 654.24xYac/php 758.65x |
sleep_ | 0.224 µsmean 0.228 | 9.286 µsmean 9.490 | 5.383 µsmean 5.397 | 12.807 µsmean 13.017 | UserCache 1.00xAPCu/igbinary 24.02xAPCu/php 41.44xYac/php 57.15x |
serialize_ | 0.345 µsmean 0.350 | 4.118 µsmean 4.020 | 3.100 µsmean 3.016 | 5.505 µsmean 5.451 | UserCache 1.00xAPCu/igbinary 8.99xAPCu/php 11.94xYac/php 15.97x |
unserialize_ | 0.438 µsmean 0.441 | 3.904 µsmean 3.957 | 3.090 µsmean 3.263 | 5.220 µsmean 5.334 | UserCache 1.00xAPCu/igbinary 7.05xAPCu/php 8.91xYac/php 11.91x |
sleep_ | 9.942 µsmean 10.363 | 60.714 µsmean 61.492 | 37.271 µsmean 38.416 | 66.835 µsmean 68.199 | UserCache 1.00xAPCu/igbinary 3.75xAPCu/php 6.11xYac/php 6.72x |
sleep_ | 0.198 µsmean 0.199 | 91.289 µsmean 93.188 | 48.473 µsmean 50.174 | 107.800 µsmean 112.239 | UserCache 1.00xAPCu/igbinary 244.58xAPCu/php 460.62xYac/php 543.93x |
recursive_ | 7.628 µsmean 7.720 | 34.169 µsmean 35.173 | 28.140 µsmean 28.207 | 38.848 µsmean 40.267 | UserCache 1.00xAPCu/igbinary 3.69xAPCu/php 4.48xYac/php 5.09x |
mixed_ | 0.479 µsmean 0.478 | 15.698 µsmean 16.168 | 9.820 µsmean 10.001 | 19.685 µsmean 20.275 | UserCache 1.00xAPCu/igbinary 20.50xAPCu/php 32.77xYac/php 41.09x |
product_ | 4.764 µsmean 4.771 | 61.878 µsmean 63.943 | 39.308 µsmean 40.343 | 71.731 µsmean 73.924 | UserCache 1.00xAPCu/igbinary 8.25xAPCu/php 12.99xYac/php 15.06x |
multi_ | 0.131 µsmean 0.134 | 8.169 µsmean 8.247 | 5.138 µsmean 5.134 | 10.406 µsmean 10.520 | UserCache 1.00xAPCu/igbinary 39.18xAPCu/php 62.29xYac/php 79.34x |
safe_ | 0.477 µsmean 0.478 | 2.450 µsmean 2.495 | 2.400 µsmean 2.440 | 2.829 µsmean 2.903 | UserCache 1.00xAPCu/igbinary 5.03xAPCu/php 5.14xYac/php 5.93x |
spl_ | 0.830 µsmean 0.800 | 19.045 µsmean 19.450 | 7.057 µsmean 7.884 | 22.545 µsmean 22.736 | UserCache 1.00xAPCu/igbinary 8.50xAPCu/php 22.94xYac/php 27.16x |
spl_ | 1.532 µsmean 1.573 | 19.475 µsmean 19.927 | 7.656 µsmean 7.529 | 24.052 µsmean 24.083 | UserCache 1.00xAPCu/igbinary 5.00xAPCu/php 12.71xYac/php 15.70x |
spl_ | 1.304 µsmean 1.307 | 32.869 µsmean 33.252 | 11.781 µsmean 11.991 | 35.754 µsmean 37.556 | UserCache 1.00xAPCu/igbinary 9.03xAPCu/php 25.21xYac/php 27.42x |
carbon_ | 195.117 µsmean 194.479 | 230.357 µsmean 231.606 | 222.216 µsmean 225.691 | 240.121 µsmean 241.672 | UserCache 1.00xAPCu/igbinary 1.14xAPCu/php 1.18xYac/php 1.23x |
carbon_ | 216.926 µsmean 217.920 | 249.673 µsmean 254.107 | 231.961 µsmean 234.891 | 253.374 µsmean 254.735 | UserCache 1.00xAPCu/igbinary 1.07xAPCu/php 1.15xYac/php 1.17x |
raw_ | 9.182 µsmean 9.154 | 106.506 µsmean 108.223 | 92.002 µsmean 92.894 | 103.978 µsmean 105.608 | UserCache 1.00xAPCu/igbinary 10.02xYac/php 11.32xAPCu/php 11.60x |
raw_ | 6.566 µsmean 6.622 | 103.317 µsmean 106.416 | 88.686 µsmean 91.445 | 108.645 µsmean 111.685 | UserCache 1.00xAPCu/igbinary 13.51xAPCu/php 15.74xYac/php 16.55x |
serialized_ | 0.151 µsmean 0.154 | 0.403 µsmean 0.431 | 0.443 µsmean 0.471 | 0.529 µsmean 0.559 | UserCache 1.00xAPCu/php 2.67xAPCu/igbinary 2.94xYac/php 3.50x |
reference_ | 0.119 µsmean 0.121 | 0.360 µsmean 0.361 | 0.468 µsmean 0.468 | 0.489 µsmean 0.500 | UserCache 1.00xAPCu/php 3.03xAPCu/igbinary 3.94xYac/php 4.11x |
cycle_ | 0.156 µsmean 0.158 | 0.478 µsmean 0.472 | 0.552 µsmean 0.565 | 0.586 µsmean 0.634 | UserCache 1.00xAPCu/php 3.06xAPCu/igbinary 3.53xYac/php 3.75x |
nested_ | 0.122 µsmean 0.124 | 8.476 µsmean 8.803 | 6.176 µsmean 6.153 | 11.572 µsmean 11.584 | UserCache 1.00xAPCu/igbinary 50.64xAPCu/php 69.50xYac/php 94.88x |
CLI Store
Times store() of each payload, cycling over 32 keys. Slower stores are an intentional trade-off for faster reads (note). Each run times 200 operations × 6 iterations after 2 warmup iterations. Cells show the median µs per operation, with the mean below it.
| Workload | UserCache | APCu/php | APCu/igbinary | Yac/php | Faster |
|---|---|---|---|---|---|
constant_store trade-off note | 1.945 µsmean 1.957 | 1.257 µsmean 1.262 | 0.907 µsmean 0.914 | 2.033 µsmean 2.137 | APCu/igbinary 1.00xAPCu/php 1.39xUserCache 2.15xYac/php 2.24x |
route_store trade-off note | 93.857 µsmean 94.890 | 91.483 µsmean 93.145 | 75.178 µsmean 79.051 | 150.444 µsmean 156.766 | APCu/igbinary 1.00xAPCu/php 1.22xUserCache 1.25xYac/php 2.00x |
large_store trade-off note | 67.827 µsmean 70.973 | 54.442 µsmean 54.729 | 50.186 µsmean 50.007 | 94.555 µsmean 94.652 | APCu/igbinary 1.00xAPCu/php 1.08xUserCache 1.35xYac/php 1.88x |
large_ | 3.719 µsmean 3.745 | 4.050 µsmean 4.066 | 4.353 µsmean 4.404 | 82.173 µsmean 82.934 | UserCache 1.00xAPCu/php 1.09xAPCu/igbinary 1.17xYac/php 22.09x |
large_store trade-off note | 72.207 µsmean 72.076 | 52.551 µsmean 54.867 | 41.287 µsmean 41.280 | 89.700 µsmean 103.165 | APCu/igbinary 1.00xAPCu/php 1.27xUserCache 1.75xYac/php 2.17x |
metadata_store trade-off note | 118.597 µsmean 120.821 | 97.611 µsmean 101.155 | 76.649 µsmean 76.862 | 159.701 µsmean 160.926 | APCu/igbinary 1.00xAPCu/php 1.27xUserCache 1.55xYac/php 2.08x |
metadata_store trade-off note | 120.038 µsmean 124.142 | 97.057 µsmean 97.166 | 76.973 µsmean 77.848 | 158.511 µsmean 159.235 | APCu/igbinary 1.00xAPCu/php 1.26xUserCache 1.56xYac/php 2.06x |
sleep_store trade-off note | 8.153 µsmean 8.159 | 5.551 µsmean 5.514 | 4.219 µsmean 4.228 | 9.227 µsmean 9.234 | APCu/igbinary 1.00xAPCu/php 1.32xUserCache 1.93xYac/php 2.19x |
serialize_store trade-off note | 4.573 µsmean 4.615 | 2.097 µsmean 2.108 | 2.628 µsmean 2.726 | 3.643 µsmean 3.657 | APCu/php 1.00xAPCu/igbinary 1.25xYac/php 1.74xUserCache 2.18x |
unserialize_store trade-off note | 4.569 µsmean 4.576 | 2.168 µsmean 2.190 | 2.109 µsmean 2.108 | 3.889 µsmean 3.926 | APCu/igbinary 1.00xAPCu/php 1.03xYac/php 1.84xUserCache 2.17x |
sleep_store trade-off note | 65.163 µsmean 65.735 | 31.588 µsmean 31.663 | 22.808 µsmean 23.263 | 42.697 µsmean 42.734 | APCu/igbinary 1.00xAPCu/php 1.38xYac/php 1.87xUserCache 2.86x |
sleep_store trade-off note | 80.527 µsmean 80.428 | 52.813 µsmean 52.939 | 43.969 µsmean 45.196 | 85.671 µsmean 87.429 | APCu/igbinary 1.00xAPCu/php 1.20xUserCache 1.83xYac/php 1.95x |
recursive_store trade-off note | 37.854 µsmean 38.061 | 21.037 µsmean 21.182 | 16.950 µsmean 16.914 | 27.020 µsmean 27.128 | APCu/igbinary 1.00xAPCu/php 1.24xYac/php 1.59xUserCache 2.23x |
mixed_store trade-off note | 15.523 µsmean 15.950 | 9.546 µsmean 9.543 | 10.599 µsmean 10.587 | 14.953 µsmean 15.106 | APCu/php 1.00xAPCu/igbinary 1.11xYac/php 1.57xUserCache 1.63x |
product_store trade-off note | 41.874 µsmean 42.035 | 23.616 µsmean 23.602 | 22.162 µsmean 22.168 | 39.302 µsmean 40.405 | APCu/igbinary 1.00xAPCu/php 1.07xYac/php 1.77xUserCache 1.89x |
multi_store trade-off note | 7.051 µsmean 7.167 | 5.325 µsmean 5.454 | 4.133 µsmean 4.143 | 8.835 µsmean 9.269 | APCu/igbinary 1.00xAPCu/php 1.29xUserCache 1.71xYac/php 2.14x |
safe_store trade-off note | 1.480 µsmean 1.469 | 1.224 µsmean 1.235 | 1.339 µsmean 1.388 | 1.972 µsmean 2.010 | APCu/php 1.00xAPCu/igbinary 1.09xUserCache 1.21xYac/php 1.61x |
spl_store trade-off note | 16.577 µsmean 16.566 | 11.857 µsmean 11.834 | 5.202 µsmean 5.454 | 18.280 µsmean 18.336 | APCu/igbinary 1.00xAPCu/php 2.28xUserCache 3.19xYac/php 3.51x |
spl_store trade-off note | 12.482 µsmean 12.516 | 11.465 µsmean 11.572 | 4.620 µsmean 4.667 | 17.496 µsmean 17.478 | APCu/igbinary 1.00xAPCu/php 2.48xUserCache 2.70xYac/php 3.79x |
spl_store trade-off note | 20.405 µsmean 20.489 | 19.300 µsmean 19.618 | 9.853 µsmean 9.938 | 27.383 µsmean 27.779 | APCu/igbinary 1.00xAPCu/php 1.96xUserCache 2.07xYac/php 2.78x |
carbon_store trade-off note | 380.996 µsmean 379.306 | 332.355 µsmean 341.119 | 318.616 µsmean 336.071 | 346.266 µsmean 359.789 | APCu/igbinary 1.00xAPCu/php 1.04xYac/php 1.09xUserCache 1.20x |
carbon_store trade-off note | 400.736 µsmean 413.633 | 362.204 µsmean 361.367 | 374.378 µsmean 380.276 | 379.464 µsmean 395.484 | APCu/php 1.00xAPCu/igbinary 1.03xYac/php 1.05xUserCache 1.11x |
raw_store trade-off note | 61.650 µsmean 62.921 | 48.316 µsmean 48.438 | 47.573 µsmean 49.454 | 60.891 µsmean 60.944 | APCu/igbinary 1.00xAPCu/php 1.02xYac/php 1.28xUserCache 1.30x |
raw_store trade-off note | 58.206 µsmean 58.630 | 53.580 µsmean 55.400 | 50.305 µsmean 51.132 | 65.539 µsmean 66.661 | APCu/igbinary 1.00xAPCu/php 1.07xUserCache 1.16xYac/php 1.30x |
serialized_store trade-off note | 0.382 µsmean 0.386 | 0.326 µsmean 0.331 | 0.322 µsmean 0.325 | 0.484 µsmean 0.485 | APCu/igbinary 1.00xAPCu/php 1.01xUserCache 1.19xYac/php 1.51x |
reference_store trade-off note | 0.360 µsmean 0.364 | 0.301 µsmean 0.308 | 0.313 µsmean 0.313 | 0.427 µsmean 0.431 | APCu/php 1.00xAPCu/igbinary 1.04xUserCache 1.20xYac/php 1.42x |
cycle_store trade-off note | 0.378 µsmean 0.378 | 0.317 µsmean 0.322 | 0.322 µsmean 0.324 | 0.478 µsmean 0.478 | APCu/php 1.00xAPCu/igbinary 1.02xUserCache 1.19xYac/php 1.51x |
nested_store trade-off note | 7.505 µsmean 7.517 | 5.315 µsmean 5.322 | 5.748 µsmean 5.764 | 8.031 µsmean 8.004 | APCu/php 1.00xAPCu/igbinary 1.08xUserCache 1.41xYac/php 1.51x |
FPM One Fetch Per Request
Each HTTP request through nginx and php-fpm fetches the payload once, so every fetch is the first one in its request. Each backend serves 180 requests after 20 warmup requests, 5 at a time. Time is measured inside PHP per fetch. Cells show the median µs, with the mean and interquartile range below; Workers is the number of php-fpm workers that served the requests. APCu can use one serializer per server, so there is one run per APCu serializer; UserCache and Yac were measured again in each run.
FPM One Fetch Per Request (APCu serializer=php)
| Workload | UserCache | APCu/php | Yac/php | Faster | Workers |
|---|---|---|---|---|---|
constant_ | 2.125 µsmean 2.504p25-p75 1.458-3.083 | 5.542 µsmean 6.440p25-p75 4.792-7.355 | 6.938 µsmean 7.578p25-p75 6.073-8.437 | UserCache 1.00xAPCu/php 2.61xYac/php 3.26x | 5 |
route_ | 2.646 µsmean 3.554p25-p75 1.875-4.469 | 269.583 µsmean 272.954p25-p75 245.823-289.218 | 294.042 µsmean 307.010p25-p75 279.198-324.677 | UserCache 1.00xAPCu/php 101.88xYac/php 111.13x | 5 |
large_ | 2.417 µsmean 2.876p25-p75 1.823-3.511 | 153.916 µsmean 153.520p25-p75 144.135-162.906 | 163.750 µsmean 165.883p25-p75 149.552-178.781 | UserCache 1.00xAPCu/php 63.69xYac/php 67.76x | 5 |
large_ | 2.209 µsmean 2.484p25-p75 1.583-3.094 | 7.042 µsmean 8.295p25-p75 6.459-9.333 | 55.313 µsmean 55.232p25-p75 49.136-57.542 | UserCache 1.00xAPCu/php 3.19xYac/php 25.05x | 5 |
large_ | 3.542 µsmean 4.431p25-p75 2.573-6.094 | 155.625 µsmean 155.013p25-p75 145.104-164.126 | 174.688 µsmean 175.513p25-p75 160.739-186.885 | UserCache 1.00xAPCu/php 43.94xYac/php 49.33x | 5 |
metadata_ | 3.584 µsmean 4.739p25-p75 2.656-6.583 | 301.146 µsmean 302.736p25-p75 272.937-315.864 | 331.125 µsmean 338.422p25-p75 304.792-359.865 | UserCache 1.00xAPCu/php 84.04xYac/php 92.40x | 5 |
metadata_ | 4.291 µsmean 4.822p25-p75 3.000-6.708 | 296.709 µsmean 306.944p25-p75 277.678-319.500 | 330.209 µsmean 333.448p25-p75 304.011-359.052 | UserCache 1.00xAPCu/php 69.15xYac/php 76.95x | 5 |
sleep_ | 3.480 µsmean 4.428p25-p75 2.448-6.094 | 18.417 µsmean 19.885p25-p75 16.291-22.303 | 22.021 µsmean 23.472p25-p75 19.834-26.135 | UserCache 1.00xAPCu/php 5.29xYac/php 6.33x | 5 |
serialize_ | 3.563 µsmean 4.218p25-p75 2.625-5.489 | 8.125 µsmean 9.385p25-p75 7.250-11.375 | 9.875 µsmean 10.814p25-p75 9.000-12.511 | UserCache 1.00xAPCu/php 2.28xYac/php 2.77x | 5 |
unserialize_ | 4.188 µsmean 4.565p25-p75 3.000-5.969 | 8.959 µsmean 9.622p25-p75 7.865-11.188 | 10.709 µsmean 11.557p25-p75 9.709-13.083 | UserCache 1.00xAPCu/php 2.14xYac/php 2.56x | 5 |
sleep_ | 15.792 µsmean 17.556p25-p75 14.073-19.365 | 95.500 µsmean 96.532p25-p75 87.813-101.438 | 101.959 µsmean 102.709p25-p75 92.490-109.667 | UserCache 1.00xAPCu/php 6.05xYac/php 6.46x | 5 |
sleep_ | 3.063 µsmean 3.642p25-p75 2.198-4.416 | 152.104 µsmean 152.091p25-p75 141.698-162.177 | 167.334 µsmean 166.758p25-p75 153.479-180.781 | UserCache 1.00xAPCu/php 49.67xYac/php 54.64x | 5 |
recursive_ | 13.480 µsmean 14.450p25-p75 12.458-16.438 | 56.959 µsmean 56.636p25-p75 51.949-60.646 | 60.480 µsmean 60.800p25-p75 54.656-64.375 | UserCache 1.00xAPCu/php 4.23xYac/php 4.49x | 5 |
mixed_ | 4.708 µsmean 5.302p25-p75 3.500-6.833 | 30.292 µsmean 31.467p25-p75 27.822-34.052 | 33.751 µsmean 34.084p25-p75 30.406-37.197 | UserCache 1.00xAPCu/php 6.43xYac/php 7.17x | 5 |
product_ | 17.271 µsmean 18.910p25-p75 15.584-20.718 | 100.084 µsmean 100.710p25-p75 90.511-109.594 | 109.458 µsmean 109.510p25-p75 98.813-117.646 | UserCache 1.00xAPCu/php 5.80xYac/php 6.34x | 5 |
multi_ | 2.459 µsmean 2.711p25-p75 1.708-3.323 | 16.459 µsmean 16.718p25-p75 14.812-18.178 | 19.500 µsmean 20.330p25-p75 17.948-22.094 | UserCache 1.00xAPCu/php 6.69xYac/php 7.93x | 5 |
safe_ | 7.188 µsmean 8.010p25-p75 5.834-9.688 | 12.334 µsmean 13.631p25-p75 9.667-16.312 | 12.000 µsmean 13.162p25-p75 10.615-15.177 | UserCache 1.00xYac/php 1.67xAPCu/php 1.72x | 5 |
spl_ | 5.438 µsmean 6.062p25-p75 3.823-7.448 | 38.959 µsmean 38.793p25-p75 34.583-42.416 | 42.000 µsmean 41.948p25-p75 38.375-44.937 | UserCache 1.00xAPCu/php 7.16xYac/php 7.72x | 5 |
spl_ | 5.604 µsmean 6.336p25-p75 4.573-7.302 | 37.875 µsmean 37.929p25-p75 34.240-41.781 | 40.458 µsmean 40.766p25-p75 37.250-43.563 | UserCache 1.00xAPCu/php 6.76xYac/php 7.22x | 5 |
spl_ | 5.563 µsmean 6.309p25-p75 4.198-7.761 | 59.479 µsmean 59.698p25-p75 53.615-64.917 | 61.542 µsmean 61.370p25-p75 54.072-67.375 | UserCache 1.00xAPCu/php 10.69xYac/php 11.06x | 5 |
carbon_ | 320.625 µsmean 347.655p25-p75 295.709-343.678 | 346.021 µsmean 352.263p25-p75 327.500-374.969 | 360.021 µsmean 375.687p25-p75 337.157-387.678 | UserCache 1.00xAPCu/php 1.08xYac/php 1.12x | 5 |
carbon_ | 327.271 µsmean 336.394p25-p75 304.792-350.625 | 368.583 µsmean 384.832p25-p75 346.708-397.532 | 380.250 µsmean 396.050p25-p75 357.542-409.969 | UserCache 1.00xAPCu/php 1.13xYac/php 1.16x | 5 |
raw_ | 24.666 µsmean 25.085p25-p75 21.406-27.698 | 129.291 µsmean 129.704p25-p75 115.698-138.927 | 137.125 µsmean 138.344p25-p75 123.792-146.302 | UserCache 1.00xAPCu/php 5.24xYac/php 5.56x | 5 |
raw_ | 20.355 µsmean 21.145p25-p75 18.198-23.844 | 138.500 µsmean 140.258p25-p75 127.656-151.594 | 149.625 µsmean 149.113p25-p75 135.688-160.312 | UserCache 1.00xAPCu/php 6.80xYac/php 7.35x | 5 |
serialized_ | 3.167 µsmean 3.650p25-p75 2.292-4.136 | 3.542 µsmean 4.047p25-p75 2.750-4.791 | 4.084 µsmean 4.476p25-p75 3.292-5.125 | UserCache 1.00xAPCu/php 1.12xYac/php 1.29x | 5 |
reference_ | 2.584 µsmean 3.238p25-p75 2.000-3.761 | 3.187 µsmean 3.746p25-p75 2.500-4.354 | 3.709 µsmean 4.138p25-p75 3.083-4.791 | UserCache 1.00xAPCu/php 1.23xYac/php 1.44x | 5 |
cycle_ | 2.813 µsmean 3.354p25-p75 2.166-3.938 | 3.354 µsmean 3.802p25-p75 2.542-4.386 | 3.729 µsmean 4.002p25-p75 3.073-4.708 | UserCache 1.00xAPCu/php 1.19xYac/php 1.33x | 5 |
nested_ | 2.313 µsmean 2.739p25-p75 1.698-3.427 | 18.480 µsmean 18.767p25-p75 16.552-20.750 | 20.917 µsmean 21.351p25-p75 19.073-23.292 | UserCache 1.00xAPCu/php 7.99xYac/php 9.05x | 5 |
FPM One Fetch Per Request (APCu serializer=igbinary)
| Workload | UserCache | APCu/igbinary | Yac/php | Faster | Workers |
|---|---|---|---|---|---|
constant_ | 2.021 µsmean 2.535p25-p75 1.500-3.000 | 5.355 µsmean 6.116p25-p75 4.500-7.135 | 6.791 µsmean 7.720p25-p75 6.042-8.719 | UserCache 1.00xAPCu/igbinary 2.65xYac/php 3.36x | 5 |
route_ | 2.542 µsmean 3.063p25-p75 1.750-4.042 | 103.042 µsmean 102.879p25-p75 94.396-111.229 | 301.292 µsmean 304.429p25-p75 282.438-319.469 | UserCache 1.00xAPCu/igbinary 40.54xYac/php 118.55x | 5 |
large_ | 2.417 µsmean 3.054p25-p75 1.750-3.656 | 77.208 µsmean 77.474p25-p75 68.834-83.292 | 165.417 µsmean 167.232p25-p75 149.782-176.969 | UserCache 1.00xAPCu/igbinary 31.94xYac/php 68.44x | 5 |
large_ | 2.042 µsmean 2.597p25-p75 1.583-3.188 | 7.417 µsmean 8.299p25-p75 6.823-8.906 | 54.480 µsmean 53.463p25-p75 46.583-57.063 | UserCache 1.00xAPCu/igbinary 3.63xYac/php 26.69x | 5 |
large_ | 3.167 µsmean 3.884p25-p75 2.208-4.980 | 75.396 µsmean 75.330p25-p75 66.052-82.250 | 167.959 µsmean 169.482p25-p75 154.615-179.188 | UserCache 1.00xAPCu/igbinary 23.81xYac/php 53.04x | 5 |
metadata_ | 4.105 µsmean 5.093p25-p75 2.875-7.208 | 118.271 µsmean 119.553p25-p75 105.469-127.875 | 332.542 µsmean 347.023p25-p75 308.156-353.114 | UserCache 1.00xAPCu/igbinary 28.81xYac/php 81.02x | 5 |
metadata_ | 3.875 µsmean 4.834p25-p75 2.875-6.344 | 118.521 µsmean 118.902p25-p75 107.063-127.115 | 333.313 µsmean 339.651p25-p75 306.052-358.666 | UserCache 1.00xAPCu/igbinary 30.59xYac/php 86.02x | 5 |
sleep_ | 3.167 µsmean 4.046p25-p75 2.324-5.136 | 13.917 µsmean 14.610p25-p75 11.625-16.979 | 21.646 µsmean 22.781p25-p75 19.750-25.636 | UserCache 1.00xAPCu/igbinary 4.39xYac/php 6.84x | 5 |
serialize_ | 3.667 µsmean 4.541p25-p75 2.833-5.719 | 8.230 µsmean 8.935p25-p75 7.073-10.854 | 9.875 µsmean 10.840p25-p75 9.083-12.302 | UserCache 1.00xAPCu/igbinary 2.24xYac/php 2.69x | 5 |
unserialize_ | 4.167 µsmean 4.932p25-p75 3.115-6.156 | 8.813 µsmean 9.785p25-p75 7.823-11.312 | 11.125 µsmean 12.153p25-p75 9.959-13.917 | UserCache 1.00xAPCu/igbinary 2.11xYac/php 2.67x | 5 |
sleep_ | 16.375 µsmean 17.307p25-p75 14.490-19.438 | 55.604 µsmean 55.216p25-p75 50.073-59.136 | 102.583 µsmean 103.012p25-p75 94.813-110.844 | UserCache 1.00xAPCu/igbinary 3.40xYac/php 6.26x | 5 |
sleep_ | 2.792 µsmean 3.404p25-p75 2.125-3.886 | 75.750 µsmean 74.917p25-p75 68.021-81.928 | 165.604 µsmean 165.908p25-p75 151.719-176.636 | UserCache 1.00xAPCu/igbinary 27.14xYac/php 59.32x | 5 |
recursive_ | 13.667 µsmean 14.474p25-p75 12.407-16.156 | 42.375 µsmean 42.588p25-p75 38.157-46.428 | 59.833 µsmean 60.734p25-p75 54.833-65.635 | UserCache 1.00xAPCu/igbinary 3.10xYac/php 4.38x | 5 |
mixed_ | 4.313 µsmean 5.070p25-p75 3.333-5.980 | 22.771 µsmean 23.294p25-p75 19.958-25.958 | 33.667 µsmean 34.251p25-p75 30.906-37.261 | UserCache 1.00xAPCu/igbinary 5.28xYac/php 7.81x | 5 |
product_ | 16.938 µsmean 18.025p25-p75 15.125-20.511 | 68.417 µsmean 69.684p25-p75 62.073-76.479 | 108.250 µsmean 108.264p25-p75 99.500-117.208 | UserCache 1.00xAPCu/igbinary 4.04xYac/php 6.39x | 5 |
multi_ | 2.229 µsmean 2.608p25-p75 1.708-3.177 | 13.292 µsmean 13.837p25-p75 11.698-15.552 | 20.146 µsmean 20.483p25-p75 17.834-22.458 | UserCache 1.00xAPCu/igbinary 5.96xYac/php 9.04x | 5 |
safe_ | 7.167 µsmean 7.762p25-p75 5.781-9.219 | 12.271 µsmean 13.239p25-p75 9.917-16.500 | 12.521 µsmean 14.831p25-p75 10.084-15.469 | UserCache 1.00xAPCu/igbinary 1.71xYac/php 1.75x | 5 |
spl_ | 5.396 µsmean 6.169p25-p75 3.959-7.489 | 17.687 µsmean 18.545p25-p75 15.615-21.229 | 43.396 µsmean 43.581p25-p75 39.385-47.219 | UserCache 1.00xAPCu/igbinary 3.28xYac/php 8.04x | 5 |
spl_ | 5.646 µsmean 6.047p25-p75 4.281-7.031 | 16.542 µsmean 17.287p25-p75 15.073-19.052 | 43.896 µsmean 43.647p25-p75 39.792-47.011 | UserCache 1.00xAPCu/igbinary 2.93xYac/php 7.77x | 5 |
spl_ | 5.563 µsmean 6.236p25-p75 4.104-7.521 | 28.229 µsmean 28.384p25-p75 24.937-30.990 | 62.792 µsmean 62.227p25-p75 56.083-67.396 | UserCache 1.00xAPCu/igbinary 5.07xYac/php 11.29x | 5 |
carbon_ | 325.208 µsmean 325.587p25-p75 303.188-346.917 | 348.708 µsmean 362.766p25-p75 320.511-373.218 | 358.438 µsmean 366.713p25-p75 340.729-384.500 | UserCache 1.00xAPCu/igbinary 1.07xYac/php 1.10x | 5 |
carbon_ | 321.938 µsmean 332.764p25-p75 302.656-349.511 | 349.188 µsmean 359.867p25-p75 325.114-375.125 | 376.167 µsmean 394.866p25-p75 352.573-407.261 | UserCache 1.00xAPCu/igbinary 1.08xYac/php 1.17x | 5 |
raw_ | 24.667 µsmean 25.509p25-p75 21.698-28.761 | 119.292 µsmean 121.271p25-p75 106.031-130.063 | 136.500 µsmean 138.090p25-p75 122.333-147.407 | UserCache 1.00xAPCu/igbinary 4.84xYac/php 5.53x | 5 |
raw_ | 20.542 µsmean 22.200p25-p75 17.948-23.854 | 122.667 µsmean 125.850p25-p75 111.646-132.927 | 149.813 µsmean 149.653p25-p75 136.625-163.156 | UserCache 1.00xAPCu/igbinary 5.97xYac/php 7.29x | 5 |
serialized_ | 2.792 µsmean 3.336p25-p75 2.083-4.000 | 3.896 µsmean 4.410p25-p75 3.042-5.302 | 3.875 µsmean 4.400p25-p75 3.083-5.219 | UserCache 1.00xYac/php 1.39xAPCu/igbinary 1.40x | 5 |
reference_ | 2.875 µsmean 3.439p25-p75 2.084-4.094 | 3.729 µsmean 4.460p25-p75 3.042-5.021 | 3.833 µsmean 4.294p25-p75 3.042-4.802 | UserCache 1.00xAPCu/igbinary 1.30xYac/php 1.33x | 5 |
cycle_ | 2.750 µsmean 3.291p25-p75 2.073-4.063 | 3.813 µsmean 4.335p25-p75 2.917-5.031 | 3.771 µsmean 4.407p25-p75 3.084-5.125 | UserCache 1.00xYac/php 1.37xAPCu/igbinary 1.39x | 5 |
nested_ | 2.271 µsmean 2.643p25-p75 1.667-3.375 | 16.396 µsmean 16.732p25-p75 14.323-18.823 | 21.584 µsmean 21.798p25-p75 19.615-23.396 | UserCache 1.00xAPCu/igbinary 7.22xYac/php 9.50x | 5 |
FPM Hot Read
Each HTTP request through nginx and php-fpm fetches the same payload 100 times, so this measures repeated fetches within one request. Each backend serves 24 requests after 4 warmup requests, 5 at a time. Time is measured inside PHP per fetch. Cells show the median µs, with the mean and interquartile range below; Workers is the number of php-fpm workers that served the requests. APCu can use one serializer per server, so there is one run per APCu serializer; UserCache and Yac were measured again in each run.
FPM Hot Read (APCu serializer=php)
| Workload | UserCache | APCu/php | Yac/php | Faster | Workers |
|---|---|---|---|---|---|
route_ | 0.235 µsmean 0.285p25-p75 0.204-0.362 | 216.942 µsmean 208.922p25-p75 171.755-250.875 | 244.445 µsmean 252.785p25-p75 206.645-293.796 | UserCache 1.00xAPCu/php 922.33xYac/php 1,039.26x | 5 |
large_ | 0.218 µsmean 0.267p25-p75 0.195-0.346 | 146.457 µsmean 144.332p25-p75 107.762-168.439 | 166.354 µsmean 163.312p25-p75 127.510-190.895 | UserCache 1.00xAPCu/php 671.44xYac/php 762.66x | 5 |
large_ | 0.120 µsmean 0.123p25-p75 0.113-0.135 | 4.891 µsmean 5.161p25-p75 4.495-5.307 | 46.416 µsmean 52.610p25-p75 44.381-55.353 | UserCache 1.00xAPCu/php 40.82xYac/php 387.46x | 5 |
large_ | 0.273 µsmean 0.319p25-p75 0.236-0.355 | 115.160 µsmean 123.164p25-p75 98.085-142.245 | 149.355 µsmean 153.335p25-p75 115.638-181.750 | UserCache 1.00xAPCu/php 422.60xYac/php 548.08x | 5 |
metadata_ | 0.362 µsmean 0.389p25-p75 0.307-0.467 | 223.180 µsmean 227.469p25-p75 189.612-260.213 | 252.498 µsmean 271.481p25-p75 221.908-321.179 | UserCache 1.00xAPCu/php 615.68xYac/php 696.56x | 5 |
metadata_ | 0.456 µsmean 0.484p25-p75 0.397-0.565 | 245.091 µsmean 244.708p25-p75 199.652-280.845 | 273.258 µsmean 278.378p25-p75 223.036-319.549 | UserCache 1.00xAPCu/php 537.67xYac/php 599.47x | 5 |
sleep_ | 0.326 µsmean 0.328p25-p75 0.303-0.353 | 10.522 µsmean 11.820p25-p75 9.890-11.132 | 12.637 µsmean 13.515p25-p75 11.958-13.343 | UserCache 1.00xAPCu/php 32.31xYac/php 38.81x | 5 |
serialize_ | 0.466 µsmean 0.473p25-p75 0.437-0.496 | 4.281 µsmean 4.576p25-p75 4.025-4.439 | 5.219 µsmean 5.618p25-p75 4.988-5.391 | UserCache 1.00xAPCu/php 9.19xYac/php 11.20x | 5 |
unserialize_ | 0.524 µsmean 0.520p25-p75 0.463-0.567 | 4.313 µsmean 4.713p25-p75 4.035-4.599 | 5.396 µsmean 5.445p25-p75 5.103-5.661 | UserCache 1.00xAPCu/php 8.22xYac/php 10.29x | 5 |
sleep_ | 9.508 µsmean 10.138p25-p75 9.069-10.103 | 63.798 µsmean 66.585p25-p75 54.482-76.489 | 65.995 µsmean 74.294p25-p75 62.049-84.686 | UserCache 1.00xAPCu/php 6.71xYac/php 6.94x | 5 |
sleep_ | 0.303 µsmean 0.302p25-p75 0.271-0.337 | 125.316 µsmean 124.267p25-p75 96.977-145.281 | 137.991 µsmean 146.768p25-p75 112.608-173.186 | UserCache 1.00xAPCu/php 413.98xYac/php 455.85x | 5 |
recursive_ | 8.419 µsmean 8.587p25-p75 7.845-9.033 | 56.844 µsmean 59.594p25-p75 46.049-72.708 | 63.046 µsmean 67.139p25-p75 50.889-80.721 | UserCache 1.00xAPCu/php 6.75xYac/php 7.49x | 5 |
mixed_ | 0.636 µsmean 0.621p25-p75 0.560-0.681 | 16.404 µsmean 17.036p25-p75 15.910-17.965 | 20.130 µsmean 20.670p25-p75 19.689-21.327 | UserCache 1.00xAPCu/php 25.78xYac/php 31.64x | 5 |
product_ | 6.008 µsmean 5.968p25-p75 5.608-6.261 | 78.267 µsmean 81.766p25-p75 62.605-93.704 | 80.320 µsmean 90.634p25-p75 71.177-105.701 | UserCache 1.00xAPCu/php 13.03xYac/php 13.37x | 5 |
multi_ | 0.191 µsmean 0.193p25-p75 0.176-0.203 | 9.365 µsmean 9.814p25-p75 8.732-9.966 | 11.828 µsmean 13.187p25-p75 11.109-12.520 | UserCache 1.00xAPCu/php 49.02xYac/php 61.91x | 5 |
safe_ | 0.652 µsmean 0.645p25-p75 0.614-0.697 | 2.976 µsmean 2.955p25-p75 2.756-3.096 | 3.163 µsmean 3.250p25-p75 2.997-3.463 | UserCache 1.00xAPCu/php 4.56xYac/php 4.85x | 5 |
spl_ | 0.909 µsmean 0.901p25-p75 0.793-0.976 | 22.026 µsmean 25.883p25-p75 21.270-23.624 | 25.257 µsmean 25.377p25-p75 24.921-25.800 | UserCache 1.00xAPCu/php 24.24xYac/php 27.79x | 5 |
spl_ | 1.395 µsmean 1.378p25-p75 1.298-1.442 | 33.009 µsmean 36.439p25-p75 32.086-36.165 | 41.833 µsmean 48.217p25-p75 38.742-57.050 | UserCache 1.00xAPCu/php 23.67xYac/php 30.00x | 5 |
carbon_ | 290.019 µsmean 297.883p25-p75 238.901-364.781 | 316.859 µsmean 311.684p25-p75 258.507-351.938 | 311.635 µsmean 309.830p25-p75 252.736-375.413 | UserCache 1.00xYac/php 1.07xAPCu/php 1.09x | 5 |
carbon_ | 320.333 µsmean 318.112p25-p75 242.387-398.933 | 343.540 µsmean 351.344p25-p75 277.204-404.143 | 363.299 µsmean 419.841p25-p75 318.716-483.958 | UserCache 1.00xAPCu/php 1.07xYac/php 1.13x | 5 |
raw_ | 9.568 µsmean 10.089p25-p75 8.819-10.463 | 138.346 µsmean 138.720p25-p75 107.730-167.301 | 153.067 µsmean 149.334p25-p75 119.801-173.859 | UserCache 1.00xAPCu/php 14.46xYac/php 16.00x | 5 |
raw_ | 7.793 µsmean 8.033p25-p75 7.381-8.297 | 157.846 µsmean 153.740p25-p75 117.533-176.804 | 184.777 µsmean 182.219p25-p75 151.421-215.424 | UserCache 1.00xAPCu/php 20.26xYac/php 23.71x | 5 |
serialized_ | 0.251 µsmean 0.261p25-p75 0.224-0.285 | 0.670 µsmean 0.676p25-p75 0.639-0.715 | 0.780 µsmean 0.791p25-p75 0.744-0.847 | UserCache 1.00xAPCu/php 2.67xYac/php 3.11x | 5 |
reference_ | 0.191 µsmean 0.213p25-p75 0.182-0.218 | 0.467 µsmean 0.482p25-p75 0.419-0.519 | 0.558 µsmean 0.636p25-p75 0.529-0.622 | UserCache 1.00xAPCu/php 2.44xYac/php 2.92x | 5 |
cycle_ | 0.253 µsmean 0.270p25-p75 0.235-0.296 | 0.695 µsmean 0.699p25-p75 0.631-0.744 | 0.798 µsmean 0.809p25-p75 0.767-0.862 | UserCache 1.00xAPCu/php 2.75xYac/php 3.16x | 5 |
nested_ | 0.188 µsmean 0.190p25-p75 0.164-0.211 | 10.064 µsmean 10.070p25-p75 9.592-10.519 | 12.639 µsmean 12.973p25-p75 11.534-13.000 | UserCache 1.00xAPCu/php 53.61xYac/php 67.33x | 5 |
FPM Hot Read (APCu serializer=igbinary)
| Workload | UserCache | APCu/igbinary | Yac/php | Faster | Workers |
|---|---|---|---|---|---|
route_ | 0.250 µsmean 0.292p25-p75 0.216-0.348 | 77.568 µsmean 82.685p25-p75 67.263-89.692 | 320.230 µsmean 318.410p25-p75 245.450-350.095 | UserCache 1.00xAPCu/igbinary 310.53xYac/php 1,281.97x | 5 |
large_ | 0.229 µsmean 0.270p25-p75 0.194-0.365 | 74.612 µsmean 75.549p25-p75 57.775-86.259 | 180.986 µsmean 175.026p25-p75 147.470-207.208 | UserCache 1.00xAPCu/igbinary 326.17xYac/php 791.19x | 5 |
large_ | 0.119 µsmean 0.126p25-p75 0.115-0.133 | 4.706 µsmean 5.441p25-p75 4.564-5.119 | 66.497 µsmean 69.453p25-p75 52.778-76.639 | UserCache 1.00xAPCu/igbinary 39.49xYac/php 558.00x | 5 |
large_ | 0.294 µsmean 0.337p25-p75 0.255-0.389 | 71.240 µsmean 73.178p25-p75 54.590-83.587 | 182.801 µsmean 179.317p25-p75 155.085-210.030 | UserCache 1.00xAPCu/igbinary 242.35xYac/php 621.86x | 5 |
metadata_ | 0.353 µsmean 0.420p25-p75 0.317-0.508 | 109.392 µsmean 110.737p25-p75 84.650-127.915 | 311.818 µsmean 326.716p25-p75 301.480-366.387 | UserCache 1.00xAPCu/igbinary 310.33xYac/php 884.58x | 5 |
metadata_ | 0.497 µsmean 0.630p25-p75 0.463-0.709 | 111.811 µsmean 116.274p25-p75 87.455-135.146 | 400.872 µsmean 391.594p25-p75 345.442-422.108 | UserCache 1.00xAPCu/igbinary 225.12xYac/php 807.12x | 5 |
sleep_ | 0.324 µsmean 0.331p25-p75 0.310-0.360 | 5.450 µsmean 6.117p25-p75 5.312-5.689 | 11.794 µsmean 12.626p25-p75 11.435-12.995 | UserCache 1.00xAPCu/igbinary 16.80xYac/php 36.36x | 5 |
serialize_ | 0.460 µsmean 0.450p25-p75 0.407-0.502 | 3.221 µsmean 3.194p25-p75 3.000-3.426 | 5.115 µsmean 5.419p25-p75 4.886-5.527 | UserCache 1.00xAPCu/igbinary 7.01xYac/php 11.12x | 5 |
unserialize_ | 0.536 µsmean 0.532p25-p75 0.478-0.553 | 3.371 µsmean 3.358p25-p75 3.119-3.562 | 5.346 µsmean 5.636p25-p75 5.092-5.772 | UserCache 1.00xAPCu/igbinary 6.29xYac/php 9.97x | 5 |
sleep_ | 9.627 µsmean 10.147p25-p75 9.111-10.284 | 32.664 µsmean 36.599p25-p75 31.213-37.488 | 86.328 µsmean 86.981p25-p75 63.435-101.911 | UserCache 1.00xAPCu/igbinary 3.39xYac/php 8.97x | 5 |
sleep_ | 0.300 µsmean 0.306p25-p75 0.287-0.318 | 50.429 µsmean 57.894p25-p75 47.888-61.224 | 138.743 µsmean 147.477p25-p75 111.665-180.886 | UserCache 1.00xAPCu/igbinary 167.87xYac/php 461.85x | 5 |
recursive_ | 8.482 µsmean 8.434p25-p75 7.880-8.896 | 34.149 µsmean 36.812p25-p75 32.429-36.341 | 51.915 µsmean 57.000p25-p75 49.835-62.223 | UserCache 1.00xAPCu/igbinary 4.03xYac/php 6.12x | 5 |
mixed_ | 0.632 µsmean 0.645p25-p75 0.605-0.670 | 11.152 µsmean 11.805p25-p75 10.546-11.708 | 20.715 µsmean 22.334p25-p75 19.949-22.226 | UserCache 1.00xAPCu/igbinary 17.64xYac/php 32.76x | 5 |
product_ | 6.086 µsmean 6.399p25-p75 5.678-6.549 | 46.724 µsmean 49.313p25-p75 38.803-52.486 | 82.793 µsmean 91.320p25-p75 75.006-102.951 | UserCache 1.00xAPCu/igbinary 7.68xYac/php 13.60x | 5 |
multi_ | 0.197 µsmean 0.198p25-p75 0.185-0.209 | 5.433 µsmean 5.680p25-p75 5.253-5.900 | 11.575 µsmean 12.241p25-p75 11.185-12.360 | UserCache 1.00xAPCu/igbinary 27.60xYac/php 58.80x | 5 |
safe_ | 0.674 µsmean 0.663p25-p75 0.626-0.708 | 3.122 µsmean 3.187p25-p75 2.872-3.226 | 3.240 µsmean 3.579p25-p75 3.080-3.460 | UserCache 1.00xAPCu/igbinary 4.63xYac/php 4.81x | 5 |
spl_ | 0.893 µsmean 0.871p25-p75 0.815-0.932 | 7.788 µsmean 8.230p25-p75 7.386-8.246 | 25.845 µsmean 27.560p25-p75 24.949-27.096 | UserCache 1.00xAPCu/igbinary 8.72xYac/php 28.94x | 5 |
spl_ | 1.295 µsmean 1.334p25-p75 1.239-1.427 | 12.714 µsmean 13.462p25-p75 12.320-13.870 | 40.951 µsmean 48.209p25-p75 37.189-57.268 | UserCache 1.00xAPCu/igbinary 9.82xYac/php 31.63x | 5 |
carbon_ | 233.902 µsmean 249.818p25-p75 204.262-295.503 | 254.127 µsmean 281.537p25-p75 228.424-338.702 | 277.811 µsmean 300.817p25-p75 243.126-357.210 | UserCache 1.00xAPCu/igbinary 1.09xYac/php 1.19x | 5 |
carbon_ | 244.284 µsmean 270.227p25-p75 228.811-320.906 | 302.664 µsmean 302.604p25-p75 241.934-366.785 | 307.100 µsmean 333.327p25-p75 272.887-398.403 | UserCache 1.00xAPCu/igbinary 1.24xYac/php 1.26x | 5 |
raw_ | 9.817 µsmean 11.877p25-p75 9.197-11.097 | 115.770 µsmean 129.048p25-p75 97.122-147.067 | 155.307 µsmean 149.713p25-p75 117.712-175.089 | UserCache 1.00xAPCu/igbinary 11.79xYac/php 15.82x | 5 |
raw_ | 8.162 µsmean 8.538p25-p75 7.622-8.545 | 128.339 µsmean 132.527p25-p75 106.635-157.277 | 166.448 µsmean 175.929p25-p75 136.230-208.568 | UserCache 1.00xAPCu/igbinary 15.72xYac/php 20.39x | 5 |
serialized_ | 0.259 µsmean 0.269p25-p75 0.235-0.299 | 0.736 µsmean 0.739p25-p75 0.681-0.783 | 0.829 µsmean 0.876p25-p75 0.788-0.937 | UserCache 1.00xAPCu/igbinary 2.85xYac/php 3.21x | 5 |
reference_ | 0.196 µsmean 0.205p25-p75 0.174-0.219 | 0.576 µsmean 0.559p25-p75 0.499-0.612 | 0.601 µsmean 0.595p25-p75 0.552-0.657 | UserCache 1.00xAPCu/igbinary 2.93xYac/php 3.06x | 5 |
cycle_ | 0.258 µsmean 0.266p25-p75 0.232-0.296 | 0.714 µsmean 0.708p25-p75 0.636-0.783 | 0.792 µsmean 0.809p25-p75 0.734-0.885 | UserCache 1.00xAPCu/igbinary 2.77xYac/php 3.07x | 5 |
nested_ | 0.189 µsmean 0.192p25-p75 0.170-0.209 | 6.926 µsmean 6.899p25-p75 6.557-7.242 | 12.710 µsmean 13.303p25-p75 11.822-13.455 | UserCache 1.00xAPCu/igbinary 36.61xYac/php 67.19x | 5 |
Memory Usage
Memory per workload and backend, measured in CLI outside the timed loops; smaller is better. The smallest nonnegative cache and per-fetch values are highlighted independently, including ties.
- cache: shared-memory increase from storing one value, including its key and allocator overhead.
- first fetch: PHP heap retained while holding the first fetched value after storing in the same request.
- per fetch: additional PHP heap retained while holding one fetched value in a warm request.
- request hold: heap remaining after releasing fetched values and collecting cycles, including store-seeded state.
- Fetch memory excludes mutation. Yac does not expose allocator usage: cache and baseline are n/a; reserved capacity is reported separately. Missing measurements are n/a.
| Workload | UserCache | APCu/php | APCu/igbinary | Yac/php |
|---|---|---|---|---|
constant_array | cache 5.4 KiBfirst fetch 248 Bper fetch 0 Brequest hold 440 B | cache 1.8 KiBfirst fetch 11.0 KiBper fetch 11.0 KiBrequest hold 64 B | cache 784 Bfirst fetch 7.8 KiBper fetch 7.8 KiBrequest hold 64 B | cache n/afirst fetch 11.0 KiBper fetch 11.0 KiBrequest hold 120 B |
route_table_read | cache 272.0 KiBfirst fetch 248 Bper fetch 0 Brequest hold 488 B | cache 164.3 KiBfirst fetch 948.7 KiBper fetch 948.7 KiBrequest hold 112 B | cache 33.9 KiBfirst fetch 370.1 KiBper fetch 370.1 KiBrequest hold 112 B | cache n/afirst fetch 948.7 KiBper fetch 948.7 KiBrequest hold 168 B |
large_array | cache 210.0 KiBfirst fetch 248 Bper fetch 0 Brequest hold 536 B | cache 88.1 KiBfirst fetch 438.8 KiBper fetch 438.8 KiBrequest hold 160 B | cache 34.6 KiBfirst fetch 302.2 KiBper fetch 302.2 KiBrequest hold 160 B | cache n/afirst fetch 438.9 KiBper fetch 438.8 KiBrequest hold 216 B |
large_string | cache 194.0 KiBfirst fetch 248 Bper fetch 0 Brequest hold 456 B | cache 192.2 KiBfirst fetch 196.0 KiBper fetch 196.0 KiBrequest hold 80 B | cache 192.2 KiBfirst fetch 196.0 KiBper fetch 196.0 KiBrequest hold 80 B | cache n/afirst fetch 196.1 KiBper fetch 196.0 KiBrequest hold 136 B |
large_object_graph | cache 210.0 KiBfirst fetch 1.2 KiBper fetch 176 Brequest hold 2.1 KiB | cache 88.4 KiBfirst fetch 439.1 KiBper fetch 439.1 KiBrequest hold 96 B | cache 34.9 KiBfirst fetch 302.6 KiBper fetch 302.6 KiBrequest hold 96 B | cache n/afirst fetch 439.1 KiBper fetch 439.1 KiBrequest hold 152 B |
metadata_object_read | cache 312.0 KiBfirst fetch 1.2 KiBper fetch 192 Brequest hold 2.2 KiB | cache 176.6 KiBfirst fetch 1.01 MiBper fetch 1.01 MiBrequest hold 112 B | cache 40.8 KiBfirst fetch 437.2 KiBper fetch 437.2 KiBrequest hold 112 B | cache n/afirst fetch 1.01 MiBper fetch 1.01 MiBrequest hold 168 B |
metadata_object_fetch_mutate | cache 312.0 KiBfirst fetch 1.2 KiBper fetch 192 Brequest hold 2.2 KiB | cache 176.6 KiBfirst fetch 1.01 MiBper fetch 1.01 MiBrequest hold 112 B | cache 40.8 KiBfirst fetch 437.2 KiBper fetch 437.2 KiBrequest hold 112 B | cache n/afirst fetch 1.01 MiBper fetch 1.01 MiBrequest hold 168 B |
sleep_wakeup_object | cache 21.0 KiBfirst fetch 736 Bper fetch 112 Brequest hold 1.2 KiB | cache 9.6 KiBfirst fetch 51.2 KiBper fetch 51.2 KiBrequest hold 80 B | cache 2.9 KiBfirst fetch 27.6 KiBper fetch 27.6 KiBrequest hold 80 B | cache n/afirst fetch 51.3 KiBper fetch 51.2 KiBrequest hold 136 B |
serialize_magic_entity | cache 13.8 KiBfirst fetch 1.6 KiBper fetch 224 Brequest hold 1.9 KiB | cache 4.0 KiBfirst fetch 22.1 KiBper fetch 22.1 KiBrequest hold 80 B | cache 2.4 KiBfirst fetch 22.1 KiBper fetch 22.1 KiBrequest hold 80 B | cache n/afirst fetch 22.1 KiBper fetch 22.1 KiBrequest hold 136 B |
unserialize_only_entity | cache 14.0 KiBfirst fetch 1.6 KiBper fetch 256 Brequest hold 1.9 KiB | cache 4.4 KiBfirst fetch 22.1 KiBper fetch 22.1 KiBrequest hold 80 B | cache 2.6 KiBfirst fetch 22.1 KiBper fetch 22.1 KiBrequest hold 80 B | cache n/afirst fetch 22.2 KiBper fetch 22.1 KiBrequest hold 136 B |
sleep_wakeup_entity_collection | cache 65.0 KiBfirst fetch 15.7 KiBper fetch 15.1 KiBrequest hold 1.2 KiB | cache 29.9 KiBfirst fetch 253.6 KiBper fetch 253.6 KiBrequest hold 80 B | cache 8.1 KiBfirst fetch 154.7 KiBper fetch 154.7 KiBrequest hold 80 B | cache n/afirst fetch 253.7 KiBper fetch 253.6 KiBrequest hold 136 B |
sleep_wakeup_large_dataset | cache 210.0 KiBfirst fetch 736 Bper fetch 112 Brequest hold 1.2 KiB | cache 89.1 KiBfirst fetch 439.3 KiBper fetch 439.3 KiBrequest hold 80 B | cache 35.6 KiBfirst fetch 302.8 KiBper fetch 302.8 KiBrequest hold 80 B | cache n/afirst fetch 439.4 KiBper fetch 439.3 KiBrequest hold 136 B |
recursive_reference_graph | cache 39.0 KiBfirst fetch 12.8 KiBper fetch 12.2 KiBrequest hold 1.2 KiB | cache 18.2 KiBfirst fetch 116.1 KiBper fetch 116.1 KiBrequest hold 80 B | cache 5.3 KiBfirst fetch 96.1 KiBper fetch 96.1 KiBrequest hold 80 B | cache n/afirst fetch 116.2 KiBper fetch 116.1 KiBrequest hold 136 B |
mixed_serialization_payload | cache 42.5 KiBfirst fetch 2.4 KiBper fetch 712 Brequest hold 2.3 KiB | cache 15.1 KiBfirst fetch 79.8 KiBper fetch 79.8 KiBrequest hold 80 B | cache 7.0 KiBfirst fetch 63.3 KiBper fetch 63.3 KiBrequest hold 80 B | cache n/afirst fetch 79.8 KiBper fetch 79.8 KiBrequest hold 136 B |
product_listing_view_model | cache 76.0 KiBfirst fetch 22.7 KiBper fetch 21.7 KiBrequest hold 36.2 KiB | cache 37.2 KiBfirst fetch 234.1 KiBper fetch 234.1 KiBrequest hold 960 B | cache 12.3 KiBfirst fetch 180.6 KiBper fetch 180.6 KiBrequest hold 960 B | cache n/afirst fetch 234.1 KiBper fetch 234.1 KiBrequest hold 1,016 B |
multi_key_config_read | cache 25.8 KiBfirst fetch 248 Bper fetch 0 Brequest hold 432 B | cache 9.3 KiBfirst fetch 43.1 KiBper fetch 43.1 KiBrequest hold 56 B | cache 2.4 KiBfirst fetch 39.2 KiBper fetch 39.2 KiBrequest hold 56 B | cache n/afirst fetch 43.2 KiBper fetch 43.1 KiBrequest hold 112 B |
safe_direct_object | cache 2.3 KiBfirst fetch 2.0 KiBper fetch 976 Brequest hold 5.5 KiB | cache 824 Bfirst fetch 1.4 KiBper fetch 1.4 KiBrequest hold 2.7 KiB | cache 544 Bfirst fetch 1.4 KiBper fetch 1.4 KiBrequest hold 2.7 KiB | cache n/afirst fetch 1.4 KiBper fetch 1.4 KiBrequest hold 2.8 KiB |
spl_collection_object | cache 26.3 KiBfirst fetch 8.9 KiBper fetch 7.6 KiBrequest hold 1.9 KiB | cache 15.4 KiBfirst fetch 90.6 KiBper fetch 90.6 KiBrequest hold 80 B | cache 3.0 KiBfirst fetch 36.7 KiBper fetch 36.7 KiBrequest hold 80 B | cache n/afirst fetch 90.7 KiBper fetch 90.6 KiBrequest hold 136 B |
spl_linked_collection_object | cache 21.0 KiBfirst fetch 8.3 KiBper fetch 6.9 KiBrequest hold 1.9 KiB | cache 15.6 KiBfirst fetch 86.5 KiBper fetch 86.5 KiBrequest hold 112 B | cache 3.0 KiBfirst fetch 33.5 KiBper fetch 33.5 KiBrequest hold 112 B | cache n/afirst fetch 86.5 KiBper fetch 86.5 KiBrequest hold 168 B |
spl_heap_object | cache 38.0 KiBfirst fetch 6.4 KiBper fetch 5.0 KiBrequest hold 1.9 KiB | cache 22.1 KiBfirst fetch 130.1 KiBper fetch 130.1 KiBrequest hold 96 B | cache 3.9 KiBfirst fetch 54.6 KiBper fetch 54.6 KiBrequest hold 96 B | cache n/afirst fetch 130.1 KiBper fetch 130.1 KiBrequest hold 152 B |
carbon_datetime_object | cache 31.0 KiBfirst fetch 124.1 KiBper fetch 122.4 KiBrequest hold 999.9 KiB | cache 31.2 KiBfirst fetch 127.0 KiBper fetch 127.0 KiBrequest hold 997.7 KiB | cache 7.1 KiBfirst fetch 125.8 KiBper fetch 125.8 KiBrequest hold 997.7 KiB | cache n/afirst fetch 127.1 KiBper fetch 127.0 KiBrequest hold 997.8 KiB |
carbon_model_object | cache 39.0 KiBfirst fetch 112.1 KiBper fetch 110.4 KiBrequest hold 920.9 KiB | cache 30.5 KiBfirst fetch 183.1 KiBper fetch 183.1 KiBrequest hold 918.7 KiB | cache 8.1 KiBfirst fetch 165.2 KiBper fetch 165.2 KiBrequest hold 918.7 KiB | cache n/afirst fetch 183.1 KiBper fetch 183.1 KiBrequest hold 918.8 KiB |
raw_datetime_object | cache 82.0 KiBfirst fetch 70.3 KiBper fetch 68.6 KiBrequest hold 93.7 KiB | cache 27.4 KiBfirst fetch 74.7 KiBper fetch 74.7 KiBrequest hold 2.8 KiB | cache 6.6 KiBfirst fetch 73.5 KiBper fetch 73.5 KiBrequest hold 2.8 KiB | cache n/afirst fetch 74.8 KiBper fetch 74.7 KiBrequest hold 2.8 KiB |
raw_model_object | cache 87.0 KiBfirst fetch 53.7 KiBper fetch 51.9 KiBrequest hold 68.9 KiB | cache 29.6 KiBfirst fetch 126.8 KiBper fetch 126.8 KiBrequest hold 2.7 KiB | cache 8.0 KiBfirst fetch 109.0 KiBper fetch 109.0 KiBrequest hold 2.7 KiB | cache n/afirst fetch 126.9 KiBper fetch 126.8 KiBrequest hold 2.8 KiB |
serialized_cycle_object | cache 440 Bfirst fetch 1.2 KiBper fetch 192 Brequest hold 2.1 KiB | cache 408 Bfirst fetch 1.0 KiBper fetch 1.0 KiBrequest hold 80 B | cache 312 Bfirst fetch 1.0 KiBper fetch 1.0 KiBrequest hold 80 B | cache n/afirst fetch 1.1 KiBper fetch 1.0 KiBrequest hold 136 B |
reference_assignment_object | cache 496 Bfirst fetch 1.2 KiBper fetch 160 Brequest hold 2.1 KiB | cache 384 Bfirst fetch 992 Bper fetch 992 Brequest hold 64 B | cache 336 Bfirst fetch 992 Bper fetch 992 Brequest hold 64 B | cache n/afirst fetch 1.0 KiBper fetch 992 Brequest hold 120 B |
cycle_assignment_object | cache 440 Bfirst fetch 1.2 KiBper fetch 192 Brequest hold 2.1 KiB | cache 400 Bfirst fetch 1.0 KiBper fetch 1.0 KiBrequest hold 56 B | cache 304 Bfirst fetch 1.0 KiBper fetch 1.0 KiBrequest hold 56 B | cache n/afirst fetch 1.1 KiBper fetch 1.0 KiBrequest hold 112 B |
nested_array_assignment | cache 31.0 KiBfirst fetch 248 Bper fetch 0 Brequest hold 432 B | cache 7.9 KiBfirst fetch 59.1 KiBper fetch 59.1 KiBrequest hold 56 B | cache 3.2 KiBfirst fetch 54.7 KiBper fetch 54.7 KiBrequest hold 56 B | cache n/afirst fetch 59.1 KiBper fetch 59.1 KiBrequest hold 112 B |
Shared Memory Capacity and Baseline
Reserved capacity and used memory before storing the workload, excluded from the per-value cache delta. The baseline represents startup overhead with the default isolated CLI workers. Values below are medians across workloads.
| Backend | Reserved | Baseline used |
|---|---|---|
| UserCache | 128.00 MiB | 7.40 MiB |
| APCu/php | 128.00 MiB | 640.3 KiB |
| APCu/igbinary | 128.00 MiB | 640.3 KiB |
| Yac/php | 136.00 MiB | n/a |
Resident Payload Probe
How close a UserCache fetch gets to data that is already in the request. Resident direct access runs only the access probe on a payload that already exists in the request; UserCache fetch + access is the CLI repeated read time. The difference estimates what the fetch itself costs (note).
| Workload | Resident direct access | UserCache fetch + access | Estimated fetch overhead | Resident / UserCache |
|---|---|---|---|---|
constant_resident baseline note | 0.066 µs | 0.107 µs | 0.042 µs | 0.61x |
route_resident baseline note | 0.123 µs | 0.139 µs | 0.016 µs | 0.88x |
large_resident baseline note | 0.086 µs | 0.110 µs | 0.025 µs | 0.78x |
large_resident baseline note | 0.042 µs | 0.068 µs | 0.026 µs | 0.61x |
product_resident baseline note | 0.108 µs | 4.764 µs | 4.656 µs | 0.02x |
Bulk Read
Each run primes the key set, then times fetching all keys as one batch: a multi-key call (UserCache fetchMultiple(), APCu apcu_fetch(array), Yac get(array)) and a per-key loop. Times are µs per batch; the fastest median is green.
Bulk Read: 32 Keys
| Backend | Median/batch | Mean/batch | Mean/key |
|---|---|---|---|
user_UserCache fetchMultiple | 0.490 µs | 0.496 µs | 0.015 µs |
user_UserCache fetch loop | 0.968 µs | 0.977 µs | 0.031 µs |
apcu_APCu/php fetch array | 10.582 µs | 10.876 µs | 0.340 µs |
apcu_APCu/php fetch loop | 11.465 µs | 11.564 µs | 0.361 µs |
yac_Yac get array | 15.955 µs | 16.602 µs | 0.519 µs |
yac_Yac get loop | 16.662 µs | 17.302 µs | 0.541 µs |
apcu_APCu/igbinary fetch array | 10.659 µs | 10.653 µs | 0.333 µs |
apcu_APCu/igbinary fetch loop | 11.759 µs | 12.011 µs | 0.375 µs |
Bulk Read: 128 Keys
| Backend | Median/batch | Mean/batch | Mean/key |
|---|---|---|---|
user_UserCache fetchMultiple | 1.846 µs | 1.835 µs | 0.014 µs |
user_UserCache fetch loop | 4.563 µs | 4.426 µs | 0.035 µs |
apcu_APCu/php fetch array | 40.339 µs | 41.431 µs | 0.324 µs |
apcu_APCu/php fetch loop | 47.664 µs | 47.988 µs | 0.375 µs |
yac_Yac get array | 62.862 µs | 63.330 µs | 0.495 µs |
yac_Yac get loop | 65.065 µs | 66.258 µs | 0.518 µs |
apcu_APCu/igbinary fetch array | 42.010 µs | 43.136 µs | 0.337 µs |
apcu_APCu/igbinary fetch loop | 52.418 µs | 54.130 µs | 0.423 µs |
Workloads
What each workload stores and reads. Workload names in the result tables link here.
| Workload | What It Measures | Measured In |
|---|---|---|
constant_Constant array | Small immutable constant-array payload.Mutates fetched copy: no | CLI repeated read, CLI store, Resident direct access, FPM one fetch/request |
route_Compiled route table read | Framework-shaped compiled route table and URL generator arrays.Mutates fetched copy: no | CLI repeated read, CLI store, Resident direct access, FPM one fetch/request, FPM hot read |
large_Large nested array | Larger object-free nested array with repeated scalar leaves.Mutates fetched copy: no | CLI repeated read, CLI store, Resident direct access, FPM one fetch/request, FPM hot read |
large_Large immutable string | Large string payload that stresses byte-copy avoidance on repeated reads.Mutates fetched copy: no | CLI repeated read, CLI store, Resident direct access, FPM one fetch/request, FPM hot read |
large_Large direct userland-object graph | Large payload object containing many array rows and a child object.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
metadata_Application metadata object read | Application metadata object with route and service metadata arrays.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
metadata_Application metadata object fetch and mutate | Fetches a cached userland object graph, then mutates the fetched copy.Mutates fetched copy: yes | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
sleep___sleep()/__wakeup() contract object | Object routed through the serialization contract: __sleep() filters state on store, __wakeup() runs per fetch.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
serialize___serialize()/__unserialize() entity | Modern entity pair using the __serialize()/__unserialize() contract with a related entity.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
unserialize___unserialize() only entity | Userland entity declaring __unserialize() without __serialize(), matching the legacy object-data format.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
sleep___sleep() entity result-set collection | ORM-style result set: 100 small entities each running the __sleep()/__wakeup() contract.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
sleep___sleep() object holding a large dataset | Report-style object with the standard large row set behind the serialization contract.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
recursive_Recursive parent/child reference graph | Category-tree object graph with parent back-references and the __sleep()/__wakeup() contract.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
mixed_Mixed plain and contract payload | Realistic cache entry mixing plain arrays, __serialize() entities, and __sleep() objects.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
product_Product listing view-model | Production-shaped product-list cache entry mixing DTO objects, facet arrays, pagination context, and generated-at metadata.Mutates fetched copy: no | CLI repeated read, CLI store, Resident direct access, FPM one fetch/request, FPM hot read |
multi_Multi-key configuration read | Configuration-entry map carried over from the old multi-key workload.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
safe_DateTime/DateInterval direct-restore object | DateTimeImmutable, DateTimeZone, and DateInterval safe-direct state.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
spl_SPL collection direct-restore object | ArrayObject, ArrayIterator, RecursiveArrayIterator, and SplFixedArray state.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
spl_SPL linked-list direct-restore object | SplDoublyLinkedList, SplQueue, and SplStack state.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request |
spl_SPL heap direct-restore object | SplMinHeap, SplMaxHeap, and SplPriorityQueue state.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
carbon_Carbon DateTime serializer object | CarbonImmutable/Carbon/CarbonTimeZone object graph used to compare DateTime-derived restore costs.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
carbon_Model with Carbon properties | Dummy model objects with three Carbon properties: createdAt, updatedAt, and publishedAt.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
raw_Raw DateTime serializer object | DateTimeImmutable/DateTime/DateTimeZone object graph mirroring carbon_datetime_object with native date types.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
raw_Model with DateTime properties | Dummy model objects with three native DateTime properties: createdAt, updatedAt, and publishedAt.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
serialized_Serialized cyclic object | Cyclic object graph workload used to exercise serialization fallback behavior.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
reference_Assigned object with child reference | Userland object with a nested referenced child object.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
cycle_Assigned cyclic object | Cyclic userland object graph with identity-preserving peer reference.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
nested_Assigned nested array mutation | Nested array payload used by the old assignment mutation workload.Mutates fetched copy: no | CLI repeated read, CLI store, FPM one fetch/request, FPM hot read |
bulk_read_32_keysBulk Read: 32 Keys | Uses the multi-key config payload, primes 32 keys before timing, then repeatedly fetches all keys as a batch. UserCache is measured with fetchMultiple() and with a per-key fetch() loop; APCu is measured with apcu_fetch(array) and with a per-key loop, once per serializer (php and, when igbinary is available, igbinary); Yac is measured with get(array) and with a per-key loop.Measured batches per iteration: 1500 | Bulk read |
bulk_read_128_keysBulk Read: 128 Keys | Uses the multi-key config payload, primes 128 keys before timing, then repeatedly fetches all keys as a batch. UserCache is measured with fetchMultiple() and with a per-key fetch() loop; APCu is measured with apcu_fetch(array) and with a per-key loop, once per serializer (php and, when igbinary is available, igbinary); Yac is measured with get(array) and with a per-key loop.Measured batches per iteration: 600 | Bulk read |
Notes
Already-resident data is a baseline
The resident table does not include UserCache store time. It compares direct access to an already-resident payload with fetching a previously stored UserCache entry and running the same access probe. The difference estimates fetch and materialization overhead after the value has already been stored. The primary comparison for UserCache is against APCu/php and APCu/igbinary when reconstructing object-heavy payloads, not against literals already resident in the request.
Slower stores are an expected trade-off for faster reads
Store workloads are shown to make the write-side cost explicit. APCu-style shared caches are usually used for read-heavy paths, where a stored value is read many times. Store throughput is an intentional trade-off in this design, not the metric it is optimized for.
Environment
| PHP | 8.7.0-dev (cli) |
|---|---|
| Thread Safety | NTS |
| Binary | /workspaces/php-src/sapi/cli/php |
| System | Linux db8474bfaa8d 7.0.14-orbstack-00380-ga7e0a2dc9535 #1 SMP PREEMPT Fri Aug 7 03:48:40 UTC 2026 aarch64 |
| user_cache.shm_size | 128M |
| Loaded extensions | apcu, Core, ctype, date, dom, fileinfo, filter, hash, iconv, igbinary, json, lexbor, libxml, pcntl, pcre, PDO, pdo_sqlite, Phar, posix, random, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, uri, user_cache, xml, xmlreader, xmlwriter, yac, Zend OPcache |
| Aggregation | median across 3 runs |
| CPU affinity | 0-3 |
| apc.shm_size | 128M |
| yac.serializer | php |
| yac.compress_threshold | -1 |
| yac.keys_memory_size | 8M |
| yac.values_memory_size | 128M |
Data
The numbers on this page are embedded in it as JSON, in <script id="embedded-result" type="application/json"> (schema user_cache_benchmark_report, version 1). summary holds the values behind the cards and summary tables; results holds each input file below, unchanged. When results.cli_write is null, the store rows are in results.cli_read.data.write. Source paths are relative to the benchmark harness repository.
JSON.parse(document.getElementById('embedded-result').textContent)
| JSON key | Input | Source file |
|---|---|---|
results.cli_read | CLI repeated read | results/read-workloads-20260930-final/median/cli-read/user-cache-benchmark-median.json |
results.cli_write | CLI store | results/read-workloads-20260930-final/median/cli-write/user-cache-benchmark-median.json |
results.resident | Resident payload probe | results/read-workloads-20260930-final/median/resident-payload-probe.json |
results.fpm_read_once[0] | FPM one fetch/request (APCu serializer=php) | results/read-workloads-20260930-final/median/fpm-read-once-php.json |
results.fpm_read_once[1] | FPM one fetch/request (APCu serializer=igbinary) | results/read-workloads-20260930-final/median/fpm-read-once-igbinary.json |
results.fpm_read_hot[0] | FPM hot read (APCu serializer=php) | results/read-workloads-20260930-final/median/fpm-read-hot-php.json |
results.fpm_read_hot[1] | FPM hot read (APCu serializer=igbinary) | results/read-workloads-20260930-final/median/fpm-read-hot-igbinary.json |
results.bulk_read[0] | Bulk read: 32 keys | results/read-workloads-20260930-final/median/bulk-read-32.json |
results.bulk_read[1] | Bulk read: 128 keys | results/read-workloads-20260930-final/median/bulk-read-128.json |
summary.frankenphp | FrankenPHP persistence summary (the full aggregate is embedded in that report) | BENCH_RESULT_PERSISTENCE.html |