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, or 8GB, whichever is less. 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 config file for WSL named .wslconfog located at C:/Users/%UserProfile%/.wslconfig

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

  3. Open the empty config file and add the following line with appropriate number values based on the PC specs and the memory requirements of the problem being solved:

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

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

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

    restart-service LxssManager