Re: egcs-1.0.3a weirdness with lynx-2.8 on v2.1.107

Richard B. Johnson (linker@nightshade.ml.org)
Sat, 27 Jun 1998 23:16:08 -0400 (EDT)


On Sat, 27 Jun 1998, D.A. Harris wrote:

> In Unix, not just Linux, I'm always operated on the notion that you needed
> more swap than memory (gizzled Unix sys. admin. experience), and that you
> could have problems otherwise. Maybe you were just lucky under libc5. There
> are numerous utilies that recommend lots of swap, if I remember right,
> ImageMagic is one, I think they recommend 3 times RAM in swap. If I'm wrong
> on that one then I do know that a lot CAD/CAE apps requires substanial
> amounts of swap.

This is absolutly not the case under Linux.

With some unix systems, when you allocate memory it's also allocated in
swap, so if swap<ram you can't use all your ram.

I would guess that some unixes don't allocate ram till it's written to but
do allocate swap (this would be like COWing a page of zero but making sure
the system behaves better when out of ram)..

Linux does neither of these. w/ Linux the only advantage is that unused
pages can get swapped out to make room for cache. But that only happens if
something allocates enough memory to cause swapping then disappears..
Furthermore, Linux doesn't swap out RO exe pages, it just reloads them
from the exe.. further deminishing the advantage of swap.

Finally the 3x argument also comes from a time where ram was very
expensive. The idea goes: well, if you bought Xmegs that means that you
really need 2x megs and sometimes need 3xmegs. Today ram is cheap (now
often under a dollar a meg) so that doesn't hold up.. Most of my computers
have twice the ram they need for normal use.

The only real argument for lotsa swap is that it might help, and that disk
cost almost nothing.

Here's an example:

A server:

[limelight]/usr/local/quake2# ssh nightshade free
total used free shared buffers cached
Mem: 63160 60908 2252 37940 5092 15300
-/+ buffers/cache: 40516 22644
Swap: 72288 4672 67616

and another example

A workstation with bloatscape and bloatscape mail and several apps:

[limelight]/usr/local/quake2# ssh elven free
total used free shared buffers cached
Mem: 63432 62560 872 35044 604 14648
-/+ buffers/cache: 47308 16124
Swap: 66492 4696 61796

My worstation:

[limelight]/usr/local/quake2# free
total used free shared buffers cached
Mem: 63388 48988 14400 5220 2092 40332
-/+ buffers: 6564 56824
Swap: 72288 396 71892

Another server:

[root@nightshade root]# ssh venus free
total used free shared buffers cached
Mem: 127796 125820 1976 25408 55480 19740
-/+ buffers/cache: 50600 77196
Swap: 124956 16 124940

I also have 4 number cruncher computers with figures simmlar to Limelight,
except they have no swap at all..

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu