Forum: Ruby gem install SUPER SLOW in linux virtual machine

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
73c04e9ef9ca435c5b19a2e765ae6d20?d=identicon&s=25 Max Williams (max-williams)
on 2008-01-22 14:19
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
73c04e9ef9ca435c5b19a2e765ae6d20?d=identicon&s=25 Max Williams (max-williams)
on 2008-01-22 15:14
Max Williams 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 :)
0158871402c1ecfa57952e8a379cfd10?d=identicon&s=25 Daniel Lucraft (lucraft)
on 2008-01-22 16:12
Max Williams 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 :)

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
58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 Eric Hodel (Guest)
on 2008-01-24 01:56
(Received via mailing list)
On Jan 22, 2008, at 06:14 AM, Max Williams 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 :)

Can you run it under the profiler?
4feed660d3728526797edeb4f0467384?d=identicon&s=25 Bill Kelly (Guest)
on 2008-01-24 02:33
(Received via mailing list)
From: "Max Williams" <toastkid.williams@gmail.com>
>>
>> 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
73c04e9ef9ca435c5b19a2e765ae6d20?d=identicon&s=25 Max Williams (max-williams)
on 2008-01-24 11:11
Eric Hodel 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 :)
This topic is locked and can not be replied to.