Docker/Vagrant on Mac speed tests

So file synching is a pain int he ass on MacOS so I made some tests with "wrk" tool to see what is what and how much request per second can each config handle. I started with install.php on D8 site as it is more about file and less about database and caching. Tool was used with this config (30s of requests) 

 wrk -d30s http://drupal.plain:8700/

Docker with default synching on volume, config looks like (  - ./:/var/www/html)

  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     0.00us    0.00us   0.00us     nan%
    Req/Sec     1.33      2.82    10.00     86.67%
  16 requests in 30.08s, 261.81KB read
  Socket errors: connect 0, read 0, write 0, timeout 16
Requests/sec:      0.53
Transfer/sec:      8.70KB

Docker with cached synching on volume, config looks like (  - ./:/var/www/html:cached )

  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     0.00us    0.00us   0.00us     nan%
    Req/Sec     2.74      4.75    20.00     85.71%
  49 requests in 30.01s, 801.80KB read
  Socket errors: connect 0, read 0, write 0, timeout 49
Requests/sec:      1.63
Transfer/sec:     26.71KB

Docker with docker-sync on volume, config looks like (  - docker-sync:/var/www/html )

  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   470.56ms   99.42ms   1.17s    76.68%
    Req/Sec    11.61      6.54    38.00     60.34%
  635 requests in 30.07s, 10.15MB read
Requests/sec:     21.12
Transfer/sec:    345.51KB

I also tried this with plain drupal 8 installation, so here are results

Plain website with native synch

  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    88.11ms   80.00ms 708.84ms   91.38%
    Req/Sec    73.38     22.19   121.00     69.85%
  4083 requests in 30.05s, 40.29MB read
Requests/sec:    135.87
Transfer/sec:      1.34MB

Plain website with :cached on volumes

  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    99.65ms  131.94ms   1.18s    93.92%
    Req/Sec    72.09     21.74   120.00     71.96%
  3999 requests in 30.02s, 39.46MB read
Requests/sec:    133.20
Transfer/sec:      1.31MB

Plain drupal website with docker sync

  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    32.50ms   14.91ms 245.35ms   88.86%
    Req/Sec   158.63     26.98   212.00     72.19%
  9469 requests in 30.08s, 93.44MB read
Requests/sec:    314.84
Transfer/sec:      3.11MB

Numbers with request per second will vary between test, some ±10% sometimes even more but this are would be outliers in some average.
Interesting is that native synch turned out to be same or even faster than cached option when on vanilla drupal site.

For some extras here are some tests on DrupalVm setup that runs D7 site

Vagrant on d7 install.php file (NFS)

  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     0.00us    0.00us   0.00us     nan%
    Req/Sec     9.60     12.26    30.00     80.00%
  10 requests in 30.10s, 50.10KB read
  Socket errors: connect 0, read 0, write 0, timeout 10
Requests/sec:      0.33
Transfer/sec:      1.66KB

Vagrant with d7 site installed (NFS)

  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    30.80ms   10.41ms 133.64ms   78.73%
    Req/Sec   161.88     30.05   212.00     80.51%
  7645 requests in 30.10s, 460.53MB read
  Socket errors: connect 0, read 0, write 0, timeout 10
Requests/sec:    254.00
Transfer/sec:     15.30MB