0

I use a stack of different docker container on Ubuntu and they are, compared to a Windows with WSL very slow. We can rule out network issues, because a simple Symfony Command that only measures the exection duration with micro_time, takes 0.5 seconds on my machine, and 0.1 on the Windows machine.

There was one major difference: I used a bind mount to mount the symfony code in my cli container (Image: php:7.4-cli), the windows machine uses a shared volume with an automated sftp upload.

My first approach was to also use a shared mount, but there is no speed improvement. Other approaches, like cached volumes, didn't change anything, and I also rule out my hard disk, because it's a pretty fast M.2 SSD.

Sebus
  • 3,752
  • 3
  • 14
  • 22
  • 1
    The Ubuntu system is slower; this is not [docker on wsl2 very slow](https://stackoverflow.com/questions/62154016/docker-on-wsl2-very-slow)? If you're trying to run code that only exists on the host and you're not using Docker's image system, can you `sudo apt-get install` a PHP interpreter and avoid the complexities of Docker? – David Maze Feb 27 '23 at 14:30
  • Yes, it's the Ubunu system. It's a system with 10 containers, so working on the host system is not an alternative. And fyi: I have the same slow speed even if I only start the php and the redis container – Sebus Feb 27 '23 at 14:51

0 Answers0