Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update faq.rst #57

Merged
merged 3 commits into from
Dec 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion source/getting-started/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,24 @@ How to retrieve your desktop login details ?

The container's root password can be obtained with ``exegol info <container>`` (i.e. this is needed when using the :doc:`desktop </the-exegol-project/python-wrapper>` feature)

.. TODO: add a note, when the Desktop feature is in prod, that explains the ups and dows of X11 vs. Desktop mode.
WSL 2 consumes massive amounts of RAM, CPU power, and Disk Space. How can I deal with this issue ?
==================================================================================================

Users might experience excessive memory consumption when using Exegol. This is caused by WSL 2 not freeing up RAM even when processes are finished, causing large amounts of unused memory to remain allocated. This leads to high memory usage on the host system and reduced performance. More information about this issue can be found [at this GitHub issue](https://github.com/microsoft/WSL/issues/4166). A simple workaround is to create a `%UserProfile%\.wslconfig` file in Windows and use it to limit memory assigned to WSL 2 VM.

```
[wsl2]
memory=8GB # Limits VM memory in WSL 2 up to 3GB
processors=2 # Makes the WSL 2 VM use two virtual processors
```

When using Docker with the WSL2 backend, resource limits are managed by Windows. There might be cases, for example after updating an Exegol image, where Docker might take double the disk space the image needs. To deal with this problem, users should find the `Disk image location` in Docker Desktop (`Settings -> Resources -> Advanced`). It will be in the following format `C:\Users\<USER>\AppData\Local\Docker\wsl`. The Virtual Hard Disk can be located in the following path, `C:\Users\<USER>\AppData\Local\Docker\wsl\disk`. Users can use the `diskpart` tool to shrink the Virtual Hard Disk using the following instructions based on directions [here](https://stackoverflow.com/questions/70946140/docker-desktop-wsl-ext4-vhdx-too-large).
- Stop Docker Desktop
- Start an administrative CMD or PowerShell session
- Stop WSL2: `wsl --shutdown`
- Start the diskpart tool: `diskpart`
- Select the Virtual Hard Disk: `select vdisk file="C:\Users\<USER>\AppData\Local\Docker\wsl\disk\docker_data.vhdx"`. A message `DiskPart successfully selected the virtual disk file.` should appear.
- Shrink the Virtual Hard Disk: `compact vdisk`
- Wait for the proccess to reach 100 completion (might take some time)

.. TODO: add a note, when the Desktop feature is in prod, that explains the ups and dows of X11 vs. Desktop mode.
Loading