You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ruby on Rails app significantly slower on WSL compared to Windows #893
I have a Rails app which I run on Ubuntu Linux and Windows. Just tried it on WSL and page loads are taking about 10x what I see on Windows or Ubuntu Linux.
I've tried 3 different webservers (Puma, Unicorn, and WEBrick) and all are slow.
I'd like to provide more detail about the issue, is there any diagnostic tool I can run to report metrics?
I agree that this general issue is a major drawback, but this specific ticket is closed because it's believed to be a duplicate of #873 , which is still open.
If you have evidence that fixing that issue would not also fix this issue, please post it.
Johnny Shields (@johnnyshields) is using a mounted ext4 dir makes for an improvement also? Because with using a lxss dir has other problems, because it becomes impossible to use Sublime Text or similar (files disappearing)
I don't think this is a duplicate of #873 talks about a problem with performance when dealing with files under /mnt/* but I have seen performance issues just with Ruby under ~/
I ran a suite of simple rspec tests in Ruby using the following configurations:
WSL /mnt/c
WSL ~/
Docker mounting a folder from c:
In my tests WSL was slow irrespective of the location of the ruby files (unless Ruby is pulling something else from /mnt/c but I can't think what). Docker loaded the files for the test in a tenth of the time.
First Run
Follow up runs
Test time
file load time
Test time
file load time
WSL Local
0.62
15.77
0.62
15.86
WSL /mnt/c
0.81
34.6
0.61
14.11
Docker
0.35
1.5
0.35
1.5
I also ran tests using Node JS. The node js tests ran only a little slower on WSL compared to docker, even when the test files are on /mnt/c. The first run is slow, though I'm putting that down to cache.
First Run
Follow up runs
Test time
Test time
WSL /mnt/c
11.28
4.18
Docker
3.17
3.17
Reacted by Marcus Malmberg, Sunil Muthuswamy, Phil A Thompson, Joao Salgueiro, Charles Lee, Frank Fang, VestOfHolding and chauhanmayank
Zac Tolley (@ztolley) - Thanks for the experiments and sharing the results. Yes, the title of #873 only seems to refer to perf issues in /mnt/, but it has become a catch all issue for file system perf with WSL. I have updated the title of #873 to reflect the same now. We are aware of these limitations and currently working to improve them. If you haven't already voiced your opinion and vote in the related user voice ticket, please do so.
Activity
marcogroppo commentedon Aug 14, 2016
Just an idea. Where are the application and content files stored? DrvFS (/mnt/*) is known to be slow (there's no dentry cache). See #873
johnnyshields commentedon Aug 14, 2016
Marco Groppo (@marcogroppo) yep that's probably the issue. I'll experiment with moving tmp to somewhere other than /mnt/*. Closing this issue for now.
aurimus commentedon Apr 3, 2017
Johnny Shields (@johnnyshields) did it work? I'm having same issue
aurimus commentedon Apr 3, 2017
Can we reopen this? This is a major drawback
aseering commentedon Apr 3, 2017
I agree that this general issue is a major drawback, but this specific ticket is closed because it's believed to be a duplicate of #873 , which is still open.
If you have evidence that fixing that issue would not also fix this issue, please post it.
johnnyshields commentedon Apr 4, 2017
Aurimas (@aurimus) yes using a linux dir (not
/mnt/c/) lead to some improvement. agreed this is a dupe of #873.aurimus commentedon Apr 4, 2017
Johnny Shields (@johnnyshields) is using a mounted ext4 dir makes for an improvement also? Because with using a lxss dir has other problems, because it becomes impossible to use Sublime Text or similar (files disappearing)
gnodiah commentedon Jun 17, 2017
yeah, it's really really slow, how could it be solved?
aurimus commentedon Jun 17, 2017
Hayden (@gnodiah) move to Ubuntu. Tested, works:)
ztolley commentedon Jul 27, 2017
Should re-open. Tested WSL /mnt/c vs WSL ~/ vs Docker for windows mounted to C... Docker was so much faster.
Running a suite of rspec tests in WSL takes 14-16 seconds to load the files vs docker 1.5
Similar tests using Node js on same machine showed a tiny difference
benhillis commentedon Jul 27, 2017
No need to reopen, this is a duplicate of #873.
ztolley commentedon Jul 27, 2017
I don't think this is a duplicate of #873 talks about a problem with performance when dealing with files under /mnt/* but I have seen performance issues just with Ruby under ~/
I ran a suite of simple rspec tests in Ruby using the following configurations:
In my tests WSL was slow irrespective of the location of the ruby files (unless Ruby is pulling something else from /mnt/c but I can't think what). Docker loaded the files for the test in a tenth of the time.
I also ran tests using Node JS. The node js tests ran only a little slower on WSL compared to docker, even when the test files are on /mnt/c. The first run is slow, though I'm putting that down to cache.
sunilmut commentedon Aug 1, 2017
Zac Tolley (@ztolley) - Thanks for the experiments and sharing the results. Yes, the title of #873 only seems to refer to perf issues in
/mnt/, but it has become a catch all issue for file system perf with WSL. I have updated the title of #873 to reflect the same now. We are aware of these limitations and currently working to improve them. If you haven't already voiced your opinion and vote in the related user voice ticket, please do so.PhilT commentedon Aug 1, 2017
Out of interest Zac Tolley (@ztolley) is that Docker for Windows or Docker toolbox (in other words VirtualBox or HyperV)?
ztolley commentedon Aug 2, 2017
Docker for windows, so it uses Hyper V