[LRUG] debugging memory use

Dan Webb dan at danwebb.net
Thu Jan 10 07:46:24 PST 2008


Hello Peeps,

Im coming across something that Ive never had to deal with before with
ruby's memory usage.  I've got a few scripts that take a while to run
and imports lots of XML data.  Most of them work fine but one
particular one (which is nearly identical to the others) tends to use
lots of memory.

When you run the script its memory usage is fine until just before it
finishes where it quickly takes up about 600MB and spends lots of time
chewing around even though its finished the task in hand.  So....

Firstly, has anyone seen this behaviour before?  Any clues as to
what's going on? Not after specifics...just general pointers would be
excellent.

Secondly, does anyone have any tips on debugging memory issues with
Ruby like this?  I've been getting object counts from ObjectSpace but
don't know any other ways to get more detailed info.

Thanks,

-- 
Dan Webb
http://www.danwebb.net

aim: danwrong123
skype: danwrong



More information about the Chat mailing list