Ruby 1.8.6. - 100% CPU on OS X

D

David Ecd

Recently Ruby has decided to stomp my CPU. After running for a bit Ruby
sometimes spikes to 100% CPU - even if I just have, say, the IRB open in
terminal.

Any ideas?

David
 
G

Glen Holcomb

[Note: parts of this message were removed to make it a legal post.]

Recently Ruby has decided to stomp my CPU. After running for a bit Ruby
sometimes spikes to 100% CPU - even if I just have, say, the IRB open in
terminal.

Any ideas?

David
Are there other things running that you think should be sharing with the
cpu? You could always renice the process so it doesn't hog if it is causing
you problems.
 
D

David Ecd

Glen said:
Are there other things running that you think should be sharing with the
cpu? You could always renice the process so it doesn't hog if it is
causing
you problems.

--
"Hey brother Christian with your high and mighty errand, Your actions
speak
so loud, I can't hear a word you're saying."

-Greg Graffin (Bad Religion)

Usually I just kill the process. Not a big problem when it happens once
in a while. But now it's happening several times a day...

Can't find a reference anywhere about ppl having similar problems...
 
R

Roger Pack

Can't find a reference anywhere about ppl having similar problems...

I've had similar problems before--I think it might be some type of an OS
X thing, and is especially aggravated when using multiple ruby threads
[if I remember correctly]. You can use dtrace [google for it, or a
small hack is [1]] and see if it looks familiar to you at all.
I posted something about something once:
http://www.ruby-forum.com/topic/153559#new

TAke care.
-=R

[1] http://betterlogic.com/roger/?p=271
 
G

Glen Holcomb

[Note: parts of this message were removed to make it a legal post.]

Usually I just kill the process. Not a big problem when it happens once
in a while. But now it's happening several times a day...

Can't find a reference anywhere about ppl having similar problems...
Well if the process is actually running (garbage collection maybe) then it
would use clock cycles and if there is nothing else needing those cycles I
would expect it to use 100%.
 
M

Michal Suchanek

Well if the process is actually running (garbage collection maybe) then it
would use clock cycles and if there is nothing else needing those cycles I
would expect it to use 100%.

Well, if it's on something like a G3 there aren't many CPU cycles,
spare or otherwise. Something like garbage collection could possibly
cause noticeable load. After all, top uses about one third of all cpu
time on these ..

If it's on decent hardware then irb consuming noticeable amounts of
CPU time sounds fishy. But then Firefox always eats some cpu time for
me, and there is usually plenty left so I don't watch it too closely.

Thanks

Michal
 
A

Axel Etzold

-------- Original-Nachricht --------
Datum: Fri, 5 Sep 2008 06:44:13 +0900
Von: "Michal Suchanek" <[email protected]>
An: (e-mail address removed)
Betreff: Re: Ruby 1.8.6. - 100% CPU on OS X
Glen Holcomb wrote:


Well, if it's on something like a G3 there aren't many CPU cycles,
spare or otherwise. Something like garbage collection could possibly
cause noticeable load. After all, top uses about one third of all cpu
time on these ..

If it's on decent hardware then irb consuming noticeable amounts of
CPU time sounds fishy. But then Firefox always eats some cpu time for
me, and there is usually plenty left so I don't watch it too closely.

Thanks

Michal

Hi --

I don't know if this applies to your CPU load problem, but I've had several strange errors related to Ruby
(on Linux Ubuntu).
When I reported them on this and other lists, the authors of various gems told me that they had tried
their software on a fresh install of Ubuntu and Ruby and their gem, without problems.
I then reinstalled Ubuntu on my system, and Ruby, from source, and everything else, and the bug disappeared.

I wrote something like that in response to another post, and Ara Howard wrote that he had had issues with
Ruby and OS X as well.

http://www.ruby-forum.com/topic/164627#new

Maybe a reinstall from source can help ?

Best regards,

Axel
 
G

Glen Holcomb

-------- Original-Nachricht --------
Datum: Fri, 5 Sep 2008 06:44:13 +0900
Von: "Michal Suchanek" <[email protected]>
An: (e-mail address removed)
Betreff: Re: Ruby 1.8.6. - 100% CPU on OS X
Hi --

I don't know if this applies to your CPU load problem, but I've had sever= al
strange errors related to Ruby
(on Linux Ubuntu).
When I reported them on this and other lists, the authors of various gems
told me that they had tried
their software on a fresh install of Ubuntu and Ruby and their gem, witho= ut
problems.
I then reinstalled Ubuntu on my system, and Ruby, from source, and
everything else, and the bug disappeared.

I wrote something like that in response to another post, and Ara Howard
wrote that he had had issues with
Ruby and OS X as well.

http://www.ruby-forum.com/topic/164627#new

Maybe a reinstall from source can help ?

Best regards,

Axel
I wonder if it does the same on the *BSDs?

--=20
"Hey brother Christian with your high and mighty errand, Your actions speak
so loud, I can't hear a word you're saying."

-Greg Graffin (Bad Religion)
 

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

No members online now.

Forum statistics

Threads
474,201
Messages
2,571,049
Members
47,655
Latest member
eizareri

Latest Threads

Top