Skip to content

2025


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.

WSL Timeouts: What's the Difference and How to Use Them

I recently published a post with my template.wslconfig configuration file. But I don't think simply sharing the configuration is enough. From my experience, I know that information is better perceived when accompanied by real-world usage examples. So, I decided to write a series of posts explaining the settings in this file in more detail and providing examples of their use.