Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mabasic's avatar

Update I have not yet tried the suggestions from @layer7 and @Shovels but now my TTFB is 4.89s and stable xD

This is getting to be really annoying.

Shovels's avatar

There are other posts about tweaking the virtualbox drive so that it's a fixed size (I believe it's dynamic by default) , but when I managed to get NFS working I saw roughly a 10x improvement in response time

jekinney's avatar

Windows 10 has a huge update to the network stack. Hence why on release virtualbox wouldn't work. Seeing the newest virtualbox was rushed out I would assume it's not optimized very well yet. I don't develop on Windows 10, but at work have 8.1 and a mac. Windows is a bit slower then the mini (which has a 5400 rpm had). So sometimes we have to just understand that it's slower and move on.

mabasic's avatar

Guys. Finally some good news!!

I did what @layer7 suggested and copied the repo folder to a folder outside of the shared folder but inside the vm and then configured nginx to use that folder instead.

I am getting 58.55ms TTFB. This is great!!!

Now we have confirmed that the main issue is the shared folder in virtualbox for Windows 10.

Next I will try what @Shovels suggested and try to use NFS to see if that improves things.

1 like
mabasic's avatar

I'm having problems using NFS for shared folder. It starts the winfs command line program and then it just stands there doing nothing.

toniperic's avatar

@mabasic good to know, thanks.

If I may ask - how come you're developing on Windows? I've always had issues with setting up stuff on Windows... I mean - it's always something that breaks!

Maybe I'm missing something. Would be cool if you could share a tip or two on setting up development environment on Windows.

Pozdrav iz Osijeka.

Shovels's avatar

@mabasic the issue you're getting occurred at times for me - I got past it (I found a blog post about the issue, but can't recall what it was)

This was one of the reasons I ended up going down the VMware route (which works really well)

I've now moved from Windows to Linux and it definitely feels more stable / faster / easier to configure

mabasic's avatar

@Shovels I see.. I will probably wait for newer virtualbox releases in hopes that this gets resolved.

@toniperic Pozdrav :)

To answer both of your questions and not turn this into a Linux vs Windows discussion :)

I have actually worked a lot on Linux desktops and servers. I like the linux eco system very much. If you are interested you can read more about it here: http://laravelista.com/reasons-why-not-to-switch-to-linux-yet/

I have worked on Windows since Windows 95 and somehow I feel at home with it. I know almost everything there is on it and since Windows 10, for me it is the best looking OS with a lot of good and useful software.

But don't get me wrong. If Linux manages to produce something similar that can run apps without vine then I will make the switch. Read more on the blog.

layer7's avatar

@mabasic

Great to hear you've now found the bottleneck. Next up, you can try this:

https://docs.vagrantup.com/v2/synced-folders/smb.html

Basically it's the same principle as NFS, but using Windows Shares. The above link outlines the steps (seems quite basic) and a few gotcha's since it's a pretty new thing in Vagrant apparently. I'm curious to hear how it works out for you.

Cheers, K!

mabasic's avatar

@layer7 I think that using SMB should fix the problem, but unfortunately Windows 10 has issues with smb and vagrant atm. I'm hoping that newer versions of vagrant and virtualbox will solve this issue.

robjbrain's avatar

I'm replying to this old thread because it's the first one that appears on Google when searching this issue.

I've tried the solutions from mabasic and followed this guide: https://websanova.com/blog/laravel/speeding-up-homestead-on-windows-using-nfs

Which basically involves installing and adding the nfs type flag

vagrant plugin install vagrant-winnfsd

folders:
    - map: c:\path\to\code
      to: /home/vagrant/code
      type: nfs

But with no luck.

My TTFB is regularly 2 seconds or more. It seems particularly bad via AJAX, although since it's an SPA it's pretty much all AJAX.

Some artisan commands such as make:migration are very slow as well.

The artisan command speeds up if I move the code directory to another area within vagrant that is not synced. However speed of Chrome connecting is still slow in that instance (so it's possible that slow artisan commands and bad TTFB are not related?)

Pretty much every guide i've found says to use NFS but that doesn't appear to have helped.

Is there a way to confirm whether the virtual machine it is definitely using NFS? Perhaps it's just wrongly configured still.

bashy's avatar

@robjbrain Sounds like your DB server is slow - which is the biggest cause of this problem.

robjbrain's avatar

Thanks for the reply @bashy

Laravel debug bar says each query takes 20-60ms.

The DB is just the standard MySQL database that comes with Homestead on Vagrant, with nothing done to it.

The slowness also happens if I cache the queries and thus do zero queries.

Previous

Please or to participate in this conversation.