[ruby-core:32720] Re: [Ruby 1.9-Bug#3919][Open] Ruby in PowerTOP - too many CPU wakeups

From: Ryan Davis <ryand-ruby@...>
Date: 2010-10-08 09:08:11 UTC
List: ruby-core #32720
On Oct 7, 2010, at 23:28 , Suraj Kurapati wrote:

> Ruby causes too many CPU wakeups according to Intel's PowerTOP tool.
> For example, this simple I/O bound program causes 99 wakeups/second
> and accounts for 14% of the CPU wakeups on my system:
> 
>  ruby -e gets
> 
> In contrast, when I run `python` (2.6.5) and make it wait for I/O, it
> does not even appear in PowerTOP because it causes so little wakeups.
> 
> Please make Ruby more power-efficient!  Thanks for your consideration.

Ironically, I was just benchmarking perl, python, and ruby for both eval speed and startup speed (which for python is heavily IO bound):

> # of iterations = 1000
>                           user     system      total        real
> null_time             0.000000   0.000000   0.000000 (  0.000121)
> perl -e 0             0.040000   0.330000   7.190000 (  9.398628)
> ruby -e 0             0.030000   0.300000   4.730000 (  6.062263)
> python -c 0           0.070000   0.450000  74.490000 ( 77.852470)
> perl eval 1 + 1       0.040000   0.390000  10.180000 ( 11.488141)
> ruby eval 1 + 1       0.040000   0.340000   6.770000 (  7.036988)
> python eval 1 + 1     0.060000   0.440000  75.790000 ( 77.879552)

It is absolutely amazing to me that python startup costs are so bad.

So, by all means, make ruby more power-efficient, but please do not make it as efficient as python! :P


In This Thread