Main Content

Memory Constraints on Windows

When using certain solvers such as FEM-based Solver for RF Structures, the Windows Subsystem for Linux (WSL) must be installed on the PC. According to Microsoft Documentation, WSL is assigned 50% of the total memory on Windows by default. As a result the size of the problems that may be solved will be limited.

To increase the available memory assigned to WSL follow the steps below:

  1. Create a configuration file for WSL named .wslconfig located at C:/Users/%UserProfile%/.wslconfig

  2. Make sure that the extension of the configuration file is .wslconfig

  3. Open the empty configuration file and add the following lines, adjusting the numerical values based on the PC's specifications and the memory requirements of the problem being solved:

    [wsl2]
    memory=48GB #set the memory limit for WSL
    swap=8GB #Set the swap space limit for WSL
  4. Save the configuration file

  5. Run the following command line to stop the WSL service:

    wsl --shutdown
  6. Run the following PowerShell command as an administrator to restart WSL:

    restart-service LxssManager

See Also