{"action":"created","issue":{"url":"https://api.github.com/repos/GM-Alex/vagrant-winnfsd/issues/46","labels_url":"https://api.github.com/repos/GM-Alex/vagrant-winnfsd/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/GM-Alex/vagrant-winnfsd/issues/46/comments","events_url":"https://api.github.com/repos/GM-Alex/vagrant-winnfsd/issues/46/events","html_url":"https://github.com/GM-Alex/vagrant-winnfsd/issues/46","id":66688542,"number":46,"title":"NFS Slower than VirtualBox Shared Folders?","user":{"login":"jamiejackson","id":479475,"avatar_url":"https://avatars.githubusercontent.com/u/479475?v=3","gravatar_id":"","url":"https://api.github.com/users/jamiejackson","html_url":"https://github.com/jamiejackson","followers_url":"https://api.github.com/users/jamiejackson/followers","following_url":"https://api.github.com/users/jamiejackson/following{/other_user}","gists_url":"https://api.github.com/users/jamiejackson/gists{/gist_id}","starred_url":"https://api.github.com/users/jamiejackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamiejackson/subscriptions","organizations_url":"https://api.github.com/users/jamiejackson/orgs","repos_url":"https://api.github.com/users/jamiejackson/repos","events_url":"https://api.github.com/users/jamiejackson/events{/privacy}","received_events_url":"https://api.github.com/users/jamiejackson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-06T19:43:21Z","updated_at":"2015-04-07T06:56:03Z","closed_at":null,"body":"# Explanation\r\n\r\nI'm trying to evaluate whether the pros (purported I/O performance) outweigh the cons (extra configuration) of NFS in my team's Vagrant-based development.\r\n\r\nAs part of this exercise, I wanted to benchmark I/O performance of both methods.\r\n\r\nVagrantfile:\r\n\r\n```ruby\r\nVagrant.configure(2) do |config|\r\n\r\n  config.vm.hostname = \"sharetest\"\r\n  config.vm.box = \"ubuntu/precise64\"\r\n  config.vm.network :private_network, ip: \"192.168.56.10\"\r\n  config.vm.synced_folder 'C:\\www\\apps\\big_directory', \"/theshare\" # , type: \"nfs\"\r\n  \r\n  config.vm.provider \"virtualbox\" do |v|\r\n    v.gui = true\r\n    v.customize [\"modifyvm\", :id, \"--natdnshostresolver1\", \"on\"]\r\n  end\r\n  \r\nend\r\n```\r\n\r\nWith `type: \"nfs\"` I end up with a mount of:\r\n`192.168.56.1:/C/www/apps/big_directory /theshare nfs rw,vers=3,udp,nolock,addr=192.168.56.1 0 0`\r\n\r\nWith no type specified, I end up with a mount of:\r\n`vagrant /vagrant vboxsf uid=1001,gid=1001,rw 0 0`\r\n\r\nTo make things easier (and because iozone seems to want things in fstab for unmounting and remounting), I added those options to `/etc/fstab`, and commented out one or the other, depending on which I was testing. (And unmounted and re-mounted afterward.)\r\n\r\nI then used [Iozone](http://www.iozone.org/) in the VM to give some benchmark data.\r\n\r\nNFS:\r\n\r\n`sudo iozone -a -f /theshare/iozonetest -g 512k -i 0 -i 1 -i 2 -i 3 -i 4 -i 6 -i 7 -i 8 -i 9 -i 10 -i 11 -i 12 -U /theshare -Racb /vagrant/iozone_nfs.xls`\r\n\r\nvboxsf:\r\n\r\n`sudo iozone -a -f /theshare/iozonetest -g 512k -i 0 -i 1 -i 2 -i 3 -i 4 -i 6 -i 7 -i 8 -i 9 -i 10 -i 11 -i 12 -U /theshare -Rab /vagrant/iozone_vboxsf.xls`\r\n\r\n(Note: I skipped test \\# 5--strided reads--because it didn't seem to work with NFS.)\r\n\r\nI then ran the output of those through [iozone_3D.xls](www.gleason.to/leech/iozone_3D.xls) to generate some graphs.\\*\r\n\r\n# Results\r\n\r\nI got some counter-intuitive results:\r\n\r\n## Read\r\n\r\n### NFS\r\n\r\n![image](https://cloud.githubusercontent.com/assets/479475/7010708/6b6c4aae-dc71-11e4-8b57-c374a2d90c24.png)\r\n\r\n### vboxsf\r\n\r\n![image](https://cloud.githubusercontent.com/assets/479475/7010748/c40e2ace-dc71-11e4-8c51-f9884d7dd611.png)\r\n\r\n## Write\r\n\r\n### NFS\r\n\r\n![image](https://cloud.githubusercontent.com/assets/479475/7010755/d70faf12-dc71-11e4-9333-77d14017a86b.png)\r\n\r\n### vboxsf\r\n\r\n![image](https://cloud.githubusercontent.com/assets/479475/7010765/e7416402-dc71-11e4-8ff6-023159eda285.png)\r\n\r\n# Conclusion\r\n\r\nEither I'm benchmarking/interpreting incorrectly, or NFS is significantly slower than vboxsf, for many use-cases (except for reads with large file and record sizes). (However, I *am* a noob, with regard to NFS *and* I/0 benchmarking.)\r\n\r\nCan anyone (who knows more than I do about this stuff) explain what I'm seeing and why I'm seeing it?\r\n\r\n----\r\n\r\n\\* Note to self: I opened the results files in Excel, renamed the data sheet as `data` and re-saved the files as .xls (97-2003) in Excel, before selecting them with iozone_3D.xls."},"comment":{"url":"https://api.github.com/repos/GM-Alex/vagrant-winnfsd/issues/comments/90404613","html_url":"https://github.com/GM-Alex/vagrant-winnfsd/issues/46#issuecomment-90404613","issue_url":"https://api.github.com/repos/GM-Alex/vagrant-winnfsd/issues/46","id":90404613,"user":{"login":"yannschepens","id":1357689,"avatar_url":"https://avatars.githubusercontent.com/u/1357689?v=3","gravatar_id":"","url":"https://api.github.com/users/yannschepens","html_url":"https://github.com/yannschepens","followers_url":"https://api.github.com/users/yannschepens/followers","following_url":"https://api.github.com/users/yannschepens/following{/other_user}","gists_url":"https://api.github.com/users/yannschepens/gists{/gist_id}","starred_url":"https://api.github.com/users/yannschepens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yannschepens/subscriptions","organizations_url":"https://api.github.com/users/yannschepens/orgs","repos_url":"https://api.github.com/users/yannschepens/repos","events_url":"https://api.github.com/users/yannschepens/events{/privacy}","received_events_url":"https://api.github.com/users/yannschepens/received_events","type":"User","site_admin":false},"created_at":"2015-04-07T06:56:03Z","updated_at":"2015-04-07T06:56:03Z","body":"Hi,\n\nThank for your study, it's really interesting, I looking forward new\nresults ;)\n\nGreetings,\n\nYann\n\n2015-04-07 0:46 GMT+02:00 Jamie Jackson <notifications@github.com>:\n\n> After reading Mitchell's filesystem performance article\n> <http://mitchellh.com/comparing-filesystem-performance-in-virtual-machines>,\n> realizing that one of my graphs had a scale of a different order of\n> magnitude, and thinking about my actual workload, I will have to re-run my\n> tests.\n>\n> Since most of the activity on this particular VM is going to be web\n> development, it will probably be a ton of reads of shared source files in\n> the 5-64KB range, a lot of database activity (but I chose to keep my\n> MariaDB on the VM's native filesystem anyway, so I won't bother with that),\n> and a small fraction of small writes to shared source files. I'll focus on\n> shared reads in the desired size range.\n>\n> Also, I don't really know a lot about partial file reads (which I think\n> has to do with iozone's \"record size\"), but I suspect all or most of my\n> shared file reads are of the complete file, so I'll focus on the places\n> where record size=file size.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/GM-Alex/vagrant-winnfsd/issues/46#issuecomment-90269327>\n> .\n>\n\n\n\n-- \nYann Schepens\n\nyann.schepens@gmail.com\n"}}