Saikat Roy
Saikat's Blog

Follow

Saikat's Blog

Follow
Why Docker commands are slow when running them on window machine?

Why Docker commands are slow when running them on window machine?

Saikat Roy's photo
Saikat Roy
·Feb 19, 2022·

2 min read

Play this article

Table of contents

  • Common Facts
  • What I found ?
  • What's making it slow?
  • Possible Solution
  • Conclusion

Common Facts

It's very common incident to have a bad impression about docker while using it on windows system. The main reason of the frustration is actually it seems working pretty slow. 😣

What I found ?

While using docker on windows, It's obvious to use Docker Desktop App . It's really a great GUI having all options to look into multiple containers, maintain them, watching logs etc.

List plus running compose.png

  • Docker Desktop on windows runs on top of WSL (Windows Subsystem for Linux) which is a layer between Windows and Linux. 🤔

  • If you check the task manager while running the app you'll find Docker Desktop WSL backend is taking a huge amount of physical and logical resources to run.

What's making it slow?

Windows requirements of Docker App on WSL system works well. But - WSL uses the 9P protocol to access Windows drives, and it is currently known to be very slow when compared to:

  • Native NTFS (obviously)
  • The ext4 filesystem on the virtual disk used by WSL2
  • And even the performance of WSL1 with Windows drives

So the communication between Windows and Linux through WSL during Hard Drive Operations can be quite slow.

Possible Solution

  • The most silly solutions is switch to Linux. It's really fun. 😀

linux.png

  • Or start Docker directly from Ubuntu or any Linux in Windows. So that the interpretation problem between those two systems is reduced.

Conclusion

Thanks for reading the article. 🤗 This is my first writing on this blog. Tried hard to make some sense out of all information. Hope it's worth it. If it is, you can BUY ME A COFFEE & Find me some places - Link Tree

Did you find this article valuable?

Support Saikat Roy by becoming a sponsor. Any amount is appreciated!

Learn more about Hashnode Sponsors
 
Share this