From: Brian Adkins Date: 2007-03-08T14:30:07+09:00 Subject: Re: High ActiveRecord CPU Utilization M. Edward (Ed) Borasky wrote: > Brian Adkins wrote: >> M. Edward (Ed) Borasky wrote: >>> 1. What's your platform, and what version of Ruby are you running? >> >> $ ruby -v >> ruby 1.8.4 (2005-12-24) [i486-linux] > A couple of suggestions here: > > 1. Download the latest Ruby source -- 1.8.6 pre something. > 2. Compile it for your architecture -- set CFLAGS = "-O2 -march=xxx" > > where "xxx" is your architecture -- it's an AMD64 of some kind, right? > > If you're running a 64-bit system, make sure you have a recent > 64-bit kernel and GCC 4.1 -- older compilers suck wet dog fur on the 64 > bit machines. > > That should get you somewhere in the 10 - 30 percent speed improvement > over a 486-compiled Ruby 1.8.4. It might be more, but just doing the > 1.8.6 and the -O2 / march= stuff is pretty much mandatory. Interesting. Do you mind if I ask where you got the 10 to 30% figure? Stability is more important to me than raw speed, so I'd prefer to not use anything newer than Ruby 1.8.5-p12. I'm running a 32 bit kernel because 64 bit was, let's say, problematic. My gcc is 4.1.2.