Gem install SUPER SLOW in linux virtual machine

I’m switching a project over to working in a linux virtual machine,
running in windows xp. Ruby and rails are working generally, but
there’s one gem (ferret) that i need to get for this project. I typed
in “gem install ferret” and got a message “Updating metadata for 903
gems from http://gems.rubyforge.org”.

Fair enough, except that it’s been doing that for over an hour now (more
like an hour and a half). Whenever i’ve done this in windows it’s taken
a minute or two at most.

Does anyone know why it might be so slow? My network connection (wired)
out of the linux vm is otherwise pretty fast, about 6 Mb at the moment.

thanks
max

Max W. wrote:

I’m switching a project over to working in a linux virtual machine,
running in windows xp. Ruby and rails are working generally, but
there’s one gem (ferret) that i need to get for this project. I typed
in “gem install ferret” and got a message “Updating metadata for 903
gems from http://gems.rubyforge.org”.

Fair enough, except that it’s been doing that for over an hour now (more
like an hour and a half). Whenever i’ve done this in windows it’s taken
a minute or two at most.

Does anyone know why it might be so slow? My network connection (wired)
out of the linux vm is otherwise pretty fast, about 6 Mb at the moment.

thanks
max

I ended up killing this and forcing the install without update with

sudo gem install ferret --no-update-sources

So, i’m up and running but still puzzled over why it was taking so long.
I tried starting it again and once again it looked like taking much
longer than usual (I killed it again). So, if anyone has any ideas i’d
still like to know :slight_smile:

Max W. wrote:

So, i’m up and running but still puzzled over why it was taking so long.
I tried starting it again and once again it looked like taking much
longer than usual (I killed it again). So, if anyone has any ideas i’d
still like to know :slight_smile:

If you’re not running >1.0.0 then try upgrading.

In previous versions Rubygems used up a LOT of memory as YAML parsed the
update log. On my server this led to memory swapping and taking ages.
It’s largely fixed in later versions. I think they use Marshal now??

best,
Dan

On Jan 22, 2008, at 06:14 AM, Max W. wrote:

like an hour and a half). Whenever i’ve done this in windows it’s
sudo gem install ferret --no-update-sources

So, i’m up and running but still puzzled over why it was taking so
long.
I tried starting it again and once again it looked like taking much
longer than usual (I killed it again). So, if anyone has any ideas
i’d
still like to know :slight_smile:

Can you run it under the profiler?

From: “Max W.” [email protected]

Does anyone know why it might be so slow? My network connection (wired)
out of the linux vm is otherwise pretty fast, about 6 Mb at the moment.

Any possibility the virtual machine was swapping (out of RAM) ?

That happened to me on a 512 MB linux system under VMWare, during the
“building rdoc documentation” portion of a gem install… it was
swapping
so badly it became horrendously slow… I let it run for a couple hours
before
giving up and killing it.

Regards,

Bill

Eric H. wrote:

Can you run it under the profiler?

sure - using ‘top’ (the extent of my profiling knowledge) i can see that
gem is using
cpu - negligible (0.2%)
ram - 10% (of the virtual memory allocated to the virtual machine?)
virt - 63624 (is this in kB? 63 meg sounds about right for 10%)

So, it doesn’t seem to be using excessive amounts of memory, but i don’t
know enough to tell whether lots of swapping is happening.

Thanks for the help guys btw :slight_smile: