You are not logged in.

#1 2010-08-23 07:43:59

Cows
Member
From: Brooklyn, NY
Registered: 2007-05-20
Posts: 101

[SOLVED] Pacman is very slow inside VirtualBox

Hello everyone, I've used Arch Linux for a while now and I never had any serious issue. I've been testing Arch inside VirtualBox recently and it installs fine and all that but when I try to update the system, updating repos is very slow, once the repos are up-to-date, pacman offers the latest packages to download very fast and waits for me to press 'y'. Once I do press 'y', it downloads the packages very slow.

I have a 15 Mbps connection (goes up to 30
Mbps when bandwidth os available).

I'm using a mirror close to
My state NY (rit, umoss, vt, or even gatech).

The /etc/rc.conf and /etc/hosts have the same hostname.

I've tried to test in VMware server but there was a problem with vmware. Fedora 13 also updates really slow as well. Debian and Ubuntu don't have a problem.

I have Arch on my flash drive and I booted it up on my machine and pacman works much faster when not inside the VM. The weird thing is that when I was using and older version of VirtualBox, everything was working great, which makes me think that it's a Virtualbox but.. but then why is Debian working fine but Fedora and Arch slow?

Any suggestions?

Last edited by Cows (2010-08-26 05:34:49)

Offline

#2 2010-08-23 10:36:53

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Pacman is very slow inside VirtualBox

You mean the packages are downloaded at low speed? Have your tried changing the mirrors and using aria2c for segmented download (bauerbill has that feature)?

Offline

#3 2010-08-23 16:30:06

Cows
Member
From: Brooklyn, NY
Registered: 2007-05-20
Posts: 101

Re: [SOLVED] Pacman is very slow inside VirtualBox

The packages download fast, but this only happens inside a virtual machine.

Example:

pacman -Syu

Updating core ... 10-20 seconds
Updatig extra ... 10-20 seconds
Updating community ... 10-20 seconds

Pauses ...

Then quickly displays what needs updating

Then I accept the updates ...

10-20 seconds later it starts downloading the first package pretty fast,100 - 700 Kbps.. outside of vm, packages have downloaded up to 3 Mbps. Then after it downloads the first package, it stops for 10-30 or even 40 seconds before it downloads the next package.

Last edited by Cows (2010-08-23 16:32:15)

Offline

#4 2010-08-26 05:34:27

Cows
Member
From: Brooklyn, NY
Registered: 2007-05-20
Posts: 101

Re: [SOLVED] Pacman is very slow inside VirtualBox

Alright, since no one has posted, I'm going to assume no one knows how to fix this yet.

I've been messing around for the last couple of days, and I was looking into the network options that VirtualBox has.

From all the options:

NAT
Bridged Networking
Internal Networking
Host-Only Networking

NAT and Bridged Networking seem to make the most sense, but the problem was that NAT requests a new IP from the router and uses it's own driver to do the networking, I saw this as that the VirtualBox NAT driver might be messing up how the traffic flows (including the speed) in Arch Linux and possibly in Linux in general.

For Bridged Networking, the VM uses the physical adapter of the host, and that shot me right away. I told myself, why use an intermediate driver to communicate with the router if I can use the physical adapter directly and pull information faster. At the point my statement was theoretical, but once I booted up Arch Linux and tried it... the slowness was gone. Pacman now updates repos and downloads packages much faster. Fedora 13 in the VM also works much faster as well, not only for updating repos and downloading packages, but also for web browsing within the VM.

I think that there might either be a bug or performance issue that's affecting the NAT driver in VirtualBox version 3.2.8 r64453, because you do recall I said that I was using the NAT driver in an older version of VirtualBox and it wasn't slow.

I hope this can help someone in the future.

EDIT: Check this page about Networking options in VirtualBox and what they do:

http://www.virtualbox.org/manual/ch06.html#network_nat

- Jon

Last edited by Cows (2010-08-26 05:42:22)

Offline

Board footer

Powered by FluxBB