Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Aug 2007 10:55:51 -0400
From:      Jerry McAllister <jerrymc@msu.edu>
To:        Nicholas Wieland <nicholas.wieland@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Swap size
Message-ID:  <20070817145551.GA27837@gizmo.acns.msu.edu>
In-Reply-To: <098C8817-8D41-4D94-96E2-97D4310B0BAE@gmail.com>
References:  <098C8817-8D41-4D94-96E2-97D4310B0BAE@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 17, 2007 at 02:05:57AM +0200, Nicholas Wieland wrote:

> I was reading tuning(7), and I found that I should size my swap  
> double the size of my physical memory.
> AFAIK that was true some years ago, when memory was not as cheap as  
> now, and following that guideline I should set my swap to 2GB, which  
> seems far too much for swap (at least to me ...). I will never need  
> this much memory as 1GB RAM and 2GB swap.
> Is it still correct ? How can I resize with bsdlabel if I already  
> used all my disk space during install ?

Remember, disk sizes have shot up too.
No, 2 GB is not excessive.   You can get by with less, but you're
not likely to be using proportionately as much disk now as you used
to by going with 2X - I aim for a little over 2X.

Remember that swap gets used for crash dumps and also for paging.
Now, you may think that you want to keep your machine from paging 
and in one sense that is true.   If you are so memory bound that
it has to page just to run, you're going to be so slow that it 
seems to have froze (by today's standards).   But, the system does
write stuff to page space and for processes that are often called
it can speed things up.  

So, it is not really a waste to assign that much to swap.

////jerry

> 
> TIA,
>   ngw
> 
> -- 
> Nicholas Wieland
> nicholas.wieland@gmail.com
> 
> 
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070817145551.GA27837>