LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-07-2005, 02:08 PM   #1
mani_iips
LQ Newbie
 
Registered: Jul 2005
Location: Indore, India
Posts: 20

Rep: Reputation: 0
Is it possible and worth and having more than one SWAP partition???


Having more than One SWAP partition??
Just wondering.. it is possible but then will that work???
 
Old 08-07-2005, 02:24 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
You can have more than one but why the need for it? If you find that your system is hitting swap all the time, probably indicates you need more RAM instead.
 
Old 08-07-2005, 02:25 PM   #3
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 32
mani_iips

Yes it's possible

I have 2 SWAP partitions and they work fine

Here's my /etc/fstab

Code:
/dev/fd0		/mnt/floppy	auto		noauto			0 0
/dev/sda1               /boot           ext3            noatime                 1 2
/dev/md0                /               ext3            noatime                 0 1
/dev/sda2               swap            swap            defaults,pri=1          0 0
/dev/sdb2               swap            swap            defaults,pri=1          0 0
/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro               0 0
I have 2 Western Digital Raptors

As you can see

/dev/sda1 is boot

/dev/sda2
/dev/sdb2 are swap

/dev/sda3
/dev/sdb3 make /dev/md0 as Raid0

Pete
 
Old 08-07-2005, 03:03 PM   #4
Charred
Member
 
Registered: Mar 2005
Location: Utah, USA
Distribution: Slackware 11
Posts: 816
Blog Entries: 2

Rep: Reputation: 30
The only reason I can see for having 2 swap partitions is if you want to divide your swap space between 2 hard drives like Pete M's setup. As trickykid said, if you're regularly running out of swap space, it's time for more ram.
 
Old 08-07-2005, 03:18 PM   #5
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 32
Just to confirm what trickykid and Charred are saying

Here's my memory and swap usage from "top"
Code:
Mem:   1033860k total,   436516k used,   597344k free,    24124k buffers
Swap:  1012072k total,        0k used,  1012072k free,   229924k cached
Pete
 
Old 08-07-2005, 04:40 PM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
Quote:
Originally posted by Pete M
Just to confirm what trickykid and Charred are saying

Here's my memory and swap usage from "top"
Code:
Mem:   1033860k total,   436516k used,   597344k free,    24124k buffers
Swap:  1012072k total,        0k used,  1012072k free,   229924k cached
Pete
I can see the reason also for having two swaps is when you have Raid setup between two disks, to keep them identical. Other than that, yeah, my servers and machines rarely ever hit swap, only my desktop when I'm doing a gazillion things while ripping dvd's, running intense graphic editing, etc.
 
Old 08-08-2005, 12:58 AM   #7
mani_iips
LQ Newbie
 
Registered: Jul 2005
Location: Indore, India
Posts: 20

Original Poster
Rep: Reputation: 0
that was really an enlightning discussion, thanks to all.
my query solved.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Swap partition paddyjoy Linux - Newbie 2 07-19-2005 07:17 PM
Swap partition mikz Slackware 2 09-27-2004 02:20 PM
Swap partition not used ? Wynand1 Linux - Newbie 5 06-21-2004 06:22 AM
swap partition joeljose Linux - Software 2 04-13-2004 10:14 AM
Newbie Installing Debian3 on m68k w/250M Partition Needs help creating swap partition AppleMac Linux - Newbie 2 11-01-2002 08:45 AM


All times are GMT -5. The time now is 07:53 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration