Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: soupjrc@xipdev1.tampa.advantis.com (John R. Campbell)
Subject: Re: swap space choice
Date: 1997/12/18	[thread overview]
Message-ID: <slrn69j379.2tm7.soupjrc@xipdev1.tampa.advantis.com> (raw)
In-Reply-To: 34997F38.D7990395@methodfive.com


On Thu, 18 Dec 1997 14:53:28 -0500, Matthew Marlowe <mmarlowe@methodfive.com> wrote:
>If you have 500MB of memory, you must be intending to run some
>serious applications or will be putting the system into a 
>server role.  If the memory is not overkill for what you
>are intending to do, then having more swap may be extremely 
>useful and you should consider an additional 500MB-1GB of swap
>space.
>
>For example, a 500MB machine may be excellent as an application
>server for a small workgroup, but you still want a good deal of
>swap space in case your users grow accustomed to being able
>to iconize and suspend applications when not in use, instead
>of closing the applications.  Usage habits adjust to available
>memory :)

	Actually, you don't tend to run end-user applications on a
	server;  It's primarily there to deal with delivering files.
	Mind you, you can also run a database server, too, but 500MB
	would provide a sh*tload of cache space for indices (assuming
	you can talk the DB engine into maintaining that kind of a
	cache in memory).

>I believe the x2 rule comes from the theory that any additional
>swap space above x2 is not useful - the system will spend all its
>time page faulting instead of being useful.  So, you should
>consider x2 as the upper bound, and not a suggested minimum.

	In Linux, the paging space isn't shadowing the main memory
	(unlike older Unix systems and XENIX);  The paging space is
	in addition to the main memory (I keep wanting to say "core").

	So, 500MB or RAM + 500MB of paging space = 1000MB of virtual
	memory.

	Unfortunately, however, things get worse quickly;  If you're
	gonna go for a 2:1 overcommitment ratio, well, have lots of
	drives and distribute the paging spaces across them as flatly
	as possible (the larger an individual space, the more latency).
	Latency in paging space is more poisonous than elsewhere since
	we're stalling a LOT of regular I/O pending this one fetch.

	BTW, a memory OCR of 1.5:1, if used, is real close to thrashing.
	While 2:1 can be nice, it only buys you a little bit of time
	to bring a thrashing system under control.

	Oh, yes, please remember (assuming my memory is correct) that
	the code segment of each executable that is running is part of
	the paging space;  Since code is nominally read-only, it doesn't
	get stored to the paging volume but, when needed again, gets
	sucked in from the executable program file.  Heck, when you
	start up a program, the process only loads one code page (the
	first one) and the rest of the program is loaded via page faults.
	This is one reason you can't delete a running executable (or
	write into it, either).

-- 
 John R. Campbell           Speaker to Machines               soup@jtan.com
 - As a SysAdmin, yes, I CAN read your e-mail, but I DON'T get that bored!
   Disclaimer:  I'm just a consultant at the bottom of the food chain, so,
                if you're thinking I speak for anyone but myself, you must
                have more lawyers than sense.




  reply	other threads:[~1997-12-18  5:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-12-18  5:00 swap space choice Robert Gooding
1997-12-18  5:00 ` CoffeeBean
1997-12-18  5:00   ` Matthew Marlowe
1997-12-18  5:00     ` John R. Campbell [this message]
1997-12-19  5:00       ` Greg Lindahl
1997-12-27  5:00 ` Christoph Franzen
1997-12-27  5:00 ` Christoph Franzen
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox