Disk performance issue with shared folders

Discussions related to using VirtualBox on Windows hosts.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Disk performance issue with shared folders

Post by mpack »

A performance issue with GA shared folders? No argument there, because performance has never been the point of that feature. If you want performance then configure a true network share, ideally using VirtIO-net. But I guess all that was in the benchmark results.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Disk performance issue with shared folders

Post by socratis »

pat1498, that was a really good article that you linked (http://mitchellh.com/comparing-filesyst ... l-machines). Developers and others have often asked for "real data" when someone complains about performance. Mitchell Hashimoto's analysis is very good and if the developers want to address the issue, it's an excellent starting point.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
NamedNick
Posts: 14
Joined: 10. Apr 2013, 19:06

Re: Disk performance issue with shared folders

Post by NamedNick »

mpack wrote:A performance issue with GA shared folders? No argument there, because performance has never been the point of that feature. If you want performance then configure a true network share, ideally using VirtIO-net. But I guess all that was in the benchmark results.
You are obviously very knowledgeable and I heard the term VirtIO-net the first time now. I did some research and found this mentioned in https://www.virtualbox.org/manual/ch06.html but I'm unable to connect the dots: using a Windows host and a Linux guest, could this be used to have a shared-folder equivalent with better performance?

The documentation mentions that "virtio" is available for the Linux guest but then I wouldn't understand the connection to be able so use shared folders that way.

Sorry if this sounds unclear,

thx
Martin
Volunteer
Posts: 2561
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Disk performance issue with shared folders

Post by Martin »

Virtualbox shared folders are not designed to be used programatically and also not for perfomance.
It is a very simplified file system implementation just to copy files from/to the guest.
Many applications produce errors using shared folders, because they expect advanced features like file locking or access controls which don't exist for shared folders.
NamedNick
Posts: 14
Joined: 10. Apr 2013, 19:06

Re: Disk performance issue with shared folders

Post by NamedNick »

I understand but currently it seems I've not much choice on Windows host/Linux guest to share information and I'm trying to understand whether the comment from mpack would imply there's another way to share folders in this scenario without the performance impact of the vboxfs .
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Disk performance issue with shared folders

Post by mpack »

If you want performance you would:
  1. Configure a true shared folder just like you would between two physical PCs. Google for generic networking walkthroughs. The VBox GA shared folders API (vboxsf, and the "Shared folders" part of the VM settings) would not be used.
  2. Use a Virtio-net adapter in the VM network settings. This is a paravirtual device, meaning that it provides a driver level API inside the guest, but it "knows" that it's a virtual device and hence talks directly to the VirtualBox host - it doesn't need to go through the overhead of virtual register I/Os and IRQs.
Of course you'll need a VirtIO-net driver for your guest. The KVM project has drivers for Linux and Windows guests (XP and later), no doubt they are available for Mac as well.
pat1498
Posts: 4
Joined: 28. Jan 2014, 21:23

Re: Disk performance issue with shared folders

Post by pat1498 »

There is a great plugin for Vagrant/VBox NFS on Windows that solved my problems: http://www.jankowfsky.com/blog/2013/11/ ... r-windows/

I don't know if this will work for people needing advanced file system methods, but it works for me serving apache2.2.4
chrispitude
Posts: 42
Joined: 2. Jan 2009, 14:22

Re: Disk performance issue with shared folders

Post by chrispitude »

mpack wrote:If you want performance you would:
  1. Configure a true shared folder just like you would between two physical PCs. Google for generic networking walkthroughs. The VBox GA shared folders API (vboxsf, and the "Shared folders" part of the VM settings) would not be used.
  2. Use a Virtio-net adapter in the VM network settings. This is a paravirtual device, meaning that it provides a driver level API inside the guest, but it "knows" that it's a virtual device and hence talks directly to the VirtualBox host - it doesn't need to go through the overhead of virtual register I/Os and IRQs.
Of course you'll need a VirtIO-net driver for your guest. The KVM project has drivers for Linux and Windows guests (XP and later), no doubt they are available for Mac as well.
Some time passes...

I've also been desperate for a way to improve the performance of shared folders, and from this thread it appears the solution is not to use them.

For a linux host with Win7 guest, would the right solution be to serve a samba share on the host, then reference it from the guest by IP address using Virtio-net? Will referencing it by IP address keep share traffic entirely on the host machine, without going out on the LAN?
Post Reply