[kwlug-disc] Debugging for memory use

Chris Irwin chris at chrisirwin.ca
Mon Aug 30 11:27:49 EDT 2010


Short question: How do I find out why nautilus is using so much
memory, and maybe fix it. I'm somewhat of a rookie when it comes to
debugging applications, but I have some C ability, and wouldn't mind
investing the time to fix my issue.

Long explanation: I've been having a problem where over time my
machine has less and less free memory. After some playing around, it
turns out that about 500MB of 'stuff' had been swapped out. I have 4GB
of ram, and `free -m` showed very little as 'cached' (maybe 100MB), so
I'm looking at 'actual' memory usage.

First thing I did was kill chromium. For a browser, it tends to be
rather memory intensive. That only freed up a few hundred MB of
memory. My machine, sitting at an empty Gnome desktop was using ~3.2
GB doing nothing. After some detective work I killed nautilus and
suddenly had an extra 1 GB of memory available. This has happened
twice so far, but the effects are far enough removed from any actual
nautilus use that I don't know what caused it.

So, how can I investigate this? Can I install symbols and connect to a
running nautilus process with gdb? Also, how do I use gdb? Is there
something else that is better suited for debugging memory issues?

-- 
Chris Irwin
<chris at chrisirwin.ca>



More information about the kwlug-disc_kwlug.org mailing list