* [sup-talk] ruby/sup causing lots of wakeups-from-idle
@ 2007-11-12 0:49 Phil Snowberger
2007-11-12 1:24 ` William Morgan
0 siblings, 1 reply; 3+ messages in thread
From: Phil Snowberger @ 2007-11-12 0:49 UTC (permalink / raw)
I was wondering if anybody else has a problem with sup/ruby causing
lots of wakeups-from-idle? The following line comes from the output
of powertop on my thinkpad:
...
20.6% ( 94.8) ruby : do_nanosleep (hrtimer_wakeup)
...
That is, there are ~94.8 wakeups-from-idle per second occuring because
ruby is do_nanosleep'ing a lot. Is there any workaround for this?
Cursory searching seems to indicate that lots of wakeups can be caused
by doing usleep()s instead of select()/poll(). I'm trying to save as
much battery power as possible, and I currently leave sup off until I
want to check my email, which introduces startup time, etc.
I could just run it on some other host and access it with ssh, but for
a few reasons (mostly not wanting to do X forwarding), I'd like to try
getting ruby/sup to behave a little better.
Thanks,
--Phil
^ permalink raw reply [flat|nested] 3+ messages in thread
* [sup-talk] ruby/sup causing lots of wakeups-from-idle
2007-11-12 0:49 [sup-talk] ruby/sup causing lots of wakeups-from-idle Phil Snowberger
@ 2007-11-12 1:24 ` William Morgan
2007-11-13 20:26 ` Phil Snowberger
0 siblings, 1 reply; 3+ messages in thread
From: William Morgan @ 2007-11-12 1:24 UTC (permalink / raw)
Excerpts from Phil Snowberger's message of Sun Nov 11 16:49:55 -0800 2007:
> I was wondering if anybody else has a problem with sup/ruby causing
> lots of wakeups-from-idle?
Does this happen with other multithreaded Ruby apps? Sup uses select()
for input, and the only persistent threads have multi-second sleep
times. But I have no idea how that translates down to the OS level, as
Ruby does its own threading.
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [sup-talk] ruby/sup causing lots of wakeups-from-idle
2007-11-12 1:24 ` William Morgan
@ 2007-11-13 20:26 ` Phil Snowberger
0 siblings, 0 replies; 3+ messages in thread
From: Phil Snowberger @ 2007-11-13 20:26 UTC (permalink / raw)
On Nov 11, 2007 8:24 PM, William Morgan <wmorgan-sup at masanjin.net> wrote:
> Excerpts from Phil Snowberger's message of Sun Nov 11 16:49:55 -0800 2007:
> > I was wondering if anybody else has a problem with sup/ruby causing
> > lots of wakeups-from-idle?
>
> Does this happen with other multithreaded Ruby apps? Sup uses select()
> for input, and the only persistent threads have multi-second sleep
> times. But I have no idea how that translates down to the OS level, as
> Ruby does its own threading.
I tried raggle to see if it would cause a similar amount of wakeups,
and it does; Once it settles into a steady state (after it's checked
each feed on startup), it does ~95 wakeups per second, just like sup.
Sorry for what appears to be a false alarm; I'll take this question to
some ruby folks.
Thanks,
--Phil
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-11-13 20:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-12 0:49 [sup-talk] ruby/sup causing lots of wakeups-from-idle Phil Snowberger
2007-11-12 1:24 ` William Morgan
2007-11-13 20:26 ` Phil Snowberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox