On Mar 6, 10:30 pm, Brian Adkins <lojicdotcomNOS... / gmail.com> wrote:
> When running a test that primarily involves loading up a few MySQL
> tables with ActiveRecord objects, I was surprised to see the Ruby CPU
> utilization at 93% and the MySQL CPU utilization at 7%. I would expect
> this workload to be heavier on MySQL than that.

What is your script doing? Can you post it?



> Has this been other folks' experience? Is running in the test
> environment incredibly different than production with respect to CPU
> utilization?

I think depends on more of what you're doing and how you're doing it.
I've seen CPU and memory issues with AR before, but these have all
been fixed by understanding how and when to do things in AR (and in
ruby). This also depends on the hardware differences between your
development, test and production environments. Disk speed, memory and
CPU(s) can have alot to do with the change between the environments.

> I suppose my next step is to run in production to see what
> kind of results I get.


> I'm running the test from the root of my Rails project via:
>

What your program is doing and how it is doing it will give more
insight into your issue then just profiler output. Have you isolated
the problem to a particular block of code?

Zach