Repository navigation
Description
A brief description
As a Symfony developer, it's always been hard to get a stable/fast development environment. My current setup is a Ubuntu running under VirtualBox (using vagrant). While page generation is fast, my IDE accesses my PHP files through SMB, which is really (sometimes horribly) slow.
I'm now trying to use WSL to improve all of this. However, I'm having a major performance issue when using /mnt/* folders.
If I set up a Symfony project under /mnt/c, it is really slow. If I set it up under /home/mikael, it is very fast.
Expected results
Drives mounted under /mnt should be as fast a any other folder.
Actual results
With a new Symfony 3.1.3 project, under /home/mikael takes between 100ms and 130ms to generate the home page.
The same project under /mnt/c/ takes between 1200ms and 1500ms.
Your Windows build number
10.0.14393.51
Steps / commands required to reproduce the error
# Install PHP5
$ sudo apt-get install -y php5 php5-json
# Download Symfony installer
$ sudo curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony
$ sudo chmod a+x /usr/local/bin/symfony
# Download Symfony
cd
symfony new symfony_test
# Start Symfony
cd symfony_test
php bin/console server:run
Open your browser and go to http://127.0.0.1:8000/.
Once the page is loaded, refresh it (on first request, Symfony had to generate its cache).
Generation time is displayed on the bottom left
You can then do the same under /mnt/c/
cd /mnt/c/
symfony new symfony_test
cd symfony_test
php bin/console server:run
Additional information
I've added my dev folders as excluded folders in Windows Defender, as well as %LOCALAPPDATA%\lxss.
I've tried having my project in ~ and pointing my IDE to %LOCALAPPDATA%\lxss\home\mikael\ but as I've later read, there is no supported way of editing WSL files.
WSL is installed in its default location under C (no strange junction or symlink), which is a healthy SSD.
My computer is attached to a domain, if this might have any influence.

Activity
[-]Major performance (I/O?) issue[/-][+]Major performance (I/O?) issue in /mnt/*[/+]fcicq commentedon Aug 12, 2016
with the current design of DrvFs, I guess this problem is hard to resolve. I recommend you to run a ssh server inside WSL and do the edit via ssh to bypass some other issues.
from https://blogs.msdn.microsoft.com/wsl/2016/06/15/wsl-file-system-support/
"DrvFs also disables directory entry caching to ensure it always presents the correct, up-to-date information even if a Windows process has modified the contents of a directory."
fpqc commentedon Aug 12, 2016
Also Mikael Peigney (@Mika56) the devs have said they are working on improving performance by redesigning parts of how file I/O works. That's probably why they haven't documented exactly how it works yet, since it is very much in flux at the moment.
ajaykagrawal commentedon Aug 12, 2016
there is no supported way of editing WSL files
I wonder how difficult it would be for popular IDE and text editors to become WSL aware and preserve the attribute of WSL files (the security model may have some inconsistencies but I might be ok with it)
fpqc commentedon Aug 12, 2016
Ajay Agrawal (@ajaykagrawal) Some text-editors have an ability to save in-place rather than overwrite. I heard someone say that they enabled that setting in one or another text editor and it worked.
ajaykagrawal commentedon Aug 12, 2016
Thanks fpqc. I don't quite know what save in-place means but I hope more editors are updated to have this ability
Mika56 commentedon Aug 12, 2016
fcicq (@fcicq) I'm using an IDE for a reason :) I need my IDE, and mounting a folder through SSH, FTP, SMB or whatever would be no improvement on my current environment
fpqc commentedon Aug 12, 2016
Ajay Agrawal (@ajaykagrawal) Basically instead of writing a new file and saving over it, the text editor has a delta and applies it to the file, at least that's my guess.
aseering commentedon Aug 12, 2016
In the old days, whenever you hit "save", text editors saved into your existing file. This was simple and efficient, but if your editor crashes or was killed mid-save, or if you run out of disk space, or if anything eelse weird happens, you might end up with a corrupt garbled mess that's half the old file and half the new file. Or it might just be completely empty / wipe out all of your data entirely, if your app implemented "save" with an initial truncate, which is easy to do by default on Linux at least.
These days, text editors almost always "save" by creating a temporary file in the same directory, writing the entire new file contents to the temporary file, and then moving the temporary file on top of the old file, overwriting the old file in the process. "Move" within a directory is guaranteed in most cases to be strictly atomic -- even if your computer loses power mid-Move, you'll always be left with either the new file or the old file; not a corrupted intermediate.
Clever, right? Saves lots of "I lost my data!" headaches. Thing is, if an application creates an arbitrary new file, there's no way for the OS to know that it's supposed to have the same magic permissions as some other existing file. That's what's breaking WSL.
Some editors let you go back to the old-style behavior. Has more risk, but avoids issues in some situations.
fpqc commentedon Aug 12, 2016
Adam Seering (@aseering) it looks like Windows move preserves those attribs, or at least robocopy does?
aseering commentedon Aug 12, 2016
Read more carefully: It does an excellent job of preserving the attributes of the wrong file :-)
[EDIT] I can't speak for robocopy, just regular move, but what you want in this scenario is the opposite of what you want in most scenarios.
fpqc commentedon Aug 13, 2016
Adam Seering (@aseering) yep I am aware. I just thought that Windows commandline tools preserve even hidden ntfs attributes (moving is different from editing a file, since the atomic operation is done at the filesystem level, I think) like robocopy does.
aseering commentedon Aug 13, 2016
fpqc -- ah, I see what you're getting at. Yeah, applications can copy extended attributes, if they're programmed to do so correctly.
Adraesh commentedon Aug 16, 2016
Exactly the same "issue" detailed above, as I am as well a Symfony dev.
My SF projects are all located into /mnt/d/.... my apache2 server (running on ubuntu bash) root folder is linked using a symlink and the perfs are aweful ...
This also lead to some issue with Symfony cache system btw.
baroso commentedon Sep 7, 2016
I've not noticed any performance issues with my IDE IntelliJ/PHPStorm, but the execution of PHP/Symfony code (running LAMP/Symfony with SuluCMS installed) ist between 4-10 times slower (total execution time) than on a normal Ubuntu system ...
WSL 14915


second run
Ubuntu 14.04


second run
Why is it so slow?
Are there any workarounds, maybe moving the vendors folder of Symfony?
If you can fix this issue, it will be the best environment for developing true DOT.NET and true PHP on Windows!!!
Thanks, keep up the great work!!!
294 remaining items
Gabrielcarvfer commentedon Oct 30, 2019
Kind of weird, but I've noticed that WSLv2 can be much slower (>1000x) than WSLv1 while working with CMake on (/mnt/*). Strace -c results
slikts commentedon Oct 30, 2019
WSL 2 is supposed to be faster only if you use the Linux filesystem.
Gabrielcarvfer commentedon Oct 30, 2019
chx I'm not running a generic benchmark, so I would recommend you to run the tests with your application.
Reinis Ivanovs (@slikts) Doesn't seem to be the case with /home/*/. It is ~3x faster than WSLv2 /mnt, but still >10x slower than WSLv1 (I reran with WSLv1. I've forgotten to remove the cache before running...). Strace -c results
MichaelJCole commentedon Nov 10, 2020
Sven Groot (@SvenGroot), thanks for your post and explanation. I left Windows for Linux around NT and now I'm back.
You mentioned a workaround to move files off C: to D: so as to skip some of the filters causing slow downs.
I symlink from C: into Ubuntu's root so I can use graphical editors without having to go full XWindows.
Given what is (and 2 years of experience), are there any other workarounds?
Thanks!
DemiMarie commentedon Nov 10, 2020
One idea I just had for WSL to have its own metadata cache, and to add a filter driver that invalidates the cache when necessary.
yay commentedon Sep 8, 2022
Sven Groot (@SvenGroot) I thought Microsoft is making money solving hard problems (like amazing Github Copilot stuff and natural text-to-speech). Any progress on those items after 4 years?
GrimzEcho commentedon Oct 11, 2023
Just changing to a moderately large project directory (~20,000 files) on
/mntviacdtakes almost 5 minutes to complete. This happens for each new terminal that accesses the folder.It's disappointing that this is still a big issue 7 years after the ticket was opened.
ylluminate commentedon Oct 11, 2023
@BrianHVB curious, while I don't use Windows anymore for development (macOS), does this happen with WSL2?
GrimzEcho commentedon Oct 11, 2023
ylluminate (@ylluminate) Yes - it is specific to WSL 2. I haven't used WSL 1 in almost two years, but I never encountered the same performance issues (on the same 20,000 file repo).
Putting the repo under WSL-Linux's virtual disk (e.g. in the
/home) folder eliminates the issue, but then the only way you can access the files from the container is over a network share, and that causes problems for JetBrains IDEs and other tools. It also means having to maintain two separate repositories if you need to work on the project from both Windows and Linux contexts.EmpiricEmpire commentedon Oct 11, 2023
Well, if you're onto workarounds, why don't you just install a Linux distro?
GrimzEcho commentedon Oct 11, 2023
Empiric Empire (@EmpiricEmpire) Do you mean installing a Linux distribution under WSL 2? I have several, that is where this problem is originating. I want to operate on the project's source code using Windows-based GUI tools such as my JetBrain's IDEs, while compiling and running the project in Linux via WSL 2.
EmpiricEmpire commentedon Oct 11, 2023
Well, clearly you have a distro under a WSL 😄 I just googled and JetBrain produces Linux binaries of their IDE. But even if it wouldn't you could run it under WINE just fine performance-wise, so… 🤷
EmpiricEmpire commentedon Oct 11, 2023
@BrianHVB sorry, don't get me wrong, I get you used to Windows and why would you switch, etc… Which is exactly why my first message started with "if you're onto workarounds". It's just that having a single repo might be easier, that's all 🤷 Not insisting tho, do whatever you like.
microsoft-github-policy-service commentedon Sep 25, 2025
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Thank you!