[ale] how do I increase Linux swap file size?

Ron Frazier atllinuxenthinfo at c3energy.com
Tue Jan 18 11:53:23 EST 2011


Hi Geoffrey and Scott.  Thanks for the replies.  I'm certainly saving
all the info and procedures that have been posted for later reference.
Based on all the comments, I did some testing (fully documented in
another post) with about 51 windows / tabs open, in which I could barely
make it touch the swap.

I have three computers, which all have an 8 GB swap partition.  I just
used the 2X during installation since that was the rule of thumb I was
aware of.  For the Windows side of the dual boot fence, they have 8 GB
swap files, but I can't speak to how much they use.  They all dual boot
to Ubuntu 10.04.  For the Linux side, I never knew what it NEEDED until
these discussions.  So, here are the current standings and my
conclusions in my computer army:

PC1 - old, 2002 vintage, 1 GB RAM, 8 GB swap
     - Will almost certainly need swap if running more than 3 apps.

PC2 - ~2009 vintage, 4 GB RAM, 8 GB swap
     - May need swap if I exceed about 20 windows / tabs open.

PC3 - ~2009 vintage, home built, 8 GB RAM, 8 GB swap
     - Probably will rarely ever need swap.

I've decided to leave well enough alone and leave all three machines as
they are.  Messing with partitions is such ugly business.  Thanks again
for all the tips though.

Sincerely,

Ron



On Tue, 2011-01-18 at 07:06 -0500, Geoffrey Myers wrote:

> 
> I know the old rule of thumb 2x memory for swap, but why on earth would 
> you thing you would ever need 16GB of swap?  If you see that ever 
> happening, I'd suspect there's something wrong, or your machine needs 
> upgrading.
> 

On Tue, 2011-01-18 at 07:55 -0600, Scott McBrien wrote: 
> I don't know about GUI Ubuntu tools, but one solution would be:
> *Create a temporary swapfile for the kernel to use with a tool like dd
> followed my mkswap
> *swapon the temporary file, and swapoff you existing device
> *make any changes to your swap partition, including deleting it and
> adding back another larger device to take it's place
> *update the /etc/fstab file to reflect the new swap device
> *swapon the new replacement swap device and swapoff the temporary file
> *remove the temporary swap file
> 
> 
> Like the other posters on this thread, I believe your current swap
> size is more than generous, and if anything, you'd want to shrink it,
> not grow it.
> 
> 
> -Scott
> 


-- 

(PS - If you email me and don't get a quick response, you might want to
call on the phone.  I get about 300 emails per day from alternate energy
mailing lists and such.  I don't always see new messages very quickly.)

Ron Frazier

770-205-9422 (O)   Leave a message.
linuxdude AT c3energy.com



More information about the Ale mailing list