Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
* [sup-devel] really high wakeup count in powertop
@ 2010-11-10  0:40 Chris Mason
  2010-11-10 14:41 ` Chris Mason
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Mason @ 2010-11-10  0:40 UTC (permalink / raw)
  To: sup-devel

Hi everyone,

I'm new to sup and really like the interface and the features.  But, I
popped up powertop while it was running and sup accounts for a constant 100
wakeups/second, much more than the one or two wakeups/sec from our old
friend mutt.

I haven't done much ruby but can make my way through most things.  If
someone could point me at the polling function most likely to cause the
wakeups I can work out a patch.

I'm running git from this Monday, so pretty recent.  Ruby 1.9.1

Thanks!

-chris
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [sup-devel] really high wakeup count in powertop
  2010-11-10  0:40 [sup-devel] really high wakeup count in powertop Chris Mason
@ 2010-11-10 14:41 ` Chris Mason
  2010-11-10 16:13   ` Gaute Hope
  2010-11-10 18:35   ` William Morgan
  0 siblings, 2 replies; 5+ messages in thread
From: Chris Mason @ 2010-11-10 14:41 UTC (permalink / raw)
  To: Chris Mason; +Cc: sup-devel

Excerpts from Chris Mason's message of 2010-11-09 19:40:58 -0500:
> Hi everyone,
> 
> I'm new to sup and really like the interface and the features.  But, I
> popped up powertop while it was running and sup accounts for a constant 100
> wakeups/second, much more than the one or two wakeups/sec from our old
> friend mutt.
> 
> I haven't done much ruby but can make my way through most things.  If
> someone could point me at the polling function most likely to cause the
> wakeups I can work out a patch.
> 
> I'm running git from this Monday, so pretty recent.  Ruby 1.9.1

(This got dumped into the moderator approval queue, so I'm resending,
this time with more details)

strace showed we were hammering on futexes, and a little digging made it
clear sup isn't to blame.  The ruby timer thread is polling for
signals (or something) every 10ms:

http://redmine.ruby-lang.org/issues/show/3436

I patched up ruby to poll every 500ms and things seem to work.  Not sure
why the ruby developers didn't just change the timeout, but chances are
good they have a real reason.  I'll post to that bug.

-chris
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [sup-devel] really high wakeup count in powertop
  2010-11-10 14:41 ` Chris Mason
@ 2010-11-10 16:13   ` Gaute Hope
  2010-11-10 18:35   ` William Morgan
  1 sibling, 0 replies; 5+ messages in thread
From: Gaute Hope @ 2010-11-10 16:13 UTC (permalink / raw)
  To: sup-devel

Excerpts from Chris Mason's message of 2010-11-10 15:41:30 +0100:
> strace showed we were hammering on futexes, and a little digging made it
> clear sup isn't to blame.  The ruby timer thread is polling for
> signals (or something) every 10ms:
> 
> http://redmine.ruby-lang.org/issues/show/3436
> 
> I patched up ruby to poll every 500ms and things seem to work.  Not sure
> why the ruby developers didn't just change the timeout, but chances are
> good they have a real reason.  I'll post to that bug.

Also noticed sup in powertop; so there's nothing to do on the Sup side ?

- gaute


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [sup-devel] really high wakeup count in powertop
  2010-11-10 14:41 ` Chris Mason
  2010-11-10 16:13   ` Gaute Hope
@ 2010-11-10 18:35   ` William Morgan
  2010-11-10 20:18     ` Chris Mason
  1 sibling, 1 reply; 5+ messages in thread
From: William Morgan @ 2010-11-10 18:35 UTC (permalink / raw)
  To: sup-devel

Reformatted excerpts from Chris Mason's message of 2010-11-10:
> I patched up ruby to poll every 500ms and things seem to work.  Not
> sure why the ruby developers didn't just change the timeout, but
> chances are good they have a real reason.

Yeah, the last time someone investigated this, they decided it was a
Ruby issue as well. Keep us informed if that patch gets applied. You
could also try 1.9.2 for kicks.
-- 
William <wmorgan-sup@masanjin.net>
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [sup-devel] really high wakeup count in powertop
  2010-11-10 18:35   ` William Morgan
@ 2010-11-10 20:18     ` Chris Mason
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Mason @ 2010-11-10 20:18 UTC (permalink / raw)
  To: William Morgan; +Cc: sup-devel

Excerpts from William Morgan's message of 2010-11-10 13:35:41 -0500:
> Reformatted excerpts from Chris Mason's message of 2010-11-10:
> > I patched up ruby to poll every 500ms and things seem to work.  Not
> > sure why the ruby developers didn't just change the timeout, but
> > chances are good they have a real reason.
> 
> Yeah, the last time someone investigated this, they decided it was a
> Ruby issue as well. Keep us informed if that patch gets applied. You
> could also try 1.9.2 for kicks.

The 500ms patch apparently isn't good because it limits how often ruby
can switch between threads.  This seems strange to me, because the
kernel should be scheduling the threads, so I'll ask again.

At any rate, it did trigger some discussion and doesn't seem to be fixed
yet in any ruby version.

(For sup uses, 500ms works just fine, and that's my only ruby app).

-chris
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-11-10 20:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-10  0:40 [sup-devel] really high wakeup count in powertop Chris Mason
2010-11-10 14:41 ` Chris Mason
2010-11-10 16:13   ` Gaute Hope
2010-11-10 18:35   ` William Morgan
2010-11-10 20:18     ` Chris Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox