On Mon, Aug 30, 2010 at 11:27 AM, Chris Irwin <span dir="ltr"><<a href="mailto:chris@chrisirwin.ca">chris@chrisirwin.ca</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Short question: How do I find out why nautilus is using so much<br>
memory, and maybe fix it. I'm somewhat of a rookie when it comes to<br>
debugging applications, but I have some C ability, and wouldn't mind<br>
investing the time to fix my issue.<br>
<br>
Long explanation: I've been having a problem where over time my<br>
machine has less and less free memory. After some playing around, it<br>
turns out that about 500MB of 'stuff' had been swapped out. </blockquote><div><br>Check if a lower vm.swappiness helps?<br><br><a href="http://www.linuxvox.com/2009/10/what-is-the-linux-kernel-parameter-vm-swappiness/">http://www.linuxvox.com/2009/10/what-is-the-linux-kernel-parameter-vm-swappiness/</a><br>
 <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I have 4GB of ram, and `free -m` showed very little as 'cached' (maybe 100MB), so I'm looking at 'actual' memory usage.<br>

<br>
First thing I did was kill chromium. For a browser, it tends to be<br>
rather memory intensive. </blockquote><div><br>Because each window (rather each tab) in the browser is a separate process. That is one of the design goals for Chromium, to isolate a bad plugin (Flash) taking down the entire browser and all its windows/tabs.<br>
<br>So, if you open a lot of tabs, that means lots of processes.<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">That only freed up a few hundred MB of<br>

memory. My machine, sitting at an empty Gnome desktop was using ~3.2<br>
GB doing nothing. </blockquote><div><br>This is insane.<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">After some detective work I killed nautilus and<br>

suddenly had an extra 1 GB of memory available. This has happened<br>
twice so far, but the effects are far enough removed from any actual<br>
nautilus use that I don't know what caused it.<br></blockquote><div><br>Even 2.2 GB with nothing but Gnome is still too high.<br><br>I am using KDE, so can't tell what is normal for Gnome, but looking at my laptop now, using the RES field in top: Firefox is the one that uses most memory (1.1G, yes many tabs open), then Xorg is 188MB, then Amarok is 145MB, and Open Office with one document being edited is 104MB. Everything after that is less than 100MB.<br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
So, how can I investigate this? Can I install symbols and connect to a<br>
running nautilus process with gdb? Also, how do I use gdb? Is there<br>
something else that is better suited for debugging memory issues?<br></blockquote></div><br>Does Nautilus do something like automatic desktop indexing, or something<br>like that? That would consume a lot of memory and if there is a bug, it can<br>
be leaking memory too.<br>-- <br>Khalid M. Baheyeldin<br><a href="http://2bits.com">2bits.com</a>, Inc.<br><a href="http://2bits.com">http://2bits.com</a><br>Drupal optimization, development, customization and consulting.<br>
Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra<br>Simplicity is the ultimate sophistication. --   Leonardo da Vinci<br>