Those in the development section know how cool docker containers are and how to quickly deploy applications within docker containers. Docker containers can be deployed on Linux machines. However, Windows PC is also able to use the docker service using the Docker desktop app.

The dedicated docker app for Windows offers a virtual Linux environment within the Windows machine, which helps run the docker container apps. However, the docker app on Windows takes a large amount of RAM and CPU usage, which makes it a bit difficult to run the docker apps all the time with a Windows machine.

Docker App on Windows

Docker apps on Windows are not mainly used for live deployment. Instead, it is primarily used for development and testing purposes. So it is noticed that users used to stop the docker app on Windows after usage never lets them run all the time. However, even after stopping and closing the docker app, it is noticed that the RAM usage on Windows is higher. So here we will see how to solve the high memory usage issue on Windows even after closing Docker.

Windows RAM Usage After Closing Docker

The issue is that dockers are meant for Linux, and we run the docker container within a Windows system. So, you already enabled the Windows Subsystem For Linux (WSL) Module during the installation. This is required to run the docker app on Windows.

The issue is that it is a Windows standalone service that wonโ€™t be stopped even when the docker is stopped. While stopping or quitting the docker app, the Windows Subsystem For Linux will continue running and cannot be stopped. It was running an s standalone service.

If you check the task manager, you can see a service named Vmmem taking memory. Unfortunately, you cannot stop the process from the taskbar.

How to stop the WSL and Regain the RAM

The WSL service, which consumes the higher memory, cannot be stopped from the taskbar or by closing the docker. However, we can completely shut down the WSL using the terminal. To do so, follow the below steps.

Step 1: Open the power shell on your Windows machine

Step 2: Type wsl โ€”shutdown and hit enter.

Done, the WSL service is now completely shut down, and you can see the RAM usage is currently stopped. In this way, the memory usage of the Windows Subsystem for Linux service can be stopped.

Does the WSL service restart after the system reboot?

No, the WSL service wonโ€™t get started during the system reboot, and you dont have to worry about it. However, if you open the docker app again, the WSL service will also automatically start and consume the memory like before.

In that case, you must rerun the terminal command after closing the docker app. In short, when you open the docker app, the WSL service will also start, which you need to stop manually via the terminal.

Categorized in: