From: Mark Somerville Date: 2010-10-08T18:38:19+09:00 Subject: [ruby-core:32721] Re: [Ruby 1.9-Bug#3919][Open] Ruby in PowerTOP - too many CPU wakeups --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 08, 2010 at 03:28:26PM +0900, Suraj Kurapati wrote: > Bug #3919: Ruby in PowerTOP - too many CPU wakeups > http://redmine.ruby-lang.org/issues/show/3919 This is a duplicate of #3436. > 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: >=20 > ruby -e gets >=20 > Please make Ruby more power-efficient! Thanks for your consideration. This is caused by the timer thread. It's not easy to remove the timer thread completely, however in ruby-core:32686 [1] I submitted a patch to only use the timer thread when it is required to schedule Ruby threads. With that patch, the timer thread is not used in single-threaded applications. Feedback on my approach to this problem would be greatly appreciated, since this is an important issue for me. The code seems sound, but perhaps there are some intricacies I've missed. Any thoughts? 1. http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/32686 --rwEMma7ioTxnRzrJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkyu5qYACgkQFC+QcFj+6g19OwCffm0HF+2Km4BolaEEjhGpolXX ieUAnio369PNDueWa71K4FMvyWTHXk8E =GLR0 -----END PGP SIGNATURE----- --rwEMma7ioTxnRzrJ--