Re: Nautilus Memory Consumption
- From: Telsa Gwynne <hobbit aloss ukuu org uk>
- To: gnome-list gnome org
- Subject: Re: Nautilus Memory Consumption
- Date: Mon, 30 Jul 2001 16:19:05 +0100
On Fri, Jul 27, 2001 at 08:00:03PM +0200 or thereabouts, Markus Nickels wrote:
> I've got a question regarding to memory consumption:
Uh-oh :)
> When I start my Ximian Gnome Session, Nautilus is started for my
> Desktop.
>
> When I look at its memory consumption (using the Gnome system monitor),
> it shows me 11 processes with a total consumption of 157168 Kb !
> A normal session (nauilus, evolution, mozilla) uses 580 000 kB !
> Is this memory shared in some way or used physically in total ?
> If it is shared, who can I measure the "real" consumption ?
You're getting caught out by the way it's being displayed, I suspect.
Nautilus uses threads. This is somewhat beyond my ability to explain,
but essentially threads are light-weight processes. And the important
thing is that they share memory between them. So when you have a bunch
of threads for the same program, you don't add their memory up,
because they're sharing it.
That's basically the answer you want, but the explanation follows.
Mozilla is another program you see this with. I think Evo may be, too.
I don't have Nautilus or Evolution on this box, but I do have Mozilla
and have been running it for a while. So here's an example.
gtop (the GNOME system monitor) gives the same sort of results as
top, a command-line program. Here are the results of running 'top':
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
32575 hobbit 11 0 31632 30M 11292 R 44.5 24.3 2:46 mozilla-bin
782 root 1 0 26364 21M 3196 R 12.6 16.9 5710m X
1869 hobbit 6 0 992 992 756 R 2.3 0.7 0:00 top
813 hobbit 0 0 1460 1180 732 S 0.7 0.9 1:13 wmaker
816 hobbit 0 0 4368 2052 1348 S 0.7 1.6 0:41 panel
32578 hobbit 1 0 31632 30M 11292 R 0.3 24.3 0:00 mozilla-bin
32579 hobbit 0 0 31632 30M 11292 S 0.3 24.3 0:00 mozilla-bin
818 hobbit 0 0 840 628 448 S 0.1 0.4 1:09 xscreensaver
32580 hobbit 0 0 31632 30M 11292 S 0.1 24.3 0:00 mozilla-bin
32582 hobbit 0 0 31632 30M 11292 S 0.1 24.3 0:00 mozilla-bin
1 root 0 0 124 76 56 S 0.0 0.0 0:07 init
2 root 0 0 0 0 0 SW 0.0 0.0 0:02 kflushd
3 root 0 0 0 0 0 SW 0.0 0.0 0:04 kupdate
4 root 0 0 0 0 0 SW 0.0 0.0 0:00 kpiod
5 root 0 0 0 0 0 SW 0.0 0.0 0:04 kswapd
6 root -20 -20 0 0 0 SW< 0.0 0.0 0:00 mdrecoveryd
...
So I too appear to have about six mozillas. What I really have is six
threads from the one mozilla program. Cutting out the non-moz lines above:
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
32575 hobbit 11 0 31632 30M 11292 R 44.5 24.3 2:46 mozilla-bin
32578 hobbit 1 0 31632 30M 11292 R 0.3 24.3 0:00 mozilla-bin
32579 hobbit 0 0 31632 30M 11292 S 0.3 24.3 0:00 mozilla-bin
32580 hobbit 0 0 31632 30M 11292 S 0.1 24.3 0:00 mozilla-bin
32582 hobbit 0 0 31632 30M 11292 S 0.1 24.3 0:00 mozilla-bin
Hm, okay. Five mozillas, not six. However, they all have exactly the same
numbers for SIZE, RSS, SHARE and %MEM. Only one of them appears to have
used any IO time, and all the PIDs are almost a consecutive run, meaning
they were started one after the other on the machine.
These are clues :)
The fact that the size, RSS, shared memory and percentage of memory used
are all the same is about the only way that you can tell from 'top' that
in fact, despite the different PIDs (the process identification numbers),
they're all the same program, showing up repeatedly! And they're all using
the same 30M of memory. Of those 30M, 11 are for shared memory, means that
any other programs requiring particular libraries will be using those
too. GNOME uses a -lot- of shared libraries. Subtract "share" from "rss"
and you get how much that program is really using.
Btw, top (and gtop) was written before this thread stuff really started
being heavily used in Linux. (Dunno about on other UNIXen.) I am sure
someone will figure out a way to make the GUI apps make this clearer.
I do hope so. Otherwise I have to work out how to explain this in the
gtop docs :)
> Another question; When I start my session, gmc is started as well.
> Can I avoid this ? (Note, that it does not appear in Session properties)
You mean, it doesn't show up in the window you get from the control-center?
(Session->Startup Programs->Browse Currently Running Programs...) But it's
showing up in gtop or gtop?
Or is that icons are being drawn on your desktop?
Telsa
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]