From: Chris Mason Date: 2010-11-11T02:34:53+09:00 Subject: [ruby-core:33127] Re: timer thread sleep interval (powertop abuses) Excerpts from SASADA Koichi's message of 2010-11-10 12:13:56 -0500: > Hi, > > (2010/11/11 0:10), Chris Mason wrote: > > powertop reports that ruby is triggering constant wakeups on linux, > > which prevents us from doing proper power management. > > > > I see a few ideas tossed around in the issue tracker, but it looks like > > they are centered around preventing the timer thread when there is only > > one thread. We'll still want to cut down on wakeups even when there are > > multiple threads. > > Why do you want to reduce timer thread wake-up counts? Power issues? Correct, the wakeups prevent the CPU from going into lower power modes. It directly translates to more power usage and less time on battery. I found this while using sup, which is an email client that we want to leave running for long periods. > > (I want to know the pragmatic requirements) > > > Is the timer thread required for the threads to function? Or is it only > > there to deliver signals etc? > > The main purpose of the timer thread is thread switching notification. So, if I set the sleep to 500ms, then I'll only switch threads every 500ms? That's probably not ideal ;) -chris