Same docker-compose.yml run slowly on different machine

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