Ruby Memory Profile

Hello Rubyists,
I’m writing quite a quiet a resource hungry program (current about
3300 lines of Ruby code).

I think I’ve got the running time down to a reasonable level (of
course CPU is 100% all the way), thanks to profile.rb and rbprof.rb!

But when I look at top, memory consumption is crazy; it’s about 2MB
every second! On my 1GB system, it was swapping (thanks to the Linux
kernel, still not thrashing) in about 10 minutes…

So my question: Anybody has built or know of a memory profiler in
Ruby? Somewhat akin to profile.rb/rbprof.rb but for memory usage…

/squidster

Hello Rubyists,
I’m writing quite a quiet a resource hungry program (current about
3300 lines of Ruby code).

I think I’ve got the running time down to a reasonable level (of
course CPU is 100% all the way), thanks to profile.rb and rbprof.rb!

But when I look at top, memory consumption is crazy; it’s about 2MB
every second! On my 1GB system, it was swapping (thanks to the Linux
kernel, still not thrashing) in about 10 minutes…

You mean memory consumption increases by 2MB/sec? Perhaps you’ve
tickled a bug in a C extension that makes it leak…

···

Squidster (squidster@techie.com) wrote:

So my question: Anybody has built or know of a memory profiler in
Ruby? Somewhat akin to profile.rb/rbprof.rb but for memory usage…


Eric Hodel - drbrain@segment7.net - http://segment7.net
All messages signed with fingerprint:
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04

Eric Hodel drbrain@segment7.net wrote in message news:20021203021753.GK38939@segment7.net

···

Squidster (squidster@techie.com) wrote:

You mean memory consumption increases by 2MB/sec? Perhaps you’ve
tickled a bug in a C extension that makes it leak…

Yeah. 2MB/s.
But I don’t think it’s a bug in a ‘C’ extension…it’s something to do
with the Kernel#clone method…still investigating.