Skip to content

Commit

Permalink
WSL RAM + CPU config
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidMoore committed Feb 9, 2023
1 parent 7ba317f commit e0b413a
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
23 changes: 23 additions & 0 deletions RoboKiwi.com/content/wiki/apps/fresh-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,29 @@ Install a Distro. Get a list of available options:

Then install from Windows Store or `wsl --install -d <distro>` e.g. `wsl --install -d Ubuntu-20.04`

### Configure WSL

It's a good idea to set global limits on WSL memory usage and CPU usage

```powershell
code ~/.wslconfig
```

```ini
[wsl2]

# Limits VM memory to 4 GB
memory=4GB

# Sets the VM to use two virtual processors
processors=2

# Limits swap file disk usage to 8GB
swap=8GB
```

Save and exit.

## Configure Git on WSL

1. `git config --global user.name "Your Name"`
Expand Down
23 changes: 23 additions & 0 deletions RoboKiwi.com/content/wiki/windows/wsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,26 @@ For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Conversion complete.
```

### Configure WSL RAM & CPU

It's a good idea to set global limits on WSL memory usage and CPU usage

```powershell
code ~/.wslconfig
```

```ini
[wsl2]

# Limits VM memory to 4 GB
memory=4GB

# Sets the VM to use two virtual processors
processors=2

# Limits swap file disk usage to 8GB
swap=8GB
```

Save and exit.

0 comments on commit e0b413a

Please sign in to comment.