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

Re: [K12OSN] swap size

On Monday 29 April 2002 12:48 pm, John Meissen wrote:
> dbentson orion lcsd k12 wa us said:
> > The documentation I have says that I should have my SWAP space be the
> > same size as my available RAM. 
> I'd love to know where that rule of thumb came from. It's been
> around for 20 years or more. In my opinion, it's completely wrong.

That rule of thumb came from older computers that had far less memory to work 
with.  Smaller computers that would run OS's such as DOS and CPM would only 
run a single application at a time, and swap wasnt really applicable. When 
the "Unix Workstation" came about, and you could run more than one 
application at a time, context-switching presented a problem with the memory. 
What happens when you want to start another application, but all the other 
applicaitons are taking up all the memory? The idea was to take a piece of 
memory that was not in use and put it on disk. Since most applications would 
take up a large percentage of memory (some as much as %70) it was neccicary 
to make sure there was enough swap space to switch out all of memory. That is 
where the 2x and 1x phsical memory rules came from.  Howerver, you are right, 
in that it is way out of date.  Now days, with memory and disk being so 
cheap, if you have 4Gb of memory, it makes no sence to have 8Gb of swap 
space. In fact, having swap space over 512Mb can actuly decrease performance 
on many systems. The "filesystem" used for swap is the same concept as that 
of physical memory, but the access of that is not the same, and having to 
maintain swap spaces that large can hinder the memory performance of a 

My advice, (assuming you have the ability to do this) is to use a utility such 
as xosview and see how much of swap you are typically using. After a week or 
so, you can adjust the size of your swap partitions as needed (leave like 
100Mb extra just in case).  It you put your swap partitions at the end of the 
drive, they will be a bit faster, and somewhat easier to resize.


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