What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello, when i am using WSL2, the setup is painfully slow. It even runs into timeouts. Compared to th

U012PCVT2DB
U012PCVT2DB Posts: 66 πŸ§‘πŸ»β€πŸš€ - Cadet
edited October 2020 in Docker

Hello,
when i am using WSL2, the setup is painfully slow. It even runs into timeouts.
Compared to this, my working WSL1 is much faster.

I am using Ubuntu 20.04 LTS, installed docker-compose and dockerForWindows is setup to use WSL2, has experimental Features on, as well as "buildkit".
The sourcecode is not hosted inside the WSL-Machine.

So what am i doing wrong here?

Comments

  • Thomas Lehner
    Thomas Lehner Support Engineer @ Spryker Posts: 289 πŸ› - Council (mod)

    what are the specs of your machine?

  • Thomas Lehner
    Thomas Lehner Support Engineer @ Spryker Posts: 289 πŸ› - Council (mod)

    What exactly do you mean by saying the sourcecode is not hosted in the WSL machine?

  • U012PCVT2DB
    U012PCVT2DB Posts: 66 πŸ§‘πŸ»β€πŸš€ - Cadet

    i7-8850H, 32GB, Win10 Pro 2004 - 19041.508

    WSL receives 12GB and 8 cores, no swap

    The sourcecode is accessed by /mnt/d/....

  • Thomas Lehner
    Thomas Lehner Support Engineer @ Spryker Posts: 289 πŸ› - Council (mod)

    By setup you mean docker/sdk up?

  • U012PCVT2DB
    U012PCVT2DB Posts: 66 πŸ§‘πŸ»β€πŸš€ - Cadet

    yes. Composer is really slow and comparing the NodsJS-Installing i can see, that WSL2 is 10x slower than WSL1 and thus runs in to multiple timeouts
    Even the setup of the containers gets stuck, because docker-compose is not found anymore oO

  • U012PCVT2DB
    U012PCVT2DB Posts: 66 πŸ§‘πŸ»β€πŸš€ - Cadet

    docker-sdk is 1.21.0

  • U012PCVT2DB
    U012PCVT2DB Posts: 66 πŸ§‘πŸ»β€πŸš€ - Cadet

    Spryker-B2C 202001

  • Thomas Lehner
    Thomas Lehner Support Engineer @ Spryker Posts: 289 πŸ› - Council (mod)
    edited October 2020

    that is odd. I have experienced some very strange behavior with docker for desktop though, too. What has helped in the past is using absolute latest docker for desktop. Edge Version

  • U012PCVT2DB
    U012PCVT2DB Posts: 66 πŸ§‘πŸ»β€πŸš€ - Cadet

    hm... i haven't used the edge version yet... i can give it a try...

  • Thomas Lehner
    Thomas Lehner Support Engineer @ Spryker Posts: 289 πŸ› - Council (mod)

    It not always helps, and i have not seen the problems you are having, yet, but it has sorted out some problems in the past. Might be worth a try

  • Thomas Lehner
    Thomas Lehner Support Engineer @ Spryker Posts: 289 πŸ› - Council (mod)

    Also, corporate AV and the likes might also be a factor

  • U012PCVT2DB
    U012PCVT2DB Posts: 66 πŸ§‘πŸ»β€πŸš€ - Cadet

    wouldn't that also interfer with the wsl1 setup?

  • U012PCVT2DB
    U012PCVT2DB Posts: 66 πŸ§‘πŸ»β€πŸš€ - Cadet

    from the changelog of docker-edge i don't think it will help

  • Thomas Lehner
    Thomas Lehner Support Engineer @ Spryker Posts: 289 πŸ› - Council (mod)

    AV related issues are pretty much a black box and i have seen all kinds of strange things happening that nobody could explain.

  • Thomas Lehner
    Thomas Lehner Support Engineer @ Spryker Posts: 289 πŸ› - Council (mod)

    Just the process of elimination, right?

  • U012PCVT2DB
    U012PCVT2DB Posts: 66 πŸ§‘πŸ»β€πŸš€ - Cadet

    yep

  • Thomas Lehner
    Thomas Lehner Support Engineer @ Spryker Posts: 289 πŸ› - Council (mod)

    i can confirm though, that this is not a general issue, since wls2 + docker runs well on my machine

  • U012PCVT2DB
    U012PCVT2DB Posts: 66 πŸ§‘πŸ»β€πŸš€ - Cadet

    and i am one of the "lucky"-ones, that can use WSL1 πŸ˜‚

  • Thomas Lehner
    Thomas Lehner Support Engineer @ Spryker Posts: 289 πŸ› - Council (mod)
    edited October 2020

    never got WSL1 to work on my machine, so yes, you are lucky, indeed πŸ™‚

  • U012PCVT2DB
    U012PCVT2DB Posts: 66 πŸ§‘πŸ»β€πŸš€ - Cadet

    hm... AV is silent and doesn't do anything...
    but i also got a small container running with windows-cmd and not an wsl-machine and it seems... i have general problems with wsl2 😞

  • U012PCVT2DB
    U012PCVT2DB Posts: 66 πŸ§‘πŸ»β€πŸš€ - Cadet

    i have looked a bit. This seems to be a general problem, when the files are not stored inside the WSL2-Container 😞

  • UNYG3HRDZ
    UNYG3HRDZ Posts: 3 πŸ§‘πŸ»β€πŸš€ - Cadet

    This general problem with wsl2: https://github.com/microsoft/WSL/issues/4197

  • UNYG3HRDZ
    UNYG3HRDZ Posts: 3 πŸ§‘πŸ»β€πŸš€ - Cadet

    I use Kali-GUI from Windows. I installed phpstorm (in Kali) and checked out spryker (in my user home at Kali). That works and I have no performance problems.
    https://www.youtube.com/watch?v=nXThnFxwH9c

  • UNYG3HRDZ
    UNYG3HRDZ Posts: 3 πŸ§‘πŸ»β€πŸš€ - Cadet

    it is important that spryker code is no longer in windows mount (/mnt/*)

  • Stanislav Matveyev
    Stanislav Matveyev Sprykee Posts: 211 πŸ§‘πŸ»β€πŸš€ - Cadet

    so the solution could be opening project from \\wsl$ drive (which exists inside Linux)

    In this case the application will work on the full speed,
    but PhpStorm will work with the files using network file system, which is OK.

  • Stanislav Matveyev
    Stanislav Matveyev Sprykee Posts: 211 πŸ§‘πŸ»β€πŸš€ - Cadet

    BTW @UNYG3HRDZ thanks for the link, this is really great comment https://github.com/microsoft/WSL/issues/4197#issuecomment-604592340