Random slowness

I am working with an iMac 27" (iMac 12,2) and I have switched from OS X to Debian as I got unacceptable performance issues with boot2docker (Apparently coming from the mulitple FS layers).

As I’m using Fig, it doesn’t took too much time to switch from OS X to Debian. Now running fig up or running my test suite is fast as expected.

Now my issue is that sometimes, when I run a command, Docker is super slow.
For instance, I’m developing a Rails application and I needed to rebuild my database with rake db:drop db:create db:setup. Usually this is taking something like a seconde but this time it 5 to 6 minutes as all queries were slow.
But then in the case I run again the same command, it takes a second doing excately the same thing.

Finaly when I run my test suite and I look at the resources usage, the processes are not taking more than 15% of a CPU core.

So here are my questions:

  1. Is it possible that running htop on the host is not showing the real CPU usage of the container processes ?
  2. Is there anything I could check in order to find a solution ?
  3. What could be the reason of this behavior ?

Thank you in advance.

5 6 minutes sounds super odd.

You should expect stuff like rails c to be about half the speed you get on bare metal cause stat calls in AUFS and even BTRFS are slow compared to running on the host.

Thank you @sam for your reply.

Since that, I have installed atop and got my SSD drive busy at 88% while RethinkDB were starting … so it seems to be the root cause of this slow issue.
I will continue to investigate more …