Skip to content

2025


WSL Network Settings: Part 1

The network is the largest part of the .wslconfig configuration in terms of the number of parameters, so I decided to split the topic into several parts. In this part, I will review the main settings, and in the next, the additional and experimental ones.

WSL Hardware: Resources Management

If the .wslconfig configuration file is not created with explicitly defined settings, WSL 2 allocates hardware resources automatically. It uses all available CPU cores, half of the available memory, creates a dynamically expanding 1TB disk for instances, a shared swap file, and enables GPU support. This is sufficient for basic operation, but more fine-tuning may be required, especially for resource-intensive tasks. I prefer to allocate resources more precisely for my tasks and explicitly define all configuration parameters.

WSL Logging: Settings and Their Purpose

The WSL 2 global configuration file .wslconfig doesn’t clearly divide settings into sections. All but two belong to the [wsl2] section. I've grouped seven parameters that are related to logging and will go through them in this post.

I mainly use these settings when testing kernel parameters or verifying configuration changes. It’s best to disable logging during normal operation to avoid unnecessary overhead.