Slow moving folder with a lot of files from Windows to WSL

Abstract: Resolve slow file transfers from Windows to WSL by archiving folders with tar before extraction to minimize filesystem overhead.

Created: 2026-10-09 by
Copying a folder with thousands of files from Windows to WSL is significantly slower than native Linux operations because the Windows filesystem (NTFS) and the WSL2 virtual hard disk (ext4) are separate storage layers. This process requires data to traverse the interoperability bridge, which introduces substantial overhead for metadata operations like creating individual inodes, setting permissions, and handling timestamps. To resolve this bottleneck, you must minimize the number of discrete file system calls by bundling the data into a single archive before transfer or moving the entire directory structure at once rather than copying contents recursively.

Understanding the Performance Bottleneck

The core issue lies in how WSL2 accesses Windows files. When you run cp -r /mnt/c/path/to/large_folder ~/destination, every single file triggers a context switch between the Windows kernel and the Linux VM. For a folder containing 10,000 small files, this results in tens of thousands of network-like packets being sent over the loopback interface to update the ext4 filesystem. Each operation involves checking permissions, updating journal logs, and managing inode allocations, which accumulates massive latency compared to native Linux copy speeds. Additionally, antivirus software on the Windows host often scans each file as it is written to the WSL disk, further throttling the throughput. The combination of high I/O operations per second (IOPS) requirements and security scanning creates a perfect storm for slow transfers. Recognizing that this is a structural limitation of the hybrid architecture rather than a bug in your specific installation is the first step toward optimizing the workflow.

Method 1: Archive and Extract (Recommended)

The most effective way to bypass the overhead of individual file creation is to treat the folder as a single binary stream. By compressing the directory on the Windows side and extracting it within WSL, you reduce thousands of file operations into one large read/write cycle. First, open PowerShell or Command Prompt on Windows and navigate to the parent directory of the folder you wish to move. Use the tar command to create a gzip-compressed archive. This command bundles the directory structure and all contents into a single .tar.gz file.
tar -czf large_folder.tar.gz large_folder/
Next, move this archive into your WSL home directory or any accessible path. You can drag and drop the file into the WSL terminal window or use wsl cp. Once the archive is inside the Linux environment, extract it using the standard tar utility.
tar -xzf large_folder.tar.gz
This method is dramatically faster because the ext4 filesystem handles one large sequential write operation instead of thousands of random small writes. It also preserves file permissions and ownership correctly during the extraction phase, ensuring that your development environment remains consistent.

Method 2: Move the Entire Directory Tree

If archiving is not feasible due to space constraints or the need for immediate access, you should avoid copying the *contents* of the folder. Instead, copy the folder itself as a single entity. The Windows-to-WSL bridge optimizes for directory-level moves more efficiently than recursive content copies. In your WSL terminal, use mv to move the directory from the mounted Windows drive to your Linux home directory.
mv /mnt/c/Users/YourName/LargeFolder ~/LargeFolder
This approach leverages the underlying volume management capabilities of the bridge. While still slower than native Linux performance, it avoids the repeated inode allocation overhead associated with cp -r. After the move completes, verify that all symlinks and special files have been preserved correctly, as some complex directory structures may require manual adjustment if they rely on absolute paths rooted in /mnt/c.

Optimizing WSL Configuration

You can mitigate some performance issues by adjusting how WSL mounts Windows drives. In your ~/.wsl.conf file, ensure that the automount section is configured correctly. Setting mountFsTab to false can sometimes reduce startup overhead, though its impact on copy speed is minimal. More importantly, ensure that your WSL instance is updated to the latest version, as Microsoft frequently optimizes the interoperability layer.
[automount]
enabled = true
mountFsTab = false
options = "metadata,umask=22,fmask=11"
The metadata option is critical. It allows WSL to store POSIX permissions directly on the NTFS extended attributes, reducing the need for constant lookups against Windows ACLs during file operations. Without this flag, every file access requires a round-trip to query Windows security descriptors, which severely degrades performance for large directories.

Alternative: Direct Disk Access

For extremely large datasets exceeding hundreds of gigabytes, consider mounting the physical Windows partition directly in WSL using wsl --mount. This bypasses the /mnt/c interoperability layer entirely, providing near-native Linux performance for reading and writing data. However, this requires administrative privileges and careful handling to prevent data corruption if both Windows and WSL attempt to modify the same files simultaneously.

Frequently Asked Questions

Why is my WSL instance so slow even after transferring files?

Slow general performance is often caused by running heavy processes on the Windows host, such as real-time antivirus scanning. Disable real-time protection temporarily or add your WSL home directory and /mnt/c to the exclusion list to see if performance improves significantly.

Can I use rsync to speed up incremental transfers?

While rsync is efficient for syncing changes, it does not solve the initial bulk transfer bottleneck because it still performs individual file operations. Use rsync only after the initial large copy has been completed via archival methods to sync minor updates.

Does WSL1 handle large folder copies faster than WSL2?

WSL1 uses a direct translation layer without a virtual machine, which can sometimes feel snappier for simple file listings. However, WSL2’s ext4 filesystem is generally superior for development workloads, and the performance gap for large transfers has narrowed significantly with recent Windows updates.

What happens if I interrupt a large copy operation?

Interrupting a copy mid-stream can leave partial files and corrupted directory entries. Always cancel gracefully using Ctrl+C in the terminal, then verify the integrity of the destination directory before attempting to resume or re-copy.

How do I check if my WSL version is outdated?

Run wsl --update in an elevated PowerShell window to fetch the latest kernel and utilities. Keeping your WSL components updated ensures you benefit from the latest performance patches and bug fixes related to file I/O.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More