Page 1 of 1

vboxfs speed

Posted: 16. Feb 2009, 09:14
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 ?

Posted: 16. Feb 2009, 12:10
by vbox4me2
Is the VM running via NAT, try HIF.

Posted: 17. Feb 2009, 00:44
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

Posted: 17. Feb 2009, 01:08
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.

Posted: 17. Feb 2009, 05:23
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

Posted: 17. Feb 2009, 10:56
by TerryE
Correct vboxsf uses the HCGC interface and doesn't go near the network.

Posted: 19. Feb 2009, 16:52
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.

Posted: 20. Feb 2009, 03:02
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

Posted: 20. Feb 2009, 04:07
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.

Posted: 20. Feb 2009, 07:13
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).