LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-30-2006, 08:17 PM   #1
madhatter3
Member
 
Registered: Dec 2005
Posts: 36

Rep: Reputation: 15
Upgrading RAM


I just built a new computer and installed SUSE on it. I currntly have 512MB of ram on it and want to upgrade it. When I do how do I change the size of the SWAP partition?

Thanks
 
Old 01-30-2006, 08:21 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
If your swap is already 1GB, you probably don't need to. Otherwise, you can create a 1GB partition at the end of the drive, format it as swap space, and then change your /etc/fstab file to use the new partition.
 
Old 01-30-2006, 11:06 PM   #3
lavluda
Member
 
Registered: Jan 2006
Location: Dhaka, Bangladesh
Distribution: Debian sid, Suse 9.3 pro, Mandrake 10.0, Redhat 7-9, FC-2,3, Gentoo 2006,2006.1
Posts: 89
Blog Entries: 2

Rep: Reputation: 15
What are you trying to do?
Reduce the swap size?
Then please give us the output of:
"fdisk -l"
 
Old 01-30-2006, 11:45 PM   #4
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
You probably don't need to change your swap - after all, the only time swap gets used is if the system pushes RAM past capacity, and the system is forced to write out memory pages to disk. The more RAM you have, the less likely that becomes, and if you're running a typical desktop and have at least 256Mg or 512Mg of swap, most likely that will be plenty. If you are running a massively loaded server you would need more, but at least for my own personal home PC's, 256Mg is all I ever give it.

As an aside, the "swap should equal twice RAM" rule was important back in the day, where having 16 or 32Mg of RAM was bleeding edge, and it was not all that difficult for the system load to max out physical memory. These days however, where 256Mg, 512Mg, or even 1G of RAM is becoming common, the importance of swap is diminishing. It won't hurt to create a larger swap space, but it probably isn't necessary, and it wastes disk space
 
Old 01-31-2006, 01:27 AM   #5
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Changing the size of the swap partition takes a while because you have to backup the data on other partitions and then change the partition table. Linux gives you another way to add more swap by using a file instead from a partition.

I set 256 MB for swap and I have a gigabyte of RAM. The only time Linux goes to the swap is when I play games or leave it on for two days. When I leave it on for two days, Linux only eats a few kilobytes, but that is only if I leave foldingathome running.

To setup a file for a swap that is going to be about 512 MB in size.
1) dd if=/dev/zero of=/tmp/swapfile bs=1048576 count=512
2) mkswap /tmp/swapfile
3) swapon /tmp/swapfile

You can place the line below in /etc/fstab but its optional.
/tmp/swapfile swap swap defaults 0 0

You should see more swap space if you type free or type cat /proc/swaps
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
upgrading RAM MasterOfTheWind Linux - Hardware 13 10-30-2005 10:29 AM
Upgrading Ram is there any settings to adjust Homer Glemkin Linux - Hardware 2 11-05-2004 02:46 PM
Upgrading RAM Sherlock Linux - Hardware 5 08-23-2004 05:54 PM
upgrading ram to 1.5G, redhat linux ES 3.0 doesn't recognize?? Manjit Linux - Hardware 0 08-19-2004 06:28 PM
Will upgrading my ram affect my redhat installation cyberswami Linux - Hardware 6 02-24-2003 08:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration