Hi everyone !
I'm new to Virtualbox: I've enjoyed using it for a few days but I've discovered that compiling in a Linux guest is terribly slow.
Autoconf (./configure) is painfully slow (1 or 2 lines per second) and I would like to know what happens.
It seems that compiling the C files is actually faster than doing a single configure step.
I am compiling software like binutils, ncurses, DirectFB and the linux kernel.
System time seems to be where the majority of the CPU time is spent, and top is showing that bash is the guilty one (usually in multiples instances, >4).
Is there a way to pinpoint the actual bottleneck ? I assume top is not the best tool for that ...
Thanks in advance !
Host Info:
Windows XP sp3 32bits
Intel Core2 Quad Q6850 3.0Ghz
4GB ram
Vbox 3.2.10 r66523 PEUL
Guest:
Ubuntu 10.04 32bits + Guest Additions
1GB Ram, Dynamic VMDK, 4 CPUs, VT-x and Nested paging ON
Autoconf painfully slow on Ubuntu 10.04
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Autoconf painfully slow on Ubuntu 10.04
VMDK is slower in VirtualBox than VDI and you probably need to assign a bit more memory. Try (2GB)
Compiling on a VM is slower than metal but from what you are saying it is not that slow. I usually get around 60% to 70% depending on what I am compiling.
4 processors on the guest could actually slow you down a bit too. Try with 2 or even 1 depending on how many real processors you have (not cores).
Compiling on a VM is slower than metal but from what you are saying it is not that slow. I usually get around 60% to 70% depending on what I am compiling.
4 processors on the guest could actually slow you down a bit too. Try with 2 or even 1 depending on how many real processors you have (not cores).
-
Cyberaw
- Posts: 4
- Joined: 29. Oct 2010, 17:08
- Primary OS: MS Windows XP
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Ubuntu 10.04
Re: Autoconf painfully slow on Ubuntu 10.04
Thanks for the quick reply, I'll try to lower the core count.
Would it be worth it to convert the VMDK file to VDI ?
Would it be worth it to convert the VMDK file to VDI ?
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Autoconf painfully slow on Ubuntu 10.04
Try it both ways. I did and found the VDI a lot more responsive in VirtualBox. Of course YMMV.
-
Cyberaw
- Posts: 4
- Joined: 29. Oct 2010, 17:08
- Primary OS: MS Windows XP
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Ubuntu 10.04
Re: Autoconf painfully slow on Ubuntu 10.04
Wow, you were right, down to two CPUs the ./configure and compile time is significantly faster... here's some numbers :
Some numbers are a bit strange, but eh, I'm comparing oranges to oranges right now... feel free to suggest another benchmark test !
It seems that 2 cpus and -j2 is the best option.
I didn't test with more than 1GB of ram since 'free' reports always >500mb of free memory.
Some numbers are a bit strange, but eh, I'm comparing oranges to oranges right now... feel free to suggest another benchmark test !
Code: Select all
4 CPUs :
# time ../directfb-1.2.8/configure > log
real 1m28.886s
user 1m7.716s
sys 1m20.401s
# time make -j4 > log
real 5m46.558s
user 10m11.402s
sys 10m8.362s
# time make -j2 > log
real 3m31.060s
user 4m41.218s
sys 5m0.215s
2 CPUs :
# time ../directfb-1.2.8/configure > log
real 1m10.440s
user 0m33.862s
sys 0m52.211s
# time make -j2 > log
real 2m2.630s
user 1m34.390s
sys 2m11.592s
# time make > log
real 2m31.647s
user 1m27.921s
sys 1m58.763s
1 CPU :
# time ../directfb-1.2.8/configure > log
real 1m14.855s
user 0m30.998s
sys 0m41.547s
# time make > log
real 2m47.232s
user 1m21.901s
sys 1m33.438s
I didn't test with more than 1GB of ram since 'free' reports always >500mb of free memory.
| Edit: converting the VMDK to a VDI gave me the same benchmark results for configure and compilation (using 2 cores/jobs). |