SWAPON, DUDE!

Jon maddog Hall maddog at li.org
Tue Sep 26 18:05:01 EDT 2006


dragonhawk at gmail.com said:
>  As you say, "always more RAM".

Yes, I would normally say that, but noticing that Kjel mentioned it was a desktop
machine, some of those (particularly the older ones) max out at 2 GB, so you can't
"add more RAM" without "adding another motherboard".

This is one reason why I normally purchase a server motherboard for my desktop
systems.  They are more expensive, but you usually get what you pay for, with greater
memory expansion, faster bus speeds and your choice of hardware to put in those slots.

In addition, depending on the architecture of the machine, swapping an inactive
program out to disk frees up other resources in the machine, as well as freeing up
more RAM for your active programs, so your active programs do not have to page.  Lots
of your demons (daemons, whatever) are swapped out waiting on some type of I/O
to happen, just to have them swapped in and "do their thing" when needed.  If the
swap space was not there, these puppies sit in RAM, and there is then less RAM for
your important stuff, like Tux Racer!

There is something to be said however, about Ben's mention of "better algorithms", and
that is while main memory size is increasing and memory prices are dropping, cache
memory is not necessarily increasing and decreasing at the same speeds.  And cache is
to main memory as main memory is to disk memory (well, maybe not THAT bad, but pretty
bad....)

A friend of mine named David Mossberger (yes, the same one who wrote "sane" and
who was the principal engineering on porting Linux to the Itanic, er, ah, Itanium,
did a study about cache utilization and found out that "badly operating programs" would
run forty times longer than better written programs simply due to the way they
accessed main memory and kept trashing the cache in the Alpha chip.  Intel chips (due
to their lesser cache) were only affected with programs that ran 10 times as slow
(of course with the lower amount of cache they were 4 time slower than the Alpha).

Algorithm usage, even in something as simple as removing unused data before you
sort for presentation instead of after sorting is something to always consider.
The best computer is still between your ears.

md
-- 
Jon "maddog" Hall
Executive Director           Linux International(R)
email: maddog at li.org         80 Amherst St. 
Voice: +1.603.672.4557       Amherst, N.H. 03031-3032 U.S.A.
WWW: http://www.li.org

Board Member: Uniforum Association
Board Member Emeritus: USENIX Association (2000-2006)

(R)Linux is a registered trademark of Linus Torvalds in several countries.
(R)Linux International is a registered trademark in the USA used pursuant
   to a license from Linux Mark Institute, authorized licensor of Linus
   Torvalds, owner of the Linux trademark on a worldwide basis
(R)UNIX is a registered trademark of The Open Group in the USA and other
   countries.




More information about the gnhlug-discuss mailing list