gem install SUPER SLOW in linux virtual machine

M

Max Williams

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
 
M

Max Williams

Max said:
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 :)
 
D

Daniel Lucraft

Max said:
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 :)

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
 
E

Eric Hodel

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

Can you run it under the profiler?
 
B

Bill Kelly

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
 
M

Max Williams

Eric said:
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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top