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

Re: Web server Partitions - swap




On Tue, 16 Dec 2003, Magnus von Koeller wrote:

> On Tuesday 16 December 2003 22:12, Karsten M. Self wrote:
> > > SWAP - 1.5GB
> >
> > Rule of thumb:  1-2x RAM.
> 
> I never understood that rule... In what way does it make sense that I 
> need more swap because I have more RAM? Seriously, I'd really like to 
> understand this.

in the old days ....  memory was say 4K total ...

but the programs sizes w/ data totaled at around say 8K or 16K..
	- some folks went around, when building the boxes
	with 100K or 1MB disks, to allow for 2x of memory 
	for swap of the total memory that the machine was capable
	of holding

	( ie .. your program grew bigger, it meant you get
	( a bigger machine and more memory -- you learned to write nice
	( and clean and compact code
 
30 years later, its easier/cheaper to just add a new stick of memory
	- having "some swap" prevents your system from doing a
	random self-reboot or hanging forever whenever it runs out
	of "virtual memory"
		- simple test ... turn off swapp 
			swapoff /dev/hda[your-swap-partition]

		- do indefinite memory allocation ... till it dies
		( it should die at around near your real memory size )

		- its a small itty-bitty program ... but it chews up lots
		of simulated data that resides in memory

	- the above assumes you dont have a swap file nor swap partition

	- lots of embedded boxes does not have swap space ...
	since it knows what kind of apps it'd be running

c ya
alvin



Reply to: