Skip to content

Intel Core i5 3.8 GHz iMac (Retina 5K, 27 inch, 2017) PHP 7.4.4

Akihito Koriyama edited this page Apr 21, 2020 · 2 revisions

Benchmark

Environment

  • 3.8 GHz クアッドコア Intel Core i5 - iMac (Retina 5K, 27-inch, 2017) 48G-RAM
  • PHP 7.4.4

Parameters

wrk {uri}

200 OK Test

wrk {uri}

Apache no preaload + vendor/autoload (slowest)

Running 10s test @ http://127.0.0.1/
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    28.48ms   50.77ms 280.25ms   85.17%
    Req/Sec     1.38k   407.99     2.74k    69.00%
  27421 requests in 10.01s, 5.57MB read
Requests/sec:   2738.68
Transfer/sec:    570.16KB

Apache preaload + compiled-autoload (faster)

Running 10s test @ http://127.0.0.1/
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    26.67ms   52.09ms 331.42ms   86.10%
    Req/Sec     2.77k   678.75     4.53k    69.31%
  55703 requests in 10.10s, 11.32MB read
Requests/sec:   5515.10
Transfer/sec:      1.12MB

Swoole (fastest)

Running 10s test @ http://127.0.0.1:8080/
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   588.94us  308.01us   2.64ms   79.87%
    Req/Sec     8.73k     2.46k   13.34k    52.97%
  175538 requests in 10.10s, 33.48MB read
Requests/sec:  17379.66
Transfer/sec:      3.31MB

以下参考

Apache no preaload + compiled-autoload

Running 10s test @ http://127.0.0.1/
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    27.31ms   52.17ms 311.35ms   86.01%
    Req/Sec     2.34k   643.22     3.99k    65.84%
  47051 requests in 10.10s, 9.57MB read
Requests/sec:   4658.30
Transfer/sec:      0.95MB

Apache preaload + vendor/autoload

Running 10s test @ http://127.0.0.1/
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    26.64ms   52.82ms 376.23ms   86.30%
    Req/Sec     2.70k   765.22     5.28k    71.64%
  54027 requests in 10.10s, 10.98MB read
Requests/sec:   5349.23
Transfer/sec:      1.09MB

Swooleでスレッドを4に

wrk -t4 http://127.0.0.1:8080/
  4 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     0.97ms    5.22ms 125.29ms   97.31%
    Req/Sec     6.49k     0.96k    8.73k    79.60%
  259458 requests in 10.10s, 49.49MB read
Requests/sec:  25690.37
Transfer/sec:      4.90MB