[LRUG] debugging memory use
David Salgado
david at digitalronin.com
Thu Jan 10 09:01:38 PST 2008
Sounds like you might be getting into some kind of recursion when
parsing the XML. You might be able to use DTrace to find out what's
going on. I haven't used it myself, but it does look very good for
this sort of thing.
http://blogs.sun.com/ahl/resource/dtrace_ruby_oscon_2007.pdf
http://www.oobaloo.co.uk/articles/2007/10/29/dtrace-in-leopard-with-ruby-probes
http://www.sun.com/software/solaris/howtoguides/dtracehowto.jsp
Best of luck
David
On 10/01/2008, Dan Webb <dan at danwebb.net> wrote:
> 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
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
More information about the Chat
mailing list