This is the most specific MRI garbage collector that cleans memory. I did some testing with a simple Rails application and a partial one:
100.times{Test.new}
I could see the spikes just like you:
Rendered tests/_row.html.erb (3.9ms)
Rendered tests/_row.html.erb (45.3ms)
Rendered tests/_row.html.erb (5.2ms)
...
Rendered tests/_row.html.erb (42.8ms)
-, , GC , , . . 10 , 10 (+/- 1) GC, GC , .
GC -, ?pp=profile-gc-time URL-. Ruby -.
user324242