Comments (14)
This conversation between @rmccue and @kurtpayne also makes me want to test VVV more thoroughly with and without NFS on OSX and compare numbers with a Windows box. I know the MBA will skew things due to its SSD drive, so it would be nice to test in OSX on non-SSD as well. We should find a way to benchmark things in the VVV environment a few different ways.
from vvv.
To add to what @jeremyfelt mentions about strange issues happening with database files, I found this explanation very helpful:
To get NFS permissions right, your users need to have the same UID and GUID on host and guest. It's pretty tricky to setup and you should not change it from the guest. Maybe you can change it on the host to make it writeable to mysql and make UID and GUID the same. Of course, the moment the host changes this won't work anymore.
After a lot of digging I was able to get this running on my Macbook pro w/OS X El Capitan. I'm using a custom forked setup of VVV with the following synced_folder
configuration:
# https://github.com/mitchellh/vagrant/issues/6360
config.nfs.verify_installed = false
config.ssh.forward_agent = true
config.vm.synced_folder "database/", "/srv/database",
:nfs => true
if File.exists?(File.join(vagrant_dir,'database/data/mysql_upgrade_info')) then
config.vm.synced_folder "database/data/", "/var/lib/mysql",
:nfs => true,
:mount_options => ['rw', 'vers=3', 'tcp', 'fsc', 'actimeo=2']
end
from vvv.
NFS shares with Vagrant/VirtualBox are not supported in Windows, so in the interest of maximum compatibility, we went with the VirtualBox default shared folders. They are definitely lower performance than NFS, so if you are comfortable making the change to NFS on your install of VVV, I absolutely recommend it. However, we've not had much of an issue with the shared folder performance - for nearly all of our needs, they have been sufficient. It does seem to be worse on certain machines and configurations, and if you have the ability to do NFS, that is the best solution.
Out of curiosity, what operating system are you using?
from vvv.
I gather from this page
http://docs.vagrantup.com/v2/synced-folders/nfs.html that
"Vagrant will ignore your request for NFS synced folders on Windows." That
sounds like it's supposed to fail gracefully, but I haven't tested that.
The fiddly bit is not so much changing the vagrantfile, as ensuring the
relevant bits and pieces are installed on host and guest. I suppose that
goes into the pre- and post- wossname scripts. (For what it's worth,
generic NFS config instructions for ubuntu look scary but turn out to be
completely unnecessary as vagrant takes care of everything (with just a
sudo prompt at one point.))
My host os is ubuntu precise.
On Wed, Jul 10, 2013 at 7:14 AM, TheLastCicada [email protected]:
NFS shares with Vagrant/VirtualBox are not supported in Windows, so in the
interest of maximum compatibility, we went with the VirtualBox default
shared folders. They are definitely lower performance than NFS, so if you
are comfortable making the change to NFS on your install of VVV, I
absolutely recommend it. However, we've not had much of an issue with the
shared folder performance - for nearly all of our needs, they have been
sufficient. It does seem to be worse on certain machines and
configurations, and if you have the ability to do NFS, that is the best
solution.Out of curiosity, what operating system are you using?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/95#issuecomment-20720710
.
Cormac Bracken
RedHotLemon.com - web design and development
from vvv.
Per the numbers here, it looks like it's worth going down this path again. I'm going to play around with NFS locally and see what happens. Would definitely like to hear from Windows users as well to make sure it fails gracefully.
from vvv.
And more data for this thread, as of hashicorp/vagrant@c0404e3 (due in 1.2.5 release), NFS is mounted with UDP which apparently makes things even faster.
from vvv.
I did a quick enable of NFS by adding :nfs => true
to this line and got...
There are errors in the configuration of this machine. Please fix the following errors and try again: vm: * Shared folder that have NFS enabled do no support owner/group attributes. Host path: www/
...which is interesting. We specifically set the file permissions the way they are so that file uploads and such all work as expected.
I removed the :owner => "www-data"
line, started up with NFS, and did a before/after cURL request to see what the speeds were like.
On a 46MB file served via nginx, I was getting an average of 73mbps without NFS and an average of 200mbps with NFS.
Crazy speed increase, though I agree with @TheLastCicada in that performance has been just fine for local development already. Not sure if this would help us enough to be worth it.
Voting to leave it off in the main repository for now. If more testing is done and we find a compatible way for NFS to work with our file permission requirements, then the story could change.
from vvv.
On a 46MB file served via nginx, I was getting an average of 73mbps without NFS and an average of 200mbps with NFS.
whistles That's more than I expected.
With regards to permissions, what about mounting the uploads directory via the standard shared folders mechanism separately?
from vvv.
I enabled NFS on a few things for a bit in my local setup and strange things kept happening, especially with the database files. I think things are fast enough without it that we should hold on this for now.
from vvv.
@jeremyfelt just checking in here to see if you're still satisfied with the performance of the default VirtualBox shared folders, or if it might be worth revisiting switching to NFS. This tweet from Yoast today and the linked post got me thinking about it.
from vvv.
NFS is much faster, but can come with problems of its own
from vvv.
Daniel/Jeremy - I'm fiddling with this (read through the Slaty WP stuff too, +1 the mac kernel check! ). Am I missing something where all of the shares need to be NFS or could we NFS share /www and leave the database share as is?
from vvv.
FWIW, I saw a huge performance improvement when implementing NFS shares as per https://coderwall.com/p/uaohzg.
VVV v1.1, VirtualBox v4.3.14, Vagrant v1.6.3, OS X 10.9.4 on a stock mid-2013 MBA.
from vvv.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from vvv.
Related Issues (20)
- Show the PHP version in the CLI prompt HOT 12
- Warn when site names contain dots HOT 1
- getting error as-- Destroying VM and associated drives... after running vagrant up HOT 7
- Bug: Connecctivity issue on ubuntu repositories HOT 5
- Bug: Contribute template doesn't work HOT 6
- Bug: different PHP versions HOT 7
- Allow custom DNS
- Q: How can I do a clean install and provision with PHP8.0? HOT 3
- Investigate swapping mailhog for mailpit HOT 1
- Apple M2 chip compatibility HOT 7
- Bug: core dev site template failing HOT 3
- Bug: Keep running into echo; printf $SSH_AUTH_SOCK error HOT 15
- Syntax Error while installing Virtual box in Vagrantfile HOT 3
- Task: Update bitbucket ssh known hosts
- Q: Vagrant up failure HOT 3
- Bug: Failed Fetching PHP 7.4 packages Resource temporarily unavailable HOT 8
- Bug: Non-blocking MariaDB connection error during docker provision
- Q: .htaccess HOT 10
- Q: PHP version HOT 2
- Bug: MongoDB error when attempting to use Tideways on fresh install HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vvv.