vboxfs speed

This is for discussing general topics about how to use VirtualBox.

vboxfs speed

Postby KeyzerSuze » 16. Feb 2009, 09:14

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 ?
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

Postby vbox4me2 » 16. Feb 2009, 12:10

Is the VM running via NAT, try HIF.
vbox4me2
Volunteer
 
Posts: 5222
Joined: 21. Nov 2008, 20:27
Location: Rotterdam

Postby KeyzerSuze » 17. Feb 2009, 00:44

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
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

Postby vbox4me2 » 17. Feb 2009, 01:08

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.
vbox4me2
Volunteer
 
Posts: 5222
Joined: 21. Nov 2008, 20:27
Location: Rotterdam

Postby KeyzerSuze » 17. Feb 2009, 05:23

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
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

Postby TerryE » 17. Feb 2009, 10:56

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.
TerryE
Site Moderator
 
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

Postby Sasquatch » 19. Feb 2009, 16:52

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.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Postby KeyzerSuze » 20. Feb 2009, 03:02

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
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

Postby TerryE » 20. Feb 2009, 04:07

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.
TerryE
Site Moderator
 
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

Postby KeyzerSuze » 20. Feb 2009, 07:13

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).
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


Return to Using VirtualBox

Who is online

Users browsing this forum: No registered users and 21 guests