WSL2 Performance
If you are running Dorsal inside WSL2 (Windows Subsystem for Linux 2), you may experience performance degradation (i.e. slow access speeds) when processing files stored on the Windows host filesystem.
For optimal performance, install and run Dorsal on the host Windows OS, instead of within WSL2.
The Bottleneck
When Dorsal scans a file for the first time, part of the first step includes calculating cryptographic file hashes (e.g. SHA-256). To generate a hash, Dorsal must read every single byte of the file. This is an I/O-bound task.
WSL2 runs inside a lightweight Virtual Machine (VM). When you access files on your Windows host (e.g. your C: drive, usually mounted at /mnt/c/) from inside Linux, WSL2 uses the 9P protocol to transfer data across the VM boundary.
Compared to native disk access, this protocol has significant overhead.
| File Location | Path Example | Performance |
|---|---|---|
| Windows Host | /mnt/c/Users/MyName/Documents/ |
Slow (Network/Protocol overhead) |
| WSL2 Native | /home/user/documents/ |
Fast (Native Linux Ext4 speed) |
If you are scanning small files, you might not notice a difference, but if you are working with large datasets (gigabytes or terabytes), the I/O bottleneck will slow down Dorsal significantly compared to a native installation.
Recommendations
If you are experiencing slow speeds scanning files in WSL2, we recommend one of the following solutions:
Option 1: Install Dorsal on Windows (Recommended)
If your files live on Windows, run Dorsal on Windows.
Dorsal is fully compatible with Windows. Installing Dorsal on Windows allows Dorsal to scan files natively with zero overhead.
Installing Dorsal on Windows
-
We recommend installing Dorsal in a virtual environment (
venv) using PowerShell in Windows Terminal. -
Ensure Python 3.11 or higher is installed on Windows before proceeding.
-
Open Terminal and navigate to your project folder.
-
Create and activate a virtual environment:
Note: If you get a permission error running the script, try running
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -
Install Dorsal:
Option 2: Move files into WSL2
If you prefer staying in the Linux environment, move the files you wish to process into the WSL2 filesystem.
Once the files are stored on the Linux partition (Ext4), Dorsal will run at full native speed.