4

When I launch Firefox the normal way and look in at the processes in htop. Ubuntu starts more then 20 processes called Firefox. They all have more or less sequential PID's. The same happens with Thunderbird and Spotify. These processes then drain all my memory.

PID USER      PRI  NI  VIRT   RES   SHR S CPU% MEM%   TIME+  Command
11843 tom        20   0 1253M  345M 89968 S  6.5  9.0  1:42.50 /usr/lib/firefox/firefox http://doodle.com/
11850 tom        20   0 1253M  345M 89968 S  0.0  9.0  0:00.00 /usr/lib/firefox/firefox http://doodle.com/
11851 tom        20   0 1253M  345M 89968 S  0.0  9.0  0:01.18 /usr/lib/firefox/firefox http://doodle.com/
11852 tom        20   0 1253M  345M 89968 S  0.0  9.0  0:00.00 /usr/lib/firefox/firefox http://doodle.com/  
11853 tom        20   0 1253M  345M 89968 S  0.0  9.0  0:00.00 /usr/lib/firefox/firefox http://doodle.com/
11854 tom        21   1 1253M  345M 89968 S  1.3  9.0  0:01.86 /usr/lib/firefox/firefox http://doodle.com/
11855 tom        20   0 1253M  345M 89968 S  0.0  9.0  0:00.38 /usr/lib/firefox/firefox http://doodle.com/
11856 tom        20   0 1253M  345M 89968 S  0.0  9.0  0:00.45 /usr/lib/firefox/firefox http://doodle.com/
11857 tom        20   0 1253M  345M 89968 S  0.0  9.0  0:00.41 /usr/lib/firefox/firefox http://doodle.com/
11858 tom        20   0 1253M  345M 89968 S  0.0  9.0  0:00.38 /usr/lib/firefox/firefox http://doodle.com/
...

If I open a pdf with evince for example, only 4 or 5 evince processes are started.

PID USER      PRI  NI  VIRT   RES   SHR S CPU% MEM%   TIME+  Command
12090 tom        20   0  962M 86840 39132 S  0.0  2.2  0:01.16 evince /home/tom/test.pdf
12092 tom        20   0  962M 86840 39132 S  0.0  2.2  0:00.00 evince /home/tom/test.pdf
12093 tom        20   0  962M 86840 39132 S  0.0  2.2  0:00.01 evince /home/tom/test.pdf
12095 tom        20   0  962M 86840 39132 S  0.0  2.2  0:00.00 evince /home/tom/test.pdf
12096 tom        20   0  962M 86840 39132 S  0.0  2.2  0:00.35 evince /home/tom/test.pdf

Is this the normal behaviour? If not, how do I solve this?

  • that looks normal, don't you have swappiness? – mchid Sep 30 '15 at 7:32
  • Swapiness = 60. So this is normal? My Fedora laptop for example does not have this behaviour at all. If I open something, it only shows one process. Or is it related to how htop shows these things? – tvcuyck Sep 30 '15 at 7:51
  • Why is it normal? I have just one Firefox process in top. What is doodle.com? – Justice for Monica Sep 30 '15 at 8:50
  • 1
    BTW, the question says top but in the comment you mention htop, would be helpful to correct the question – Catalin Iacob Oct 13 '15 at 20:25
5

The reason you see this many entries in htop is that it shows you threads not processes and Firefox has a lot of those.

If you press H repeatedly you toggle between showing threads and showing processes.

All those Firefox threads are sharing the same memory space so you should only count the RES 345MB once, not add it up for each thread.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.