6

We are a team of 4 developers working on the same project.

Our lead dev made a docker script that starts all the containers. Two of the devs use native linux and a good desktop and the website loads in 2 seconds for them. My other colleague used the same windows 10 laptop as me but he loads in 5 seconds and I was loading in 18 seconds.

Now I bought a new (very fast) desktop, and it loads even slower: 22 seconds!

The strangest thing is that none of the containers seem to use much of my hardware..

My previous laptop: i5 7th gen, 16gb RAM, widnows 10. 18 seconds website page load. My PC: i7-12700KF, 32gb RAM, windows 11. 22 seconds website page load.

For my new PC I used WSL2, ubuntu, and stored the project code inside ubuntu, I also startup my docker containers inside this WSL (only my IDE is outside the wsl). My docker (4.7.1) is integrated with my WSL distro.

I have given extra cores, ram and swap ram to the docker by adding an .wslconfig file but it changed nothing.

During the page load my containers barely use any of my cpu or RAM, my php container uses about 1.5 GB RAM from the 15 available, the others barely use anything.

My php container stays on 0.02% of CPU usage during the whole 22 seconds that the backend request takes and only then spikes up to 70% for 1 second during the front-end rendering, js or whatever it does, then goes back to 0.03% (another 20ish seconds loading). The RAM barely moves significantly.

containers

task manager vmmem also barely moves during page load:

task manager

the script does a bunch of things but seems to use mainly this composer.yml file :

  version: '2'

services:
apache:
    container_name: onedocker_apache
    volumes:
        - ../..:/var/www/aragon

php7:
    container_name: onedocker_php7
    links:
        - apache:one.php7.aragon-erh.docker
        - mail:smtp.office365.com
        - mail:auth.smtp.1and1.fr
        - mail:smtp.sendgrid.net
    volumes:
        - ../..:/var/www/aragon
        - node_modules:/var/www/aragon/one/node_modules
        - ../../documents:/mnt/nfs/documents
    working_dir: /var/www/aragon/one
    extra_hosts:
        - excelserver.aragon-erh.com:10.40.0.70

db:
    container_name: onedocker_db
    ports:
        - "3306:3306"
    environment:
        - MYSQL_ROOT_PASSWORD=root
    volumes:
        - ../..:/var/www/aragon
        - db-data:/var/lib/mysql
    working_dir: /var/www/aragon

cache:
    container_name: onedocker_cache

mail:
    container_name: onedocker_mail
    image: mailhog/mailhog
    ports:
        - "8025:8025"
    environment:
        MH_SMTP_BIND_ADDR: 0.0.0.0:587
    user: root
    working_dir: /mailhog

ftp:
    container_name: onedocker_ftp
    image: stilliard/pure-ftpd
    restart: always
    ports:
        - "21:21"
        - "30000-30009:30000-30009"
    volumes:
        - "../../ftp/data:/home/aragon/"
        - "../../ftp/passwd:/etc/pure-ftpd/passwd"
        - "../Conf/ftp:/etc/ssl/private/"
    environment:
        PUBLICHOST: "localhost"
        FTP_USER_NAME: aragon
        FTP_USER_PASS: xxxxxxxxx
        FTP_USER_HOME: /home/aragon

volumes: db-data: driver: local node_modules:

Switching to linux (mint) fixes the docker issue I had on windows. Website went from loading in 22 sec to 0.7 sec with the same config setup.

So definitely a Windows issue, the question still stands.

1
  • 1
    Any chance you checked the project out to a Windows drive? That could explain the speed difference between your colleague's Window 11 speeds vs. yours. Commented Apr 21, 2022 at 17:56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.