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-25-2004, 09:23 AM   #1
librano
Member
 
Registered: Jul 2004
Location: Here, there and everywhere.
Distribution: Arch+KDE, Linux Mint Fluxbox CE
Posts: 163

Rep: Reputation: 31
2 swap partitions


hi all..

i have 2 hard disks each 40 gb and 7200rpm matrox... at the moment i have mandrake 10 installed on one of them (hda) and the other has 2 NTFS partitions (hdb)... remnants of winXP .... being NTFS they are kinda locked since i cant write to them and i dont have winXP any more... so i want to format them into ReiserFS partitions...

I also want to try out some other distros to see which exactly fits my needs... i plan to install the 2nd distro on the 2nd hardisk (hdb)... undecided still about which one to go for but probably SuSE...

question is... i want to create a 2nd swap partition on hdb for the 2nd distro.... now
1. is it possible for both of the distros to use both swap paritions while they are running (not at the same time of course)
2. will this cause problems for the other distro??
3. how much of a performance gain can i expect?? considering that linux will have access to 2 swap partitions on separate hard disks... which i suppose (suppose being the key word) means doubled speeds at which it can access swap...

other info that might be relevant... i have only one ide ribbon cable connecting both harddisks to the motherboard... my present ram situation = 256 sdram with 499mb swap partition on hda.... i want to add another 500mb swap partition on hdb...

thanks for your replies!
 
Old 08-25-2004, 09:45 AM   #2
AvePtah
LQ Newbie
 
Registered: Jul 2004
Location: Australia
Distribution: Debian (Sarge)
Posts: 17

Rep: Reputation: 0
I am fairly certain that two or more distributions can share the same swap partition without problem.

A swap partition is just virtual memory. Memory is volatile, thus any data stored in swap will be erased when the system is rebooted, meaning it is blank when you boot either distro.

As for performance, I don't think you will see a performance difference whichever method you choose; the gain that you would see by using a single swap partition is that you will save 500mb of space
 
Old 08-25-2004, 09:55 AM   #3
AvePtah
LQ Newbie
 
Registered: Jul 2004
Location: Australia
Distribution: Debian (Sarge)
Posts: 17

Rep: Reputation: 0
ok I just re-read your question.

Quote:
is it possible for both of the distros to use both swap paritions while they are running (not at the same time of course)
Well I don't entirely understand what you are asking. Do you want the distros to use both swap partitions, i.e. so you have a total of 1GB of swap? I don't know if that is possible, whether it's at the same time or not.

IMO you should just stick with the single swap partition for both distros.
 
Old 08-25-2004, 11:45 AM   #4
halo14
Senior Member
 
Registered: Apr 2004
Location: Surprise, AZ
Distribution: Debian | CentOS | Arch
Posts: 1,103

Rep: Reputation: 45
I would suggest using the single swap partition on each distro... unless you have a really slow box.. you probably don't even need too much swap... as linux takes good care of ram... i hate 512 DDR... and rarely ever even use up all of that running xterm/mozilla/OOoW/X-Chat at the same time... so just give yourself a swap that's 1.5 - 2 times the amount of ram you have.. and you'll be sittin' pretty... Good Luck...
 
Old 08-25-2004, 12:40 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,968

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
Yes, you can have multiple swap partitions and by both distros. I believe the max is 128 partitions each being 2GB in size.

Do you monitor swap usage? How much of the 499MB is being used? Wether or not you need extra swap depends on the applications and what the PC is used for. For most desktop workstations 512MB is more then sufficient.
 
Old 08-25-2004, 01:24 PM   #6
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Milwaukee, WI
Distribution: Mint
Posts: 6,642

Rep: Reputation: 69
You can definitely share a single swap partition between 2 distros. However, keep in mind that anytime you system uses swap, you are performing physical reads/writes, which are approx 6 orders of magnitude (ms versus ns) slower than accessing the same data in RAM. If you swap usage is high, you will be seeing a dramactic decrease in system response time rather than an increase.

Swap was important back in the days were 64Mg of RAM was considered bleeding edge. Today, with PC's typically using 256 or 512Mg as the standard, it's far less likely that swap will be used on a consistent basis, and I would say that if you've got at least 256Mg of swap that would be plenty, regardless of the amount of RAM. (Again, the rule of thumb to make swap twice as large as RAM is pretty much a remnant of ancient times - it's probably a useful exercise to inspect what your current swap usage actually is.) If you do see high swap usage, I'd recommend buying more RAM. Ideally, if you are aiming for maximum system performance, you'd want your swap usage to remain as close to zero as possible. -- J.W.
 
Old 08-25-2004, 01:55 PM   #7
librano
Member
 
Registered: Jul 2004
Location: Here, there and everywhere.
Distribution: Arch+KDE, Linux Mint Fluxbox CE
Posts: 163

Original Poster
Rep: Reputation: 31
thanks for the replies...

let me give you my memory situation now... i'm running mandrake 10 with KDE now... i have opera open with 3 pages, azureus with 2 torrents running, KDE system Load (monitor app), XMMS with Madman music library and stereo effects, Mandrake Control Center, and the rest of the system processes running... all 256 mb ram of physical memory is being used and about 210 mb of swap.. azureus is using the most ram 272mb ram... and X is using 100mb...opera 80mb..

everything is running fine now without a glitch... the problem comes when i run VMWare with WinXP... when i do... my harddisk hardly ever stops working... then everything grinds to a crawl...even then not all my swap is used... about 300mb... i was thinking if i split the swap load between 2 hard disks maybe it would run faster... i know more ram would fix it but i dont want to spend money on sdram... i'd rather save and get a new mother board and some ddram...

it is amazing though when VMWare really clogged up my system i was expecting something to crash... everything worked slow... but linux was stable as a rock... once i closed VMWare everything was back to normal.... if i were on XP the only way out of that would have been reset... i didnt even have to reboot... i'm impressed!!!

u may be thinkin why i dont just dual boot... well thats coz my mother board and processor are not the best of friends... my old processor got fried... and i have to update the BIOS for my motherboard to recognise the processor as Athlon XP 2000 ... right now it says unknown AMD processor... and WinXP gives a hardware configuration error and wont install... strange isnt it... mine is probably the only box which has hardware probs with WinXP and not with Linux!! and i need macromedia flash MX 2004 for this project i'm doing... so i just need WinXP for a couple weeks only...

anyways.. i guess i'll try the 2 swap partition idea... and see if it actually helps...but i dont want to reboot i'm shattering every uptime record i ever had with WinXP... and aiming to shatter my friend's WinXP uptime record of about a week

thanks for the help...

ps.. i was wondering if there is a way to force a program like azureus (java bittorrent client) to use more swap instead of my physical ram... coz its only downloading... i dont really need it to be super responsive...

Last edited by librano; 08-25-2004 at 02:01 PM.
 
  


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
/ and swap partitions (but want more) How to? acummings Slackware 3 07-17-2004 12:33 AM
Swap partitions 2k. Linux - General 7 03-01-2004 05:59 PM
Do I need 2 swap partitions? CloudBuilder Linux - Newbie 2 11-14-2003 03:09 PM
swap partitions chappy011 Linux - Newbie 2 03-18-2002 01:44 PM
swap partitions rakemup Linux - Software 5 12-10-2001 09:24 PM


All times are GMT -5. The time now is 07:44 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration