Docker Community Forums

Share and learn in the Docker community.

Same docker-compose.yml run slowly on different machine

I build a docker project - ruby on rails - and this app depends on mysql, redis , elasticsearch and kibana, I was able to run the whole package on my local machine and all seems good, however when I tried to run the same config on my teammate machine the ruby rails app was taking long time to execute the shell commands, like
rake bower:install
when I connect to the app via shell command, and CLI command takes a lot of time I am talking about 15~25 minute like rails c and execute any rake command.

I can’t see any slow in opening the app on the browser, the app open smoothly and data connection between containers are good, I connected to mysql sh and it was smoothly interact with the container. but I can’t find reason for what happens with the ruby app.

mysql, redis, elasticsearch and the ruby rails app all use volumes.
check this gist for the docker-compose.yml I am using

your help is appreciated

Could you tell more about the two machines? Even without Docker there could be many things to slow processes down. Filesystem, disk types (SSD, HDD, etc…), network, cpu, memory, probably other softwares like antiviruses, firewalls. You need to compare those two machines and try to run as small part of the whole application as you can to see if anything else matters. Try on other machines to see which machine works differently If the working machine has more memory or cpu, try to limit it on the other. Try it in a virtual machine, if you can.

In case of Mac in which category this topic is, you can alos have two different virtualization types. One could have a Intel CPU, the other could have M1. So as I wrote, try to compare every parameter of those two machines and when you know the relevant difference, you can probably solve it.

When you think, you know the difference, try to reproduce that in an other environment, if you can’t, you need to continue the search

thank you @rimelek
my machine is macos Mojava v-10.14.6 , MacBook Pro (Retina, 15-inch, Mid 2015), processor 2.2 GHz Intel Core i7 , Mem: 16 GB 1600 MHz DDR3

the other is macos BigSur, MacBook Pro (15-inch, 2017), processor: 2.8 GHz Quad Core Intel Core i7 , Mem: 16 GB 2133 MHz LPDDR3

Both are APFS

File System Personality:   APFS
   Type (Bundle):             apfs
   Name (User Visible):       APFS
   Owners:                    Enabled

from docker side I give it 4CPU, 8.00 GB Mem, swap 1.5 G, and disk Image 24GB

Interesting. Your teammate’s machine looks slightly better in every way. So is there any difference between the two Docker desktops? For example Desktop version, virtualization type (experimental feature, introduced in Big Sur) or file sharing (grpc or legacy). I don’t know when the grpc fuse was introduced.

*File permissions is granted

  • Use gRPC FUSE for file sharing is enabled for both

  • Docker Engine (v20.10.11) : “experimental”: false

  • Docker Desktop: (my docker is using v-4.3.1, the other machine is using the latest version 4.3.2

even these differences are in the software, or even the hardware, why the only issue is on the ruby rails app container commands ?

on my machine

the other machine (code 127 when stop it)

I don’t know, but I have learned to believe in the unbelievable :slight_smile:

This looks like a “file not found” error code but how this is related to the speed difference?

:sweat_smile: yeh you will see every thing as programmer.
the second img was forces stoped after 15 min, just to compare with the first img which did not take 1 minute to finish :thinking: .

we decided to run it on a third machine to see if we faced the same issue :disappointed: thanks for replying I really appreciate it.