2012/5/16 John Chow <
jwiz...@gmail.com>:
> Thanks for the reply Iñaki. My question wasn't about how MRI gc's the EM
> objects, but rather how the MRI GC affects the performance of an EM app.
> Since this is my first real production server, I'm not sure why some
> processing are 3ms and some are 30ms, even though they are processing the
> same message and behaving the same. I'm wondering if this kind of spike is
> normal, and if not, what possible (obvious) reason could this spike?
Ok, I understand. Yes, CG runs when Ruby wants so it could delay some
random operations in your code. However is difficult to prove that
since, as said before, CG runs "whenever".
Perhaps you could add a periodic timer which runs GC.start every 5
seconds, and log it somewhere. Maybe that lets you investigate if the
delay in your operation happens while CG.start takes place.