Skip to content

Instantly share code, notes, and snippets.

@Juraci
Last active February 28, 2018 15:58
Show Gist options
  • Save Juraci/891703dc9fb57f92eaa14bff024f75db to your computer and use it in GitHub Desktop.
Save Juraci/891703dc9fb57f92eaa14bff024f75db to your computer and use it in GitHub Desktop.

What is slow what is fast?

Nitro:

  • How long it takes for the first login screen to appear
  • Amount of time to interact with pages after the login

Profiling on Linux:

Hardware: RAM: 16 GB DDR3 CPU: Core i7 6700 @ 4.4 GHZ Disk: SSD Kingston 120 GB

Software: SO: Linux Debian 9 stretch

Docker: docker-compose: version 1.19.0, build 9e633ef docker: Docker version 17.12.0-ce, build c97c6d6

All with the app volumes mounted:

First request

first request with the app volume mounted

Refresh after first request in the home page

second request in the home page

Profiling on Mac OS:

Hardware RAM: 16 GB DDR3 CPU: Core I7 3.1 GHZ Disk: Macintosh HD SSD

Software: SO: MacOs High Sierra 10.13.2

Docker: docker: Docker version 17.12.0-ce, docker-compose: version 1.18.0 machine: 0.13.0

With mounted app volume

First request with the app volume mounted

first request with the app volume mounted

Without mounted app volume

First request without the app volume mounted

first request without the volume mounted

Page refresh after the first request

without the app volume mounted

Top reasons why:

  • Docker on Linux runs sharing the same main kernel. Docker on Mac has to run a separate Kernel using Virtualization.
  • Sharing files between MacOs and a Virtual OS on a hypervisor breaks down when too many reads and writes are required in a short amount of time.

Alternatives:

 Docker-sync: http://docker-sync.io/
 Develop in the container.
 Use only the services in docker and rails on the host.
 Switch to linux.

References: https://spin.atomicobject.com/2017/06/20/docker-mac-overcoming-slow-volumes/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment