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

Scott McBrien smcbrien at gmail.com
Tue Jan 18 08:55:16 EST 2011


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


On Jan 18, 2011, at 4:49 AM, "wolf at wolfhalton.info" <wolf at wolfhalton.info> wrote:

> My average swap usage is zero(0) in a system with 2GB Ram or more.
> I set swap to 200MB
> The rule of thumb was set when the average ram was 16 MB.  RAM is so available and cheap now that the rule is outdated.
> 
> -----Original Message-----
> From: Ron Frazier <atllinuxenthinfo at c3energy.com>
> Reply-to: Atlanta Linux Enthusiasts <ale at ale.org>
> To: Atlanta Linux Enthusiasts <ale at ale.org>
> Subject: [ale] how do I increase Linux swap file size?
> Date: Mon, 17 Jan 2011 17:21:31 -0500
> 
> Hello all,
> 
> My main hard drive on this machine is partitioned as follows:
> 
> 157 GB NTFS Windows Vista
> 97 GB EXT4 Linux (Ubuntu 10.04)
> 8 GB Linux swap
> 235 GB NTFS Windows Data (Also usable in Ubuntu)
> 
> I normally keep my swap file set for 2X system ram.  I recently upgraded
> the computer to 8 GB of RAM, so I would like to non destructively shrink
> the last partition, while keeping it at the end of the disk.  Then, I
> want to increase the swap file to 16 GB.  Anybody know how to do that,
> preferably with a graphical utility, under Ubuntu?
> 
> Thanks in advance for your help.
> 
> Sincerely,
> 
> Ron
> 
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20110118/0082b8a1/attachment.html 


More information about the Ale mailing list