Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Feb 2007 10:56:25 -0500
From:      Jerry McAllister <jerrymc@msu.edu>
To:        Aloha Guy <alohaguy123@yahoo.com>
Cc:        Scott Long <scottl@samsco.org>, questions@freebsd.org, current@freebsd.org
Subject:   Re: swap file vs swap partition
Message-ID:  <20070205155624.GA10937@gizmo.acns.msu.edu>
In-Reply-To: <20070204232439.2952.qmail@web53602.mail.yahoo.com>
References:  <20070204232439.2952.qmail@web53602.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Feb 04, 2007 at 03:24:39PM -0800, Aloha Guy wrote:

> What I actually meant was, I know in the old days, if you had 128MB, you 
> want a 256MB swap but with 2GB RAM, isn't 4GB going to be overkill for a 
> swap or are you saying that a 2GB swap will work?  I'm still lost on the 
> ratio since I thought the 2x was only if you had like small amounts of RAM.

It really depends on what you are doing with the system.  
The system also pages to swap space.  Now, you really want enough
ram so that you are not depending on paging while something is
running, but if you have lots of processes with many kind of resting
until something comes up, the system may gradually use up their
in-core space for other stuff, even though the process is not 
actually swapped out.   Then, if some of those processes have to
run again, they don't half to be built up again.   The system just
pulls back in the pages it needs - not necessarily the whole thing.
It is, then good to have enough space for that.   It would take 
some observation on how your system is used to decide just how
important your swap size is.   If you are running a big enough
system that 4 GB of ram is needed, then 4 GB or even 8 GB swap 
is not so comparatively large.   You would probably be running
disk sizes in 70-160 GB size and maybe more than one, so what's 4 GB!

Anyway, you want to have enough swap to cover a crash-dump - not
that it is a frequent occurance unless you are doing development.
After all, this is FreeBSD, not MS.  But, still, it is good to have.

////jerry

ps.  Please learn to break your text lines at about 70 characters.
     It makes responding much easier.
/jrm

> 
> John
> 
> 
> ----- Original Message ----
> From: Scott Long <scottl@samsco.org>
> To: Aloha Guy <alohaguy123@yahoo.com>
> Cc: questions@freebsd.org; current@freebsd.org
> Sent: Sunday, February 4, 2007 2:28:47 PM
> Subject: Re: swap file vs swap partition
> 
> 
> Aloha Guy wrote:
> > Thanks for the input.  You do have good points.  The only issue with 
> > swap partitions is that it seems like you need to increase it everytime 
> > you increase the physical memory.  Is there a swap partition size limit 
> > that pretty much will handle anything and setting a number larger than 
> > that will really not offer anything?
> >  
> > John
> 
> 
> Processors and memory have vastly outpaced the speed of disks; any
> amount of swapping is going to be percieved as being very slow and
> something that should be avoided.  Since RAM is also very cheap now,
> most people just load enough RAM into their system to handle their load,
> and then configure enough swap to hold a crashdump of that RAM.  You
> always want swap so that you can handle unexpected spikes in load
> without crashing, but it's less of an integral piece of normal system
> operation these days.
> 
> Scott
> 
> 
>  
> ____________________________________________________________________________________
> It's here! Your new message!  
> Get new email alerts with the free Yahoo! Toolbar.
> http://tools.search.yahoo.com/toolbar/features/mail/
> _______________________________________________
> 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?20070205155624.GA10937>