vboxfs speed

This is for discussing general topics about how to use VirtualBox.
Post Reply
KeyzerSuze
Posts: 88
Joined: 14. Aug 2008, 07:57
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: debian i386, debian amd64, Windows XP, Windows 2003 Server

vboxfs speed

Post by KeyzerSuze »

How fast is vboxfs supposed to be. I have a vm attached to a nfs shared which came from the host machine, so i changed it over to a shared folder and tried some tests it seemed to be that the nfs was faster (much faster)

I am doing image compilations from here

Is this expected ?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Post by vbox4me2 »

Is the VM running via NAT, try HIF.
KeyzerSuze
Posts: 88
Joined: 14. Aug 2008, 07:57
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: debian i386, debian amd64, Windows XP, Windows 2003 Server

Post by KeyzerSuze »

via host interface its bound to a bridge device

edit:

does the network interface make vboxfs work faster or slower ?

the nfs was faster in my experience
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Post by vbox4me2 »

HIF is much faster, especially if the real (host)NIC is a gigabit one. I've got currently 9 bridged guests and they all blast away. NAT can be fast as well but I found that running NAT -after 3 days- slows down to a crawl.
KeyzerSuze
Posts: 88
Joined: 14. Aug 2008, 07:57
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: debian i386, debian amd64, Windows XP, Windows 2003 Server

Post by KeyzerSuze »

vbox4me2 wrote:HIF is much faster, especially if the real (host)NIC is a gigabit one. I've got currently 9 bridged guests and they all blast away. NAT can be fast as well but I found that running NAT -after 3 days- slows down to a crawl.
Agreed, but you have missed what my original question was about. is the vboxfs meant to be slower than nfs. I would have thought vboxfs would be faster (not sure why), than other network based fs.

where vboxfs - Virtual Box shared folder
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Correct vboxsf uses the HCGC interface and doesn't go near the network.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

Keyzer, if you use the CPU while working with the imagages, NFS might be faster because I think SF works heavily on the CPU. If the Guest already maxes it's CPU, the throughput will be ajusted for that.
It's only speculation, I haven't tested or confirmed this.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
KeyzerSuze
Posts: 88
Joined: 14. Aug 2008, 07:57
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: debian i386, debian amd64, Windows XP, Windows 2003 Server

Post by KeyzerSuze »

Sasquatch wrote:Keyzer, if you use the CPU while working with the imagages, NFS might be faster because I think SF works heavily on the CPU. If the Guest already maxes it's CPU, the throughput will be ajusted for that.
It's only speculation, I haven't tested or confirmed this.
I am doing c/c++ compliations. I was just suprissed I would have thought that vboxfs would be faster.

Alex
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

if you look at the source code (src/VBox/Additions/linux/sharedfolders/regops.c, for example you will see that all vboxsf goes in 4096 byte chunks so to read a 12K file you will have perhaps a dozen switches between the host and guest context. These all take overhead. In general HDD I/O that is mapped to VDIs is far more efficient because the guest file system caches most of the meta data and also tends to do readahead to load active areas. If you look at average DMA block sizes they are far more efficient. This about it: because the guest can't understand what file-locking is going on on the host side it has to be very conservative. NFS and NTFS are better optimised for this. If you need to keep source on the server side then the fastest method is to use VDI containers which you can loop mount on the host-side when the VM isn't running.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
KeyzerSuze
Posts: 88
Joined: 14. Aug 2008, 07:57
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: debian i386, debian amd64, Windows XP, Windows 2003 Server

Post by KeyzerSuze »

TerryE wrote:if you look at the source code (src/VBox/Additions/linux/sharedfolders/regops.c,
...snip...
The great advantage of open source, looking at the code.

Thanks for the explanation it make a lot of sense. don't really want to wrap it up in a vdi, because I want to share it out to other machines (not necessarily vm machines).
Post Reply