LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-31-2006, 06:23 PM   #1
Jan Tanjo
Member
 
Registered: Dec 2004
Location: Toronto ON
Distribution: Mandrake 9.2 . Fedora 5
Posts: 65

Rep: Reputation: 15
seperate hard drive for swap file


Hi

Is there an advantage to having a separate hard drive for the swap disk/file, is it worth it?

Another question, can I put /home/name/directory so that each drive will show up as a directory in home view such as;

drive 1 /home/bbe/pictures
drive 1 /home/bbe/videos
drive 2 /home/bbe/something else
drive 3 /home/bbe/other things

Thank you
 
Old 12-31-2006, 06:36 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
If you don't swap, it don't matter.
If you *do* swap, it might. Pretty expensive option I would have thought. Personally I prefer to have multiple swap partitions (same priority) on separate drives. This is effectively a "stripe set" that kswapd manages itself.
So long as the disks aren't otherwise active (I/O-wise), seems to work o.k. Find some data that doesn't get hit very often, and put that on the same drives if you can.
Don't go putting things like video streaming against active swap.
 
Old 12-31-2006, 06:40 PM   #3
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
The reason that you might want to put any disk partition on a new disk is to spread I/O over the disks to lighten the load on each disk. I have never seen a Linux system aggressively swap. In other words the little bit of swap file activity that I normally see on Linux systems is spread out over time. That means that there is no advantage to putting a swap file on a separate disk.

You can mount disk partitons onto any directory in the directory tree. So, yes, you can mount disk partitions onto directories in a user's home directory. For example using your original post:
Code:
mount /dev/hdb1 /home/bbe/pictures
mount /dev/hdc1 /home/bbe/videos
mount /dev/hda2 /home/bbe/something.else
mount /dev/hda3 /home/bbe/other.things
Naturally, whatever the real device names are should be substituted for what I wrote.
 
Old 12-31-2006, 11:59 PM   #4
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
Keep in mind that the only time swap is needed is if your usage push RAM past its capacity, and the system is forced to write memory pages to the hard drive. Back in the days where having 32Mg of RAM was considered bleeding edge, it was easy to do that, but with modern systems having 256Mg or 512Mg or even more RAM, it becomes increasingly unlikely.

As syg00 and stress_junkie mentioned significant sustained swapping would be really unusual, and unless your current system is using swap in a big way, putting your swap space on a different drive won't make a difference. How much RAM do you have, and what kinds of swap usage are you seeing right now?
 
Old 01-01-2007, 11:12 AM   #5
Jan Tanjo
Member
 
Registered: Dec 2004
Location: Toronto ON
Distribution: Mandrake 9.2 . Fedora 5
Posts: 65

Original Poster
Rep: Reputation: 15
I'm pretty sure I have 768 (if I recall) for sure not less. With my limited Linux knowledge it appears there is not much swap usage.

Is there any advantage in not having a swap partition at all. Just wanting to learn.

Thank you J.W., stress_junkie, and syg00 for you help.
 
Old 01-01-2007, 02:18 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Well .. the advantage is that you save some disk-space. However,
IF you fired up (a) process(es) that gobbled up all available RAM
and you didn't have swap the kernel would kill any random process
to make room for the next ones needs - rather ugly if you were editing
a big video file and got shot in the foot because you lacked 50MB ;}



Cheers,
Tink
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
seperate internal hard drive cerealdaemon Linux - Hardware 2 08-06-2005 12:05 PM
Accessing Windows files on a seperate hard drive ickselglic Linux - Hardware 1 01-22-2005 06:13 PM
Installation on a seperate hard drive with win XP on the other fedoracorechris Fedora 2 04-19-2004 10:45 AM
Mandrake Install on Seperate Hard Drive mbracken Mandriva 6 09-09-2003 04:20 PM
Mandrake Install on Seperate Hard Drive mbracken Linux - General 2 09-09-2003 10:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:33 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