Page 1 of 1
Code Compilation in Guests Slow VS Native/KVM/ESXi
Posted: 23. Apr 2009, 22:49
by crash0veride
I/O bound issue solved in newer version of vbox
Re: Code Compilation in Guests Slow VS Native/KVM/ESXi
Posted: 9. Jun 2009, 07:16
by bsdhacker
Yes, code compilation is ridiculously slow in VirtualBox. I use Cygwin inside of an WindowsXP VM, and my builds are at least 75% slower than when performed in native Windows+Cygwin. As a side note, compiling that same project with a mingw cross compiler on native linux takes about 100 seconds with precompiled headers. In the virtualized environment mentioned above, it takes approximately 20 minutes with precompiled headers. Some of that may be attributed to different compilers, but that is unacceptable.
I made an initial attempt to migrate to qemu+kvm, but had some trouble installing XP. Have you found it to be stable enough for a production environment?
Re: Code Compilation in Guests Slow VS Native/KVM/ESXi
Posted: 9. Jun 2009, 12:40
by fixedwheel
crash0veride wrote:... in VirtualBox guests is 50% or more slower then native or versus other Hypervisors. ...
...
Host HW:
Sun Ultra 40M2 2x AMD 2222
2x AMD 2222 = 4 core and as of today virtualbox only supports one core per guest so 25% or less is to be expected compared to native. This is what your numbers give, so whats your point?
ESXi supports max 8 core, and paravirtualisation is supposed to run faster than full virtualisation ...
Re: Code Compilation in Guests Slow VS Native/KVM/ESXi
Posted: 9. Jun 2009, 15:21
by sej7278
i only did the fftw tests, here's my results:
host fedora10 64-bit, intel q6600 @ 3.2ghz, 8gb ram, 60mbps sata drive (os boot), configure: 11secs, make: 49secs
same as above but on the faster 120mbps sata2 (data-only) drive i store my vdi's on, configure: 11secs, make: 16secs
so it would seem that disk throughput makes a lot of difference, even on the host.
guest debian lenny 64-bit, 1gb ram, configure: 59secs, make: 146secs
guest fedora9 32-bit, 1gb ram, configure: 120secs, make: 246secs
its a little odd that it took twice as long on the 32-bit fedora install, i guess the host had to emulate the 32-bit mode - using vt-x.....? makes me think i should use 64-bit guests more often.
i did find that compiling xbmc using visual studio on a 32-bit win2003 guest is pretty slow too (allocated 1gb ram again) but assumed that was due to using shared folders.
so i guess dynamic disks and lack of smp are to blame, has anyone tried on a native disk?
edit: just noticed you used static disks, although still not native/raw drives, but those timings seem pretty bad for a san/ssd.
are you using sata hard disk mode not ide in virtualbox? what about io apic?
the linked thread is useless - you can't compare a linux host running gcc to a windows guest running visual studio express (not even enterprise grade!)
Re: Code Compilation in Guests Slow VS Native/KVM/ESXi
Posted: 10. Jun 2009, 00:04
by fixedwheel
sej7278 wrote:the linked thread is useless - you can't compare ...
now that i ran the fftw ... i think this thread is near to useless too
configure determines what compilations (i have no fortran installed e.g. so a gcc run was sheduled IIRC) then make shall run: resulting times are errant IMHO
configure did not use much CPU at all, and make used 2 of my 4 cores, i guess the bad guest performance is from I/O
Re: Code Compilation in Guests Slow VS Native/KVM/ESXi
Posted: 11. Jun 2009, 12:37
by vbox4me2
Some observation, did you all use an external timer to time this? or did you let the OS/compiler tell you how long it toke? VM clock ticks are not reliable.
Re: Code Compilation in Guests Slow VS Native/KVM/ESXi
Posted: 17. Jun 2009, 13:54
by sej7278
just as an update, tried the debian5 guest with the new 300b1 and allocated all four cpu's to the guest, and got:
configure: 72secs
make: 173secs
noting that the fortran compiler wasn't found, it used some wrapper instead.
cpu usage on the host wasn't effected much, never did any of the cores go above 50%