winnfsd / vagrant-winnfsd

Manage and adds support for NFS for Vagrant on Windows.
Other
570 stars 61 forks source link

Document difference with Vagrant docs #7

Closed kylemacfarlane closed 10 years ago

kylemacfarlane commented 10 years ago

I was having the same problem as two people on your blog where there was no speed improvement and no winnfsd.exe in task manager.

The readme on this repo suggests you can just follow the official Vagrant docs and do type: "nfs" but that doesn't work. You have to do nfs: true.

kylemacfarlane commented 10 years ago

While winnfsd is much faster than the virtualbox synced folders, it's still a bit slow.

It's especially noticeable with the Django development server which automatically reloads on changes. Even with winnfsd it takes 10-20 seconds to notice changes.

Do you think it would be possible to modify winnfsd to have a customisable polling interval or anything like that? It's probably setup by default to work over a network rather than localhost SSDs.

GM-Alex commented 10 years ago

So you solved the problem above? What is your solution?

I made the experience that NFS is on the first call slow and than it speeds up. I think the client caches the files internal and checks only for changes. There is some sort of caching inside of WinNFSd which is on my todo list to change the logic here. I don't think that it's possible to poll something.

Is the last sentence a question or a fact?

acoulton commented 10 years ago

@kylemacfarlane FYI there's a pull request nearing completion at guard/listen#139 to support forwarding file change events eg from a host to a vagrant guest over TCP. Once that's done, you could wire that up to trigger Django to reload - I think that would have much less latency and overhead than having the mounted folder poll for changes more often...

kylemacfarlane commented 10 years ago

The problem is that you point to the official Vagrant docs: https://github.com/GM-Alex/vagrant-winnfsd/blob/master/README.md#activate-nfs-for-vagrant

But the official Vagrant docs say to do:

config.vm.synced_folder ".", "/vagrant", type: "nfs"

And your plugin requires:

config.vm.synced_folder ".", "/vagrant", nfs: true

I'm just guessing about the polling but winnfsd is still nowhere near as fast as a native file system.

kylemacfarlane commented 10 years ago

@acoulton

I shared some files from the guest back to the host using SMB. It's useful to be able to edit core libraries and dependencies when debugging.

While doing this I realised that editing these files is obviously recognised immediately. I wonder if a Vagrant plugin could listen to inotify on the host and touch an SMB share?

I'm no Ruby expert and had enough trouble debugging this plugin to get it working. It's probably 10 minutes work for me in Python but I have no idea about what boilerplate etc a Ruby package needs.

acoulton commented 10 years ago

@kylemacfarlane yes, that could work I guess - we experimented with actually editing the files over an SMB share but the performance was terrible, but just using it to touch files and transfer events isn't a bad idea.

But since that extension for listen is already built (and released today) I'd just use that.

GM-Alex commented 10 years ago

Fixed. See b76dc33