Re: Memory Footprint claims




On Sat, 24 Apr 1999, Dan Siemon wrote:
> Here are my memory usage's to compare against the ones below. Can anyone
> comment on the reason why my Gnome processes seem to take up much more
> memory? This thread seems to come up every once in a while lately with
> memory usage claims varying wildly. It would be nice to get a definitive
> answer on this.
> 

It depends very much on how you're using the software. If you have one
panel with a couple launchers on it, that won't use that much memory
beyond the Gnome shared libraries. If you have 3 corner panels, one big
panel, and a bunch of applets on each, with background pixmaps, a pixmap
Gtk theme, a complicated E theme, etc., you could easily chew through tens
of megabytes. (Ditto for Netscape - memory use depends on which windows
are open, and how complicated the page you're viewing is. Also the size of
your in-memory cache, which you can configure in preferences.)

This is a basic fundamental truth: more functionality means more memory
use. You can optimize a little, but the hard truth of this law always
kicks in eventually. (Which is why "gee, let's code in Xlib for
efficiency" is such a completely moronic thing to say. "gee, let's drive
an economy car and use less gas." Xlib-only apps *suck*, just as little
economy cars suck. Not to mention the system-wide increase in memory use
due to lack of shared code - these people always point to the stats for a
single app.)

Moreover, there is almost always a time/space tradeoff, so that small
memory footprint almost always means inferior performance in terms of
execution time.

The correct question to ask, then, is not "how much absolute memory is
used" - which is a stupid question on modern Unix systems anyway, because
half of it may well be shared or swapped out and not affecting anything -
but rather, "are resources being used proportional to the functionality I
am getting - am I paying only for what I use."

Shared libraries, a kernel that's smart about paging, and good program
design all contribute to making the answer "yes." If an app has huge
memory leaks, or a really stupid design, then the answer might be "no."

Worrying about absolute memory use is pretty much a holdover from crappy
operating systems - on a modern Unix, including all the free Unix clones,
the only interesting question is "is the drive thrashing," i.e. are you
getting huge slowdowns because of constant swapping to disk. If you
aren't, then who cares what the memory number is. And you can use a good
bit more RAM than your physical RAM before thrashing begins.

If you are getting slowdowns, then you need to trim functionality
(assuming there are no blatant memory leak bugs in your applications). 
You can do this by using less-functional apps across the board, running
fewer apps, running a less spiffy desktop, or whatever. If you just can't
give up functionality, buy more RAM.

Someone put this in the FAQ. :-)

Havoc





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]