Total memory usage can't show the whole picture, so we should measure GC pressure as well. At the very least, we want to know how much time is spent in garbage collection during a benchmark so we can compare that with the amount of memory allocated and retained.
I'm not sure what information is available in the built-in Ruby profiling tools. I know GC.stat shows some detailed information about the garbage collector. There's also GC::Profiler but I haven't dug in enough to figure out what's useful there.
Total memory usage can't show the whole picture, so we should measure GC pressure as well. At the very least, we want to know how much time is spent in garbage collection during a benchmark so we can compare that with the amount of memory allocated and retained.
I'm not sure what information is available in the built-in Ruby profiling tools. I know
GC.stat
shows some detailed information about the garbage collector. There's alsoGC::Profiler
but I haven't dug in enough to figure out what's useful there.